diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-22 18:42:05 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-22 18:42:05 (GMT) |
commit | 692ba48c4e5762b370f2999e902b8bd677c77161 (patch) | |
tree | 0c9465d0e38a15bd0cb043f234b4e4ab0cee51a2 /Modules/Platform/Windows-cl.cmake | |
parent | 597185754420db18d83b2c9e3b9f1e33675bd935 (diff) | |
download | CMake-692ba48c4e5762b370f2999e902b8bd677c77161.zip CMake-692ba48c4e5762b370f2999e902b8bd677c77161.tar.gz CMake-692ba48c4e5762b370f2999e902b8bd677c77161.tar.bz2 |
ENH: major changes to support addition of languages from cmake modules directory.
Diffstat (limited to 'Modules/Platform/Windows-cl.cmake')
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index f71beb7..32f8396 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -32,6 +32,7 @@ SET(CMAKE_C_COMPILE_OBJECT SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> /nologo ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") +ENABLE_LANGUAGE(RC) SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>") SET(CMAKE_CXX_LINK_EXECUTABLE @@ -60,35 +61,38 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 8") SET(CMAKE_COMPILER_2005 1) ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8") IF(CMAKE_GENERATOR MATCHES "NMake Makefiles") - EXEC_PROGRAM(${CMAKE_C_COMPILER} - ARGS /nologo -EP \"${CMAKE_ROOT}/Modules/CMakeTestNMakeCLVersion.c\" - OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT - RETURN_VALUE CMAKE_COMPILER_RETURN - ) - IF(NOT CMAKE_COMPILER_RETURN) - IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[3-9][0-9][0-9].*" ) - SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0) - ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[3-9][0-9][0-9].*" ) - IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[4-9][0-9][0-9].*" ) - 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. - EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ${CMAKE_BINARY_DIR}/CMakeTmp - ARGS /nologo /MD /EHsc - \"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx\" - OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT - RETURN_VALUE CMAKE_COMPILER_RETURN - ) - IF(CMAKE_COMPILER_RETURN) - SET(CMAKE_USING_VC_FREE_TOOLS 1) - ELSE(CMAKE_COMPILER_RETURN) - SET(CMAKE_USING_VC_FREE_TOOLS 0) - ENDIF(CMAKE_COMPILER_RETURN) - + IF(NOT CMAKE_VC_COMPILER_TESTS_RUN) + SET(CMAKE_VC_COMPILER_TESTS 1) + EXEC_PROGRAM(${CMAKE_C_COMPILER} + ARGS /nologo -EP \"${CMAKE_ROOT}/Modules/CMakeTestNMakeCLVersion.c\" + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT + RETURN_VALUE CMAKE_COMPILER_RETURN + ) + IF(NOT CMAKE_COMPILER_RETURN) + IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[3-9][0-9][0-9].*" ) + SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0) + ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[3-9][0-9][0-9].*" ) + IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[4-9][0-9][0-9].*" ) + SET(CMAKE_COMPILER_2005 1) + ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[4-9][0-9][0-9].*" ) + ENDIF(NOT CMAKE_COMPILER_RETURN) + # 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. + MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeTmp2") + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ${CMAKE_BINARY_DIR}/CMakeTmp2 + ARGS /nologo /MD /EHsc + \"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx\" + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT + RETURN_VALUE CMAKE_COMPILER_RETURN + ) + IF(CMAKE_COMPILER_RETURN) + SET(CMAKE_USING_VC_FREE_TOOLS 1) + ELSE(CMAKE_COMPILER_RETURN) + SET(CMAKE_USING_VC_FREE_TOOLS 0) + ENDIF(CMAKE_COMPILER_RETURN) + SET(CMAKE_VC_COMPILER_TESTS_RUN 1 CACHE INTERNAL "") + ENDIF(NOT CMAKE_VC_COMPILER_TESTS_RUN) ENDIF(CMAKE_GENERATOR MATCHES "NMake Makefiles") |