summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompilerChange
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CompilerChange')
-rw-r--r--Tests/RunCMake/CompilerChange/EmptyCompiler-override.cmake2
-rw-r--r--Tests/RunCMake/CompilerChange/EmptyCompiler-stderr.txt12
-rw-r--r--Tests/RunCMake/CompilerChange/EmptyCompiler.cmake3
3 files changed, 13 insertions, 4 deletions
diff --git a/Tests/RunCMake/CompilerChange/EmptyCompiler-override.cmake b/Tests/RunCMake/CompilerChange/EmptyCompiler-override.cmake
new file mode 100644
index 0000000..28d29e0
--- /dev/null
+++ b/Tests/RunCMake/CompilerChange/EmptyCompiler-override.cmake
@@ -0,0 +1,2 @@
+message(STATUS "CMAKE_C_COMPILER is \"${CMAKE_C_COMPILER}\"")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cc.cmake" "set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")\n")
diff --git a/Tests/RunCMake/CompilerChange/EmptyCompiler-stderr.txt b/Tests/RunCMake/CompilerChange/EmptyCompiler-stderr.txt
index 4745b25..cf3b1b3 100644
--- a/Tests/RunCMake/CompilerChange/EmptyCompiler-stderr.txt
+++ b/Tests/RunCMake/CompilerChange/EmptyCompiler-stderr.txt
@@ -1,5 +1,13 @@
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
-CMAKE_C_COMPILER= *(
-|$)
+CMAKE_C_COMPILER= *
++
+CMake Error at EmptyCompiler.cmake:2 \(enable_language\):
+ No CMAKE_C_COMPILER could be found.
+
+ Tell CMake where to find the compiler by setting either the environment
+ variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
+ the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:6 \(include\)$
diff --git a/Tests/RunCMake/CompilerChange/EmptyCompiler.cmake b/Tests/RunCMake/CompilerChange/EmptyCompiler.cmake
index c87ec49..06e9e03 100644
--- a/Tests/RunCMake/CompilerChange/EmptyCompiler.cmake
+++ b/Tests/RunCMake/CompilerChange/EmptyCompiler.cmake
@@ -1,3 +1,2 @@
+set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_LIST_DIR}/EmptyCompiler-override.cmake)
enable_language(C)
-message(STATUS "CMAKE_C_COMPILER is \"${CMAKE_C_COMPILER}\"")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cc.cmake" "set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")\n")