mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
2311cdaccb
Apparently my python 3.6 install an old cmakelang
18 lines
572 B
Python
18 lines
572 B
Python
import fnmatch
|
|
import os
|
|
import sys
|
|
import subprocess
|
|
|
|
for root, dirnames, filenames in os.walk('..'):
|
|
for filename in fnmatch.filter(filenames, 'CMakeLists.txt'):
|
|
print("cmake-format -c ../.cmake-format.py -i " + root + "/" + filename)
|
|
os.system("cmake-format -c ../.cmake-format.py -i %s" % ((root + "/" + filename)))
|
|
|
|
# Check if all files are formatter
|
|
output = subprocess.check_output("git diff", shell=True)
|
|
|
|
if output:
|
|
print("Git diff is not empty. This means your CMakeLists.txt file was not formatted!")
|
|
#print(output)
|
|
sys.exit(1)
|