linglong/.cmake-format.py

108 lines
3.5 KiB
Python

# SPDX-FileCopyrightText: None
#
# SPDX-License-Identifier: CC0-1.0
with section("parse"):
additional_commands = {
"cpmaddpackage": {
"kwargs": {
"DOWNLOAD_COMMAND": 1,
"DOWNLOAD_NAME": 1,
"DOWNLOAD_NO_EXTRACT": 1,
"DOWNLOAD_ONLY": 1,
"EXCLUDE_FROM_ALL": 1,
"FIND_PACKAGE_ARGUMENTS": 1,
"FORCE": 1,
"GITHUB_REPOSITORY": 1,
"GITLAB_REPOSITORY": 1,
"GIT_REPOSITORY": 1,
"GIT_SHALLOW": 1,
"GIT_TAG": 1,
"HTTP_PASSWORD": 1,
"HTTP_USERNAME": 1,
"NAME": 1,
"NO_CACHE": 1,
"OPTIONS": "+",
"SOURCE_DIR": 1,
"SOURCE_SUBDIR": 1,
"SVN_REPOSITORY": 1,
"SVN_REVISION": 1,
"URL": 1,
"URL_HASH": 1,
"URL_MD5": 1,
"VERSION": 1,
},
"pargs": {"flags": [], "nargs": "*"},
"spelling": "CPMAddPackage",
},
"cpmdeclarepackage": {
"kwargs": {
"DOWNLOAD_COMMAND": 1,
"DOWNLOAD_NAME": 1,
"DOWNLOAD_NO_EXTRACT": 1,
"DOWNLOAD_ONLY": 1,
"EXCLUDE_FROM_ALL": 1,
"FIND_PACKAGE_ARGUMENTS": 1,
"FORCE": 1,
"GITHUB_REPOSITORY": 1,
"GITLAB_REPOSITORY": 1,
"GIT_REPOSITORY": 1,
"GIT_SHALLOW": 1,
"GIT_TAG": 1,
"HTTP_PASSWORD": 1,
"HTTP_USERNAME": 1,
"NAME": 1,
"NO_CACHE": 1,
"OPTIONS": "+",
"SOURCE_DIR": 1,
"SOURCE_SUBDIR": 1,
"SVN_REPOSITORY": 1,
"SVN_REVISION": 1,
"URL": 1,
"URL_HASH": 1,
"URL_MD5": 1,
"VERSION": 1,
},
"pargs": {"flags": [], "nargs": "*"},
"spelling": "CPMDeclarePackage",
},
"cpmfindpackage": {
"kwargs": {
"DOWNLOAD_COMMAND": 1,
"DOWNLOAD_NAME": 1,
"DOWNLOAD_NO_EXTRACT": 1,
"DOWNLOAD_ONLY": 1,
"EXCLUDE_FROM_ALL": 1,
"FIND_PACKAGE_ARGUMENTS": 1,
"FORCE": 1,
"GITHUB_REPOSITORY": 1,
"GITLAB_REPOSITORY": 1,
"GIT_REPOSITORY": 1,
"GIT_SHALLOW": 1,
"GIT_TAG": 1,
"HTTP_PASSWORD": 1,
"HTTP_USERNAME": 1,
"NAME": 1,
"NO_CACHE": 1,
"OPTIONS": "+",
"SOURCE_DIR": 1,
"SOURCE_SUBDIR": 1,
"SVN_REPOSITORY": 1,
"SVN_REVISION": 1,
"URL": 1,
"URL_HASH": 1,
"URL_MD5": 1,
"VERSION": 1,
},
"pargs": {"flags": [], "nargs": "*"},
"spelling": "CPMFindPackage",
},
"cpmgetpackageversion": {"pargs": 2, "spelling": "CPMGetPackageVersion"},
"cpmregisterpackage": {"pargs": 1, "spelling": "CPMRegisterPackage"},
"cpmusepackagelock": {"pargs": 1, "spelling": "CPMUsePackageLock"},
}
with section("format"):
# How wide to allow formatted cmake files
line_width = 80