summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-07-26 15:15:28 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-07-26 15:15:28 (GMT)
commit47ef50453004e62510f5705185d912950e8fb68f (patch)
tree0269f9d9cd82173e35f0ed6f1a528f793a040ae0 /Modules/Platform
parent60e4fef0c607ed7846c0e635b175386eafe09721 (diff)
downloadCMake-47ef50453004e62510f5705185d912950e8fb68f.zip
CMake-47ef50453004e62510f5705185d912950e8fb68f.tar.gz
CMake-47ef50453004e62510f5705185d912950e8fb68f.tar.bz2
BUG: fix for bug 3550, for release builds do not build incremental
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Windows-cl.cmake26
1 files changed, 20 insertions, 6 deletions
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index 594029b..ba306ad 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -255,25 +255,39 @@ SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
# executable linker flags
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 "/STACK:10000000 /machine:x64 /INCREMENTAL:YES")
+ SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /machine:x64")
ELSE(CMAKE_CL_64)
- SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /machine:I386 /INCREMENTAL:YES")
+ SET (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
+# on versions that support it
IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept")
+ SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept /INCREMENTAL:YES")
+ SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept /INCREMENTAL:YES")
ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
+ SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /INCREMENTAL:YES")
+ SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /INCREMENTAL:YES")
ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+# for release and minsize release default to no incremental linking
+SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO")
+SET(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO")
+# copy the EXE_LINKER flags to SHARED and MODULE linker flags
+# shared linker flags
SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
+SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
+# module linker flags
SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
# save computed information for this platform