[Cmake-commits] [cmake-commits] hoffman committed Windows-cl.cmake 1.93 1.94 Windows-icl.cmake 1.8 1.9
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Nov 19 21:58:44 EST 2009
Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv29303/Platform
Modified Files:
Windows-cl.cmake Windows-icl.cmake
Log Message:
Change the way 32/64 bit compiles are detected with MSVC and intel makefile builds. Use the platform ID preprocessor approach.
Index: Windows-cl.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Windows-cl.cmake,v
retrieving revision 1.93
retrieving revision 1.94
diff -C 2 -d -r1.93 -r1.94
*** Windows-cl.cmake 1 Sep 2009 18:33:26 -0000 1.93
--- Windows-cl.cmake 20 Nov 2009 02:58:42 -0000 1.94
***************
*** 142,171 ****
ENDIF(CMAKE_COMPILER_RETURN)
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3")
- MESSAGE(STATUS "Check CL platform")
- EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3
- ARGS /nologo
- \"${testForFreeVCFile}\"
- /link /machine:i386
- OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
- RETURN_VALUE CMAKE_COMPILER_RETURN
- )
- # if there was an error assume it is a 64bit system
- IF(CMAKE_COMPILER_RETURN)
- FILE(APPEND
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if this is a 64 bit system passed:\n"
- "${CMAKE_COMPILER_OUTPUT}\n\n")
- MESSAGE(STATUS "Check CL platform - 64 bit")
- SET(CMAKE_CL_64 1)
- ELSE(CMAKE_COMPILER_RETURN)
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if this is a 32 bit system passed:\n"
- "${CMAKE_COMPILER_OUTPUT}\n\n")
- MESSAGE(STATUS "Check CL platform - 32 bit")
- SET(CMAKE_CL_64 0)
- ENDIF(CMAKE_COMPILER_RETURN)
ENDIF(NOT CMAKE_VC_COMPILER_TESTS_RUN)
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_FORCE_WIN64)
SET(CMAKE_CL_64 1)
--- 142,153 ----
ENDIF(CMAKE_COMPILER_RETURN)
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3")
ENDIF(NOT CMAKE_VC_COMPILER_TESTS_RUN)
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
+ IF(MSVC_C_ARCHITECTURE_ID MATCHES 64)
+ SET(CMAKE_CL_64 1)
+ ELSE(MSVC_C_ARCHITECTURE_ID MATCHES 64)
+ SET(CMAKE_CL_64 0)
+ ENDIF(MSVC_C_ARCHITECTURE_ID MATCHES 64)
IF(CMAKE_FORCE_WIN64)
SET(CMAKE_CL_64 1)
***************
*** 236,246 ****
SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
# set the stack size and the machine type
! IF(CMAKE_CL_64)
! SET (CMAKE_EXE_LINKER_FLAGS_INIT
! "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:x64")
! ELSE(CMAKE_CL_64)
! SET (CMAKE_EXE_LINKER_FLAGS_INIT
! "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:I386")
! ENDIF(CMAKE_CL_64)
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp
--- 218,227 ----
SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
# set the stack size and the machine type
! SET(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
! IF(NOT _MACHINE_ARCH_FLAG)
! SET(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
! ENDIF(NOT _MACHINE_ARCH_FLAG)
! SET (CMAKE_EXE_LINKER_FLAGS_INIT
! "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp
Index: Windows-icl.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Windows-icl.cmake,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** Windows-icl.cmake 5 Oct 2009 17:17:53 -0000 1.8
--- Windows-icl.cmake 20 Nov 2009 02:58:42 -0000 1.9
***************
*** 72,76 ****
# executable linker flags
SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
! SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES")
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
--- 72,80 ----
# executable linker flags
SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
! SET(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
! IF(NOT _MACHINE_ARCH_FLAG)
! SET(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
! ENDIF(NOT _MACHINE_ARCH_FLAG)
! SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES /machine:${_MACHINE_ARCH_FLAG}")
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
***************
*** 83,86 ****
--- 87,91 ----
SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+
INCLUDE(Platform/Windows-Intel)
More information about the Cmake-commits
mailing list