diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-26 22:19:47 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-27 15:39:35 (GMT) |
commit | c794b70f194bcff6f06971767f18473da13950e3 (patch) | |
tree | 10882364d6d53229428bf2448ef25daf1325c75d /Tests | |
parent | 9590c3a400cc16882fee860818cfdcca82e17a37 (diff) | |
download | CMake-c794b70f194bcff6f06971767f18473da13950e3.zip CMake-c794b70f194bcff6f06971767f18473da13950e3.tar.gz CMake-c794b70f194bcff6f06971767f18473da13950e3.tar.bz2 |
Ninja Multi-Config: Always generate build.ninja
If CMAKE_DEFAULT_BUILD_TYPE is not specified, use the first item
from CMAKE_CONFIGURATION_TYPES instead.
Diffstat (limited to 'Tests')
4 files changed, 3 insertions, 12 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile-result.txt b/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile-stderr.txt deleted file mode 100644 index 5d090a0..0000000 --- a/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Error: - CMAKE_DEFAULT_CONFIGS cannot be used without CMAKE_DEFAULT_BUILD_TYPE or - CMAKE_CROSS_CONFIGS - - -CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile.cmake b/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile.cmake deleted file mode 100644 index e69de29..0000000 --- a/Tests/RunCMake/NinjaMultiConfig/InvalidDefaultConfigsNoDefaultFile.cmake +++ /dev/null diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake index bed7531..b07b4f7 100644 --- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake @@ -81,7 +81,9 @@ endfunction() set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Simple-build) -set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release\\;MinSizeRel\\;RelWithDebInfo;-DCMAKE_DEFAULT_BUILD_TYPE=RelWithDebInfo;-DCMAKE_CROSS_CONFIGS=all") +# IMPORTANT: Setting RelWithDebInfo as the first item in CMAKE_CONFIGURATION_TYPES +# generates a build.ninja file with that configuration +set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo\\;Debug\\;Release\\;MinSizeRel;-DCMAKE_CROSS_CONFIGS=all") run_cmake_configure(Simple) unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) @@ -153,10 +155,6 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=Debug\\;Release;-DCMAKE_DEFAULT run_cmake(InvalidDefaultConfigsCross) unset(RunCMake_TEST_OPTIONS) -set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=Debug\\;Release;-DCMAKE_DEFAULT_CONFIGS=all") -run_cmake(InvalidDefaultConfigsNoDefaultFile) -unset(RunCMake_TEST_OPTIONS) - set(RunCMake_TEST_OPTIONS "-DCMAKE_DEFAULT_BUILD_TYPE=Release;-DCMAKE_DEFAULT_CONFIGS=all") run_cmake(InvalidDefaultConfigsNoCross) unset(RunCMake_TEST_OPTIONS) |