diff options
author | Brad King <brad.king@kitware.com> | 2013-02-18 15:35:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-02-20 13:01:06 (GMT) |
commit | e83e6a1c8c572548b2a8ce1e54f4fd0f60f32a70 (patch) | |
tree | a73ddfb7d5859958594e9f58cab8aa12c5d7a3bd /Tests/RunCMake/CompilerChange/EmptyCompiler.cmake | |
parent | c307e1c911dbbafb1673799212a4e5f4e211b9f8 (diff) | |
download | CMake-e83e6a1c8c572548b2a8ce1e54f4fd0f60f32a70.zip CMake-e83e6a1c8c572548b2a8ce1e54f4fd0f60f32a70.tar.gz CMake-e83e6a1c8c572548b2a8ce1e54f4fd0f60f32a70.tar.bz2 |
Test Unix Makefiles generator support for changing compilers
Add RunCMake.CompilerChange test to cover use of -DCMAKE_C_COMPILER=cc
to change the compiler of an existing build tree. Also test for proper
failure with -DCMAKE_C_COMPILER="" and no CC in the environment.
Diffstat (limited to 'Tests/RunCMake/CompilerChange/EmptyCompiler.cmake')
-rw-r--r-- | Tests/RunCMake/CompilerChange/EmptyCompiler.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompilerChange/EmptyCompiler.cmake b/Tests/RunCMake/CompilerChange/EmptyCompiler.cmake new file mode 100644 index 0000000..c87ec49 --- /dev/null +++ b/Tests/RunCMake/CompilerChange/EmptyCompiler.cmake @@ -0,0 +1,3 @@ +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") |