summaryrefslogtreecommitdiff
path: root/Modules/CMakeTestCXXCompiler.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-04-18 14:37:04 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2009-04-18 14:37:04 -0400
commitad113d4df2632ed4a8f5233ca9319c6092c39fd6 (patch)
tree6e77edd34c7811c65f0ced57a8bf04ca79ca2213 /Modules/CMakeTestCXXCompiler.cmake
parent7929462a3974e397d75d64bdd3492059107255e3 (diff)
downloadcmake-ad113d4df2632ed4a8f5233ca9319c6092c39fd6.tar.gz
BUG: fix cmake so that if you configure with a bad env for cl, then with a good path, it will configure correctly
Diffstat (limited to 'Modules/CMakeTestCXXCompiler.cmake')
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 47a315a7fc..dfa1aae2b9 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -19,6 +19,11 @@ ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
IF(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken")
+ # if the compiler is broken make sure to remove the platform file
+ # since Windows-cl configures both c/cxx files both need to be removed
+ # when c or c++ fails
+ FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake )
+ FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler works failed with "
"the following output:\n${OUTPUT}\n\n")