提交 4ec3c905 编写于 作者: Q quicksilver

add cmake format python file


Former-commit-id: 7faa543e12881a318a0fd18d112cc8dbaecae381
上级 ed9dcf1a
...@@ -33,7 +33,7 @@ patterns = [ ...@@ -33,7 +33,7 @@ patterns = [
'cpp/cmake/ThirdPartyPackages.cmake', 'cpp/cmake/ThirdPartyPackages.cmake',
'cpp/src/core/cmake/BuildUtilsCore.cmake', 'cpp/src/core/cmake/BuildUtilsCore.cmake',
'cpp/src/core/cmake/DefineOptionsCore.cmake', 'cpp/src/core/cmake/DefineOptionsCore.cmake',
'cpp/src/core/cmake/ThirdPartyPackagesCore.cmake 'cpp/src/core/cmake/ThirdPartyPackagesCore.cmake',
'cpp/src/**/CMakeLists.txt', 'cpp/src/**/CMakeLists.txt',
'cpp/unittest/**/CMakeLists.txt' 'cpp/unittest/**/CMakeLists.txt'
] ]
...@@ -51,7 +51,9 @@ def run_cmake_format(paths): ...@@ -51,7 +51,9 @@ def run_cmake_format(paths):
# necessary # necessary
# autosort is off because it breaks in cmake_format 5.1 # autosort is off because it breaks in cmake_format 5.1
# See: https://github.com/cheshirekow/cmake_format/issues/111 # See: https://github.com/cheshirekow/cmake_format/issues/111
cmd = ['cmake-format', '--in-place', '--autosort=false'] + paths _paths = [str(path) for path in paths]
cmd = ['cmake-format', '--in-place', '--autosort=false'] + _paths
try: try:
subprocess.run(cmd, check=True) subprocess.run(cmd, check=True)
except FileNotFoundError: except FileNotFoundError:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册