build: cmake: add compatibility target of dev-headers
our CI builds "dev-headers" as a gating check. but the target names generated by CMake's Ninja Multi-Config generator does not follow this naming convention. we could have headers:Dev, but still, it's different from what we are using, before completely switching to CMake, let's keep this backward compatibility by adding a target with the same name. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
@@ -126,6 +126,15 @@ option(Scylla_CHECK_HEADERS
|
||||
"Add check-headers target for checking the self-containness of headers")
|
||||
if(Scylla_CHECK_HEADERS)
|
||||
add_custom_target(check-headers)
|
||||
# compatibility target used by CI, which builds "dev-headers" for building
|
||||
# "headers" of the "dev" mode. but we don't have such an alias. what we
|
||||
# have is check-headers:Dev, and we don't want to build check-headers
|
||||
# for all "CMAKE_DEFAULT_CONFIGS". so, before we , let's add an target
|
||||
# which only build build check-headers for Dev, and skip it otherwise.
|
||||
add_custom_target(dev-headers
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"$<IF:$<CONFIG:Dev>,--build;${CMAKE_BINARY_DIR};--config;$<CONFIG>;--target;check-headers,-E;echo;skipping;dev-headers;in;$<CONFIG>>"
|
||||
COMMAND_EXPAND_LISTS)
|
||||
endif()
|
||||
|
||||
include(check_headers)
|
||||
|
||||
@@ -2426,6 +2426,7 @@ def configure_using_cmake(args):
|
||||
'CMAKE_CXX_FLAGS': args.user_cflags,
|
||||
'CMAKE_EXE_LINKER_FLAGS': semicolon_separated(args.user_ldflags),
|
||||
'CMAKE_EXPORT_COMPILE_COMMANDS': 'ON',
|
||||
'Scylla_CHECK_HEADERS': 'ON',
|
||||
}
|
||||
if args.date_stamp:
|
||||
settings['Scylla_DATE_STAMP'] = args.date_stamp
|
||||
|
||||
Reference in New Issue
Block a user