diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-26 21:37:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-02-27 14:23:08 (GMT) |
commit | 9590c3a400cc16882fee860818cfdcca82e17a37 (patch) | |
tree | 5f1347d554c0d4ff6eac58aca3848ee7106e1c5a /Tests/RunCMake/Configure | |
parent | 7a63dafafbc666a184a007adca5b138796384f77 (diff) | |
download | CMake-9590c3a400cc16882fee860818cfdcca82e17a37.zip CMake-9590c3a400cc16882fee860818cfdcca82e17a37.tar.gz CMake-9590c3a400cc16882fee860818cfdcca82e17a37.tar.bz2 |
Generator: Don't allow Ninja Multi-Config variables on other generators
We may want to enable these variables later on with specific
semantics. To avoid breaking backwards compatibility, make it an
error to use them for now.
Diffstat (limited to 'Tests/RunCMake/Configure')
10 files changed, 45 insertions, 0 deletions
diff --git a/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS-result.txt b/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS-stderr.txt b/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS-stderr.txt new file mode 100644 index 0000000..a5d149d --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS-stderr.txt @@ -0,0 +1,11 @@ +^CMake Error: + Generator + + [^ +]* + + does not support variable + + CMAKE_CROSS_CONFIGS + + but it has been specified. diff --git a/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS.cmake b/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS.cmake new file mode 100644 index 0000000..75d0c47 --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_CROSS_CONFIGS.cmake @@ -0,0 +1 @@ +set(CMAKE_CROSS_CONFIGS "") diff --git a/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE-result.txt b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE-stderr.txt b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE-stderr.txt new file mode 100644 index 0000000..8aa3ed3 --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE-stderr.txt @@ -0,0 +1,11 @@ +^CMake Error: + Generator + + [^ +]* + + does not support variable + + CMAKE_DEFAULT_BUILD_TYPE + + but it has been specified. diff --git a/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE.cmake b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE.cmake new file mode 100644 index 0000000..64c7feb --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_BUILD_TYPE.cmake @@ -0,0 +1 @@ +set(CMAKE_DEFAULT_BUILD_TYPE "") diff --git a/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS-result.txt b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS-stderr.txt b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS-stderr.txt new file mode 100644 index 0000000..040bf4d --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS-stderr.txt @@ -0,0 +1,11 @@ +^CMake Error: + Generator + + [^ +]* + + does not support variable + + CMAKE_DEFAULT_CONFIGS + + but it has been specified. diff --git a/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS.cmake b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS.cmake new file mode 100644 index 0000000..5b65172 --- /dev/null +++ b/Tests/RunCMake/Configure/NoCMAKE_DEFAULT_CONFIGS.cmake @@ -0,0 +1 @@ +set(CMAKE_DEFAULT_CONFIGS "") diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake index 76d843c..9fd4499 100644 --- a/Tests/RunCMake/Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake @@ -50,3 +50,9 @@ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") run_cmake(RemoveCache) file(REMOVE "${RunCMake_TEST_BINARY_DIR}/CMakeCache.txt") run_cmake(RemoveCache) + +if(NOT RunCMake_GENERATOR MATCHES "^Ninja Multi-Config$") + run_cmake(NoCMAKE_CROSS_CONFIGS) + run_cmake(NoCMAKE_DEFAULT_BUILD_TYPE) + run_cmake(NoCMAKE_DEFAULT_CONFIGS) +endif() |