diff options
author | Juan Ramos <cmake@jpr.mozmail.com> | 2022-11-06 22:52:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-08 14:32:18 (GMT) |
commit | d3acd22380663bd4061abf07384d507c589d3286 (patch) | |
tree | d56d36f61646b251a909a2feba9f6954b8e6f3f6 /Tests/RunCMake/VSSolution | |
parent | 3ee1017ce66d86190460d5c842324ea2a4870ae3 (diff) | |
download | CMake-d3acd22380663bd4061abf07384d507c589d3286.zip CMake-d3acd22380663bd4061abf07384d507c589d3286.tar.gz CMake-d3acd22380663bd4061abf07384d507c589d3286.tar.bz2 |
USE_FOLDERS: Treat as on by default
Add a policy to treat the `USE_FOLDERS` global property as ON by default
if it is not set.
Fixes: #21695
Diffstat (limited to 'Tests/RunCMake/VSSolution')
-rw-r--r-- | Tests/RunCMake/VSSolution/CMP0143-NEW-check.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/VSSolution/CMP0143-NEW.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/VSSolution/CMP0143-OLD-check.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/VSSolution/CMP0143-OLD.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/VSSolution/CMP0143-WARN-check.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/VSSolution/CMP0143-WARN.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/VSSolution/RunCMakeTest.cmake | 3 |
7 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/VSSolution/CMP0143-NEW-check.cmake b/Tests/RunCMake/VSSolution/CMP0143-NEW-check.cmake new file mode 100644 index 0000000..6dd042b --- /dev/null +++ b/Tests/RunCMake/VSSolution/CMP0143-NEW-check.cmake @@ -0,0 +1,6 @@ +getProjectNames(projects) + +list(FIND projects "CMakePredefinedTargets" found) + if(found EQUAL "-1") + error("CMakePredefinedTargets should be defined when CMP0143 is NEW!") +endif() diff --git a/Tests/RunCMake/VSSolution/CMP0143-NEW.cmake b/Tests/RunCMake/VSSolution/CMP0143-NEW.cmake new file mode 100644 index 0000000..dd67b16 --- /dev/null +++ b/Tests/RunCMake/VSSolution/CMP0143-NEW.cmake @@ -0,0 +1 @@ +add_custom_target(TestStartup) diff --git a/Tests/RunCMake/VSSolution/CMP0143-OLD-check.cmake b/Tests/RunCMake/VSSolution/CMP0143-OLD-check.cmake new file mode 100644 index 0000000..2d9829c --- /dev/null +++ b/Tests/RunCMake/VSSolution/CMP0143-OLD-check.cmake @@ -0,0 +1,6 @@ +getProjectNames(projects) + +list(FIND projects "CMakePredefinedTargets" found) + if(NOT (found EQUAL "-1")) + error("CMakePredefinedTargets should not be defined when CMP0143 is OLD!") +endif() diff --git a/Tests/RunCMake/VSSolution/CMP0143-OLD.cmake b/Tests/RunCMake/VSSolution/CMP0143-OLD.cmake new file mode 100644 index 0000000..dd67b16 --- /dev/null +++ b/Tests/RunCMake/VSSolution/CMP0143-OLD.cmake @@ -0,0 +1 @@ +add_custom_target(TestStartup) diff --git a/Tests/RunCMake/VSSolution/CMP0143-WARN-check.cmake b/Tests/RunCMake/VSSolution/CMP0143-WARN-check.cmake new file mode 100644 index 0000000..2d9829c --- /dev/null +++ b/Tests/RunCMake/VSSolution/CMP0143-WARN-check.cmake @@ -0,0 +1,6 @@ +getProjectNames(projects) + +list(FIND projects "CMakePredefinedTargets" found) + if(NOT (found EQUAL "-1")) + error("CMakePredefinedTargets should not be defined when CMP0143 is OLD!") +endif() diff --git a/Tests/RunCMake/VSSolution/CMP0143-WARN.cmake b/Tests/RunCMake/VSSolution/CMP0143-WARN.cmake new file mode 100644 index 0000000..dd67b16 --- /dev/null +++ b/Tests/RunCMake/VSSolution/CMP0143-WARN.cmake @@ -0,0 +1 @@ +add_custom_target(TestStartup) diff --git a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake index c25833d..134821d 100644 --- a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake +++ b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake @@ -15,4 +15,7 @@ run_cmake(AddPackageToDefault) if(NOT NO_USE_FOLDERS) run_cmake(StartupProjectUseFolders) + run_cmake(CMP0143-WARN) + run_cmake_with_options(CMP0143-OLD "-DCMAKE_POLICY_DEFAULT_CMP0143=OLD") + run_cmake_with_options(CMP0143-NEW "-DCMAKE_POLICY_DEFAULT_CMP0143=NEW") endif() |