BUG: Fixed order of options to cl for 32-bit/64-bit test to work with VS 6 NMake.

This commit is contained in:
Brad King 2006-03-30 16:55:19 -05:00
parent eb31755eb2
commit f0e8c750d1
1 changed files with 5 additions and 4 deletions

View File

@ -141,10 +141,11 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles")
SET(CMAKE_USING_VC_FREE_TOOLS 0)
ENDIF(CMAKE_COMPILER_RETURN)
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp3")
MESSAGE(STATUS "Check for CL win64")
MESSAGE(STATUS "Check CL platform")
EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp3
ARGS /nologo /link /machine:i386
ARGS /nologo
\"${testForFreeVCFile}\"
/link /machine:i386
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
RETURN_VALUE CMAKE_COMPILER_RETURN
)
@ -154,13 +155,13 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles")
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining if this is a 64 bit system passed:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
MESSAGE(STATUS "Check if this is a 64 bit system - yes")
MESSAGE(STATUS "Check CL platform - 64 bit")
SET(CMAKE_CL_64 1)
ELSE(CMAKE_COMPILER_RETURN)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining if this is a 32 bit system passed:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
MESSAGE(STATUS "Check if this is 32 bit system - yes")
MESSAGE(STATUS "Check CL platform - 32 bit")
SET(CMAKE_CL_64 0)
ENDIF(CMAKE_COMPILER_RETURN)
ENDIF(NOT CMAKE_VC_COMPILER_TESTS_RUN)