diff options
Diffstat (limited to 'Tests/RunCMake/CMP0132')
-rw-r--r-- | Tests/RunCMake/CMP0132/CMP0132-Common.cmake | 15 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/CMP0132-NEW-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/CMP0132-NEW.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/CMP0132-OLD-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/CMP0132-OLD.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/CMP0132-WARN-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/CMP0132-WARN.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0132/RunCMakeTest.cmake | 7 |
9 files changed, 34 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0132/CMP0132-Common.cmake b/Tests/RunCMake/CMP0132/CMP0132-Common.cmake new file mode 100644 index 0000000..796f61c --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMP0132-Common.cmake @@ -0,0 +1,15 @@ +if(NOT "$ENV{CC}" STREQUAL "") + message(STATUS "Test environment already sets CC, test being SKIPPED") + return() +elseif(CMAKE_GENERATOR MATCHES "Xcode|Visual Studio") + message(STATUS "This generator never sets CC, test being SKIPPED") + return() +endif() + +enable_language(C) + +if("$ENV{CC}" STREQUAL "") + message(STATUS "CC was left unset") +else() + message(STATUS "CC was set to $ENV{CC}") +endif() diff --git a/Tests/RunCMake/CMP0132/CMP0132-NEW-stdout.txt b/Tests/RunCMake/CMP0132/CMP0132-NEW-stdout.txt new file mode 100644 index 0000000..8056c2c --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMP0132-NEW-stdout.txt @@ -0,0 +1 @@ +SKIPPED|CC was left unset diff --git a/Tests/RunCMake/CMP0132/CMP0132-NEW.cmake b/Tests/RunCMake/CMP0132/CMP0132-NEW.cmake new file mode 100644 index 0000000..fabb419 --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMP0132-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0132 NEW) +include(CMP0132-Common.cmake) diff --git a/Tests/RunCMake/CMP0132/CMP0132-OLD-stdout.txt b/Tests/RunCMake/CMP0132/CMP0132-OLD-stdout.txt new file mode 100644 index 0000000..c131428 --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMP0132-OLD-stdout.txt @@ -0,0 +1 @@ +SKIPPED|CC was set diff --git a/Tests/RunCMake/CMP0132/CMP0132-OLD.cmake b/Tests/RunCMake/CMP0132/CMP0132-OLD.cmake new file mode 100644 index 0000000..aae4f2a --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMP0132-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0132 OLD) +include(CMP0132-Common.cmake) diff --git a/Tests/RunCMake/CMP0132/CMP0132-WARN-stdout.txt b/Tests/RunCMake/CMP0132/CMP0132-WARN-stdout.txt new file mode 100644 index 0000000..c131428 --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMP0132-WARN-stdout.txt @@ -0,0 +1 @@ +SKIPPED|CC was set diff --git a/Tests/RunCMake/CMP0132/CMP0132-WARN.cmake b/Tests/RunCMake/CMP0132/CMP0132-WARN.cmake new file mode 100644 index 0000000..c07e5db --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMP0132-WARN.cmake @@ -0,0 +1,2 @@ + +include(CMP0132-Common.cmake) diff --git a/Tests/RunCMake/CMP0132/CMakeLists.txt b/Tests/RunCMake/CMP0132/CMakeLists.txt new file mode 100644 index 0000000..5ff8d3e --- /dev/null +++ b/Tests/RunCMake/CMP0132/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.23) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0132/RunCMakeTest.cmake b/Tests/RunCMake/CMP0132/RunCMakeTest.cmake new file mode 100644 index 0000000..db599ce --- /dev/null +++ b/Tests/RunCMake/CMP0132/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCMake) + +if(NOT CMAKE_GENERATOR_NO_COMPILER_ENV) + run_cmake(CMP0132-WARN) + run_cmake(CMP0132-OLD) + run_cmake(CMP0132-NEW) +endif() |