diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-26 19:43:57 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-26 19:43:57 (GMT) |
commit | b8937a992b956b16a9181737f695ca118c5eea49 (patch) | |
tree | 02b30e7d14f767c28e0ef69af3351f343d7bf8c9 /Tests/RunCMake/NinjaMultiConfig | |
parent | d13bd6ec3d7232b4b62d3106684f4f57951f3b28 (diff) | |
parent | 9fa7afe7d332ced27264f1ef7c921aa1d95bc476 (diff) | |
download | CMake-b8937a992b956b16a9181737f695ca118c5eea49.zip CMake-b8937a992b956b16a9181737f695ca118c5eea49.tar.gz CMake-b8937a992b956b16a9181737f695ca118c5eea49.tar.bz2 |
Merge branch 'release' into ninja-multi-per-config-sources
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
3 files changed, 26 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake new file mode 100644 index 0000000..a4d2758 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake @@ -0,0 +1,9 @@ +check_files("${RunCMake_TEST_BINARY_DIR}" + INCLUDE + ${TARGET_FILE_release_only_tool_Release} + ${TARGET_EXE_FILE_release_only_tool_Release} + + EXCLUDE + ${TARGET_FILE_release_only_tool_Debug} + ${TARGET_EXE_FILE_release_only_tool_Debug} + ) diff --git a/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake new file mode 100644 index 0000000..52f84ea --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake @@ -0,0 +1,12 @@ +enable_language(C) + +set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "") +set(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "") +set(CMAKE_CROSS_CONFIGS "all" CACHE STRING "") +set(CMAKE_DEFAULT_CONFIGS "all" CACHE STRING "") + +add_executable(release_only_tool main.c) +set_property(TARGET release_only_tool PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:Release>>") + +include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake) +generate_output_files(release_only_tool) diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake index 8496d63..6699a09 100644 --- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake @@ -284,6 +284,11 @@ run_ninja(Install default-install build.ninja install) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/install") run_ninja(Install all-install build.ninja install:all) +set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build) +run_cmake_configure(ExcludeFromAll) +include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) +run_cmake_build(ExcludeFromAll all "" all:all) + # FIXME Get this working #set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AutoMocExecutable-build) #run_cmake_configure(AutoMocExecutable) |