diff options
author | Ken Martin <ken.martin@kitware.com> | 2006-07-24 20:13:33 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2006-07-24 20:13:33 (GMT) |
commit | e206d580275d564518ee55114a50d3bd3a2100d8 (patch) | |
tree | f4b00f8e1c9ff8dfde83151898ad19cac6996314 /Modules/Platform | |
parent | 42819b7a5d99caa0d7415408358d99048ca234b0 (diff) | |
download | CMake-e206d580275d564518ee55114a50d3bd3a2100d8.zip CMake-e206d580275d564518ee55114a50d3bd3a2100d8.tar.gz CMake-e206d580275d564518ee55114a50d3bd3a2100d8.tar.bz2 |
BUG: fix for CXX only projects
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index 3c71c60..594029b 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -86,7 +86,11 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles") "${CMAKE_ROOT}/Modules/CMakeTestNMakeCLVersion.c") STRING(REGEX REPLACE "/" "\\\\" testNmakeCLVersionFile "${testNmakeCLVersionFile}") MESSAGE(STATUS "Check for CL compiler version") - EXEC_PROGRAM(${CMAKE_C_COMPILER} + SET(CMAKE_TEST_COMPILER ${CMAKE_C_COMPILER}) + IF (NOT CMAKE_C_COMPILER) + SET(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER}) + ENDIF(NOT CMAKE_C_COMPILER) + EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ARGS /nologo -EP \"${testNmakeCLVersionFile}\" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN @@ -139,7 +143,7 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles") "${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx") STRING(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}") MESSAGE(STATUS "Check if this is a free VC compiler") - EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2 + EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2 ARGS /nologo /MD /EHsc \"${testForFreeVCFile}\" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT @@ -160,7 +164,7 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles") ENDIF(CMAKE_COMPILER_RETURN) MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3") MESSAGE(STATUS "Check CL platform") - EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3 + EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3 ARGS /nologo \"${testForFreeVCFile}\" /link /machine:i386 |