[Orxonox-commit 3113] r7807 - in code/forks/sandbox_qt/cmake: . tools

rgrieder at orxonox.net rgrieder at orxonox.net
Sun Dec 26 00:01:00 CET 2010


Author: rgrieder
Date: 2010-12-26 00:00:59 +0100 (Sun, 26 Dec 2010)
New Revision: 7807

Modified:
   code/forks/sandbox_qt/cmake/CompilerConfigMSVC.cmake
   code/forks/sandbox_qt/cmake/tools/TargetUtilities.cmake
Log:
Adding static linker flags (used by MSVC only).

Modified: code/forks/sandbox_qt/cmake/CompilerConfigMSVC.cmake
===================================================================
--- code/forks/sandbox_qt/cmake/CompilerConfigMSVC.cmake	2010-12-25 23:00:14 UTC (rev 7806)
+++ code/forks/sandbox_qt/cmake/CompilerConfigMSVC.cmake	2010-12-25 23:00:59 UTC (rev 7807)
@@ -146,6 +146,8 @@
 # Use Link time code generation for Release config if ORXONOX_RELEASE is defined
 IF(ORXONOX_RELEASE)
   ADD_LINKER_FLAGS("-INCREMENTAL:NO -OPT:ICF -OPT:REF -LTCG" ReleaseAll   CACHE)
+  # Static linker flags have to be added manually to a target
+  SET(ORXONOX_STATIC_LINKER_FLAGS "/LTCG")
 ELSE()
   ADD_LINKER_FLAGS("-INCREMENTAL:YES"                  RelWithDebInfo     CACHE)
   ADD_LINKER_FLAGS("-INCREMENTAL:NO -OPT:ICF -OPT:REF" Release MinSizeRel CACHE)

Modified: code/forks/sandbox_qt/cmake/tools/TargetUtilities.cmake
===================================================================
--- code/forks/sandbox_qt/cmake/tools/TargetUtilities.cmake	2010-12-25 23:00:14 UTC (rev 7806)
+++ code/forks/sandbox_qt/cmake/tools/TargetUtilities.cmake	2010-12-25 23:00:59 UTC (rev 7807)
@@ -251,6 +251,11 @@
     SET_TARGET_PROPERTIES(${_target_name} PROPERTIES COMPILE_FLAGS "${_compile_flags} -Zm1000")
   ENDIF()
 
+  # Static library flags are not globally available
+  IF(ORXONOX_STATIC_LINKER_FLAGS)
+    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES STATIC_LIBRARY_FLAGS ${ORXONOX_STATIC_LINKER_FLAGS})
+  ENDIF()
+
   # LINK_LIBRARIES
   IF(_arg_LINK_LIBRARIES)
     TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBRARIES})




More information about the Orxonox-commit mailing list