diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-03 19:19:58 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-03 19:19:58 (GMT) |
commit | 0d4cd0436bc1a246cc1556e000bf051fa5558582 (patch) | |
tree | d597ecc880f57e208b07f447f8db54d0ca7dde3c /Modules/Platform | |
parent | 9d19df261d51e68c45902c2607a0fdcaa889ecd2 (diff) | |
download | CMake-0d4cd0436bc1a246cc1556e000bf051fa5558582.zip CMake-0d4cd0436bc1a246cc1556e000bf051fa5558582.tar.gz CMake-0d4cd0436bc1a246cc1556e000bf051fa5558582.tar.bz2 |
ENH better test for free VC tools
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index a32d2ba..f71beb7 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -73,29 +73,22 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles") SET(CMAKE_COMPILER_2005 1) ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[4-9][0-9][0-9].*" ) ENDIF(NOT CMAKE_COMPILER_RETURN) + MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeTmp") # try to figure out if we are running the free command line # tools from Microsoft. These tools do not provide debug libraries, # so the link flags used have to be different. - FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/testForFreeVC.cxx - "#include<iostream>\n int main(){return 0;}\n") EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ${CMAKE_BINARY_DIR}/CMakeTmp ARGS /nologo /MD /EHsc - \"${CMAKE_BINARY_DIR}/CMakeTmp/testForFreeVC.cxx\" + \"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx\" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN ) - MESSAGE("OUTPUT_VARIABLE ${OUTPUT_VARIABLE}") IF(CMAKE_COMPILER_RETURN) - IF("${CMAKE_COMPILER_RETURN}" EQUAL "2") - SET(CMAKE_USING_VC_FREE_TOOLS 1) - ELSE("${CMAKE_COMPILER_RETURN}" EQUAL "2") - SET(CMAKE_USING_VC_FREE_TOOLS 0) - ENDIF("${CMAKE_COMPILER_RETURN}" EQUAL "2") + SET(CMAKE_USING_VC_FREE_TOOLS 1) ELSE(CMAKE_COMPILER_RETURN) SET(CMAKE_USING_VC_FREE_TOOLS 0) ENDIF(CMAKE_COMPILER_RETURN) - ENDIF(CMAKE_GENERATOR MATCHES "NMake Makefiles") |