summaryrefslogtreecommitdiffstats
path: root/Tests/Complex
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-10-03 13:18:14 (GMT)
committerBrad King <brad.king@kitware.com>2024-10-03 18:18:16 (GMT)
commit9e3b559b6a30b8b5734849fc21a9cea1b0e2874f (patch)
treeedc4eca1f905ba8fffc073e5e68eac02cfc25e55 /Tests/Complex
parentf4aa34daa724cf80dd407d14cd5a091b6e390c62 (diff)
downloadCMake-9e3b559b6a30b8b5734849fc21a9cea1b0e2874f.zip
CMake-9e3b559b6a30b8b5734849fc21a9cea1b0e2874f.tar.gz
CMake-9e3b559b6a30b8b5734849fc21a9cea1b0e2874f.tar.bz2
Tests: Update cmake_minimum_required versions to 3.10
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/CMakeLists.txt3
-rw-r--r--Tests/Complex/Executable/complex.cxx4
-rw-r--r--Tests/Complex/Library/CMakeLists.txt2
-rw-r--r--Tests/Complex/Library/test_preprocess.cmake2
-rw-r--r--Tests/Complex/VarTests.cmake3
5 files changed, 8 insertions, 6 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index fcc2471..3c1f995 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -1,8 +1,7 @@
#
# A more complex test case
#
-cmake_minimum_required(VERSION 2.4)
-cmake_policy(SET CMP0054 NEW)
+cmake_minimum_required(VERSION 3.10)
project (Complex)
# Inform the test if the debug configuration is getting built.
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 67a1645..50f9932 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -990,8 +990,8 @@ int main()
# endif
#endif // defined(_WIN32) && !defined(__CYGWIN__)
- if (strcmp(CMAKE_MINIMUM_REQUIRED_VERSION, "2.4") == 0) {
- cmPassed("CMAKE_MINIMUM_REQUIRED_VERSION is set to 2.4");
+ if (strcmp(CMAKE_MINIMUM_REQUIRED_VERSION, "3.10") == 0) {
+ cmPassed("CMAKE_MINIMUM_REQUIRED_VERSION is set to 3.10");
} else {
cmFailed("CMAKE_MINIMUM_REQUIRED_VERSION is not set to the expected 2.4");
}
diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt
index d216486..5ffb673 100644
--- a/Tests/Complex/Library/CMakeLists.txt
+++ b/Tests/Complex/Library/CMakeLists.txt
@@ -121,7 +121,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile" AND CMAKE_MAKE_PROGRAM)
# Custom target to try preprocessing invocation.
add_custom_target(test_preprocess ${MAYBE_ALL}
- COMMAND ${CMAKE_COMMAND} -E rm -f CMakeFiles/create_file.dir/create_file.i
+ COMMAND ${CMAKE_COMMAND} -E rm -f CMakeFiles/create_file.dir/create_file.cxx.i
COMMAND ${CMAKE_MAKE_PROGRAM} create_file.i
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/test_preprocess.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
diff --git a/Tests/Complex/Library/test_preprocess.cmake b/Tests/Complex/Library/test_preprocess.cmake
index 4c8ec21..5758ba8 100644
--- a/Tests/Complex/Library/test_preprocess.cmake
+++ b/Tests/Complex/Library/test_preprocess.cmake
@@ -1,4 +1,4 @@
-set(TEST_FILE CMakeFiles/create_file.dir/create_file.i)
+set(TEST_FILE CMakeFiles/create_file.dir/create_file.cxx.i)
file(READ ${TEST_FILE} CONTENTS)
if("${CONTENTS}" MATCHES "Unable to close")
message(STATUS "${TEST_FILE} created successfully!")
diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake
index 9761986..eacf84b 100644
--- a/Tests/Complex/VarTests.cmake
+++ b/Tests/Complex/VarTests.cmake
@@ -19,8 +19,11 @@ set(STRING_VAR "CMake is great" CACHE STRING "test a cache variable")
#
# Test VARIABLE_REQUIRES
#
+block(SCOPE_FOR POLICIES)
+cmake_policy(VERSION 2.8.12) # old enough to not set CMP0035
variable_requires(ONE_VAR
ONE_VAR_IS_DEFINED ONE_VAR)
+endblock()
#
# Test various IF/ELSE combinations