summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake
diff options
context:
space:
mode:
authorDeniz Bahadir <deniz@code.bahadir.email>2024-03-28 13:16:10 (GMT)
committerBrad King <brad.king@kitware.com>2024-03-29 12:54:11 (GMT)
commit071f0d6f983546cf7ec5ab8a376c4d547293304a (patch)
treeb73f4340bbca884dd3f22593e0f6d8ef6e368e60 /Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake
parent00c6573d86ad7d008c250bb89de7548c3bfa6f41 (diff)
downloadCMake-071f0d6f983546cf7ec5ab8a376c4d547293304a.zip
CMake-071f0d6f983546cf7ec5ab8a376c4d547293304a.tar.gz
CMake-071f0d6f983546cf7ec5ab8a376c4d547293304a.tar.bz2
CMP0163: Make GENERATED source file property globally visible
This was originally attempted by policy CMP0118, but its implementation did not cover all intended use cases. We fixed its documentation in commit 1dabbbb5e0 (CMP0118: Revise documentation to describe actual behavior, 2024-03-20). Add new policy CMP0163 to cover the remaining use cases. In particular, make the `GENERATED` property visible to `get_property` calls in other directories. In order to capture the original intention of CMP0118, define CMP0163's NEW behavior to also imply CMP0118's NEW behavior. Fixes: #25437 Fixes: #25058
Diffstat (limited to 'Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake')
-rw-r--r--Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake
new file mode 100644
index 0000000..2faf482
--- /dev/null
+++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0118 NEW)
+cmake_policy(SET CMP0163 NEW)
+
+# Call the associated test.
+cmake_path(GET RunCMake_TEST STEM testcase)
+string(REGEX REPLACE "NEW" "Common" testcase "${testcase}")
+include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake)