From 485a940e4c2b07f08e70b6e04733feb724bb6f3f Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 23 Aug 2012 11:20:48 -0400 Subject: VS: Simplify MSVC version reporting Teach Windows-cl.cmake to use CMAKE_(C|CXX)_COMPILER_VERSION to set the "MSVC##" and MSVC_VERSION variables. It no longer needs the IDE generator to dictate the version or to detect the version by running the command-line tool for NMake and Ninja generators. Drop configuration of CMakeCPlatform.cmake and CMakeCXXPlatform.cmake from Windows-cl.cmake.in because all the results it saved are now cheap to compute every time. --- Modules/CMakeTestCXXCompiler.cmake | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Modules/CMakeTestCXXCompiler.cmake') diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index 5ed826b784..3aa2075aeb 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -34,11 +34,6 @@ endif() if(NOT CMAKE_CXX_COMPILER_WORKS) PrintTestCompilerStatus("CXX" " -- 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${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") -- cgit v1.2.1