diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-26 13:23:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-07-26 13:23:32 (GMT) |
commit | 8129bf85edea4ab6646b14687134b5a7dc5b23a5 (patch) | |
tree | 1c9377159ca8e1cafd424172391b373d3eb0118f /Tests | |
parent | 59218dcf2626d108ed3c098c4897edee9ed9c0cc (diff) | |
parent | ff12a57d5e459fac4cf2b11f90a681bc165c4a42 (diff) | |
download | CMake-8129bf85edea4ab6646b14687134b5a7dc5b23a5.zip CMake-8129bf85edea4ab6646b14687134b5a7dc5b23a5.tar.gz CMake-8129bf85edea4ab6646b14687134b5a7dc5b23a5.tar.bz2 |
Merge topic 'exec-program-policy'
ff12a57d5e exec_program(): Remove by policy CMP0153
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8653
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-NEW-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-NEW-stderr.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-NEW-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-NEW.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-OLD-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-OLD.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-WARN-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-WARN-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMP0153-WARN.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0153/RunCMakeTest.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 2 |
12 files changed, 32 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0153/CMP0153-NEW-result.txt b/Tests/RunCMake/CMP0153/CMP0153-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0153/CMP0153-NEW-stderr.txt b/Tests/RunCMake/CMP0153/CMP0153-NEW-stderr.txt new file mode 100644 index 0000000..e24eee7 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-NEW-stderr.txt @@ -0,0 +1,3 @@ +^CMake Error at [^ +]*/Tests/RunCMake/CMP0153/CMP0153-NEW\.cmake:[0-9]+ \(exec_program\): + The exec_program command should not be called; see CMP0153\.$ diff --git a/Tests/RunCMake/CMP0153/CMP0153-NEW-stdout.txt b/Tests/RunCMake/CMP0153/CMP0153-NEW-stdout.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-NEW-stdout.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMP0153/CMP0153-NEW.cmake b/Tests/RunCMake/CMP0153/CMP0153-NEW.cmake new file mode 100644 index 0000000..d252b46 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0153 NEW) +exec_program("${CMAKE_COMMAND}" ARGS "-E echo \"exec_program() called\"") diff --git a/Tests/RunCMake/CMP0153/CMP0153-OLD-stdout.txt b/Tests/RunCMake/CMP0153/CMP0153-OLD-stdout.txt new file mode 100644 index 0000000..1aa5183 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-OLD-stdout.txt @@ -0,0 +1 @@ +exec_program\(\) called diff --git a/Tests/RunCMake/CMP0153/CMP0153-OLD.cmake b/Tests/RunCMake/CMP0153/CMP0153-OLD.cmake new file mode 100644 index 0000000..d3c47a7 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0153 OLD) +exec_program("${CMAKE_COMMAND}" ARGS "-E echo \"exec_program() called\"") diff --git a/Tests/RunCMake/CMP0153/CMP0153-WARN-stderr.txt b/Tests/RunCMake/CMP0153/CMP0153-WARN-stderr.txt new file mode 100644 index 0000000..8f22d4e --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-WARN-stderr.txt @@ -0,0 +1,6 @@ +^CMake Warning \(dev\) at [^ +]*/Tests/RunCMake/CMP0153/CMP0153-WARN\.cmake:[0-9]+ \(exec_program\): + Policy CMP0153 is not set: The exec_program command should not be called\. + Run "cmake --help-policy CMP0153" for policy details\. Use the cmake_policy + command to set the policy and suppress this warning\. +This warning is for project developers\. Use -Wno-dev to suppress it\.$ diff --git a/Tests/RunCMake/CMP0153/CMP0153-WARN-stdout.txt b/Tests/RunCMake/CMP0153/CMP0153-WARN-stdout.txt new file mode 100644 index 0000000..1aa5183 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-WARN-stdout.txt @@ -0,0 +1 @@ +exec_program\(\) called diff --git a/Tests/RunCMake/CMP0153/CMP0153-WARN.cmake b/Tests/RunCMake/CMP0153/CMP0153-WARN.cmake new file mode 100644 index 0000000..ba81501 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMP0153-WARN.cmake @@ -0,0 +1 @@ +exec_program("${CMAKE_COMMAND}" ARGS "-E echo \"exec_program() called\"") diff --git a/Tests/RunCMake/CMP0153/CMakeLists.txt b/Tests/RunCMake/CMP0153/CMakeLists.txt new file mode 100644 index 0000000..922aad6 --- /dev/null +++ b/Tests/RunCMake/CMP0153/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.27) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0153/RunCMakeTest.cmake b/Tests/RunCMake/CMP0153/RunCMakeTest.cmake new file mode 100644 index 0000000..3d01dbf --- /dev/null +++ b/Tests/RunCMake/CMP0153/RunCMakeTest.cmake @@ -0,0 +1,9 @@ +include(RunCMake) + +function(run_cmp0153 name) + run_cmake_command(${name} ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/${name}.cmake") +endfunction() + +run_cmp0153(CMP0153-WARN) +run_cmp0153(CMP0153-OLD) +run_cmp0153(CMP0153-NEW) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 608a4d9..d20af29 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -169,6 +169,8 @@ if(NOT WIN32 OR CYGWIN) add_RunCMake_test(CMP0152) endif() +add_RunCMake_test(CMP0153) + # The test for Policy 65 requires the use of the # CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode # generators ignore. The policy will have no effect on those generators. |