Disable code formatting on CI builds.
This commit is contained in:
parent
2af5adca3d
commit
8af28e46be
3 changed files with 6 additions and 6 deletions
|
@ -25,11 +25,6 @@ if (CLANG_FORMAT_CMD)
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${ALL_SOURCE_FILES}
|
${ALL_SOURCE_FILES}
|
||||||
)
|
)
|
||||||
else(CLANG_FORMAT_CMD)
|
|
||||||
add_custom_target(
|
|
||||||
clangformat
|
|
||||||
COMMENT "no clang format"
|
|
||||||
)
|
|
||||||
endif(CLANG_FORMAT_CMD)
|
endif(CLANG_FORMAT_CMD)
|
||||||
|
|
||||||
# thirdparty stuff
|
# thirdparty stuff
|
||||||
|
|
3
build.py
3
build.py
|
@ -79,6 +79,9 @@ def build_lib(build_name, generator, options):
|
||||||
]
|
]
|
||||||
if generator:
|
if generator:
|
||||||
initial_cmake.extend(['-G', generator])
|
initial_cmake.extend(['-G', generator])
|
||||||
|
if IS_BUILD_MACHINE:
|
||||||
|
# disable formatting on CI builds
|
||||||
|
initial_cmake.append('-DCLANG_FORMAT_SUFFIX=none')
|
||||||
for key in options:
|
for key in options:
|
||||||
val = 'ON' if options[key] else 'OFF'
|
val = 'ON' if options[key] else 'OFF'
|
||||||
initial_cmake.append('-D%s=%s' % (key, val))
|
initial_cmake.append('-D%s=%s' % (key, val))
|
||||||
|
|
|
@ -106,7 +106,9 @@ if (${BUILD_SHARED_LIBS})
|
||||||
target_compile_definitions(discord-rpc PRIVATE -DDISCORD_BUILDING_SDK)
|
target_compile_definitions(discord-rpc PRIVATE -DDISCORD_BUILDING_SDK)
|
||||||
endif(${BUILD_SHARED_LIBS})
|
endif(${BUILD_SHARED_LIBS})
|
||||||
|
|
||||||
add_dependencies(discord-rpc clangformat)
|
if (CLANG_FORMAT_CMD)
|
||||||
|
add_dependencies(discord-rpc clangformat)
|
||||||
|
endif(CLANG_FORMAT_CMD)
|
||||||
|
|
||||||
# install
|
# install
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue