[Orxonox-commit 809] r3330 - in trunk: cmake src

rgrieder at orxonox.net rgrieder at orxonox.net
Tue Jul 21 11:53:13 CEST 2009


Author: rgrieder
Date: 2009-07-21 11:53:13 +0200 (Tue, 21 Jul 2009)
New Revision: 3330

Modified:
   trunk/cmake/BuildConfig.cmake
   trunk/cmake/TargetUtilities.cmake
   trunk/src/CMakeLists.txt
Log:
Added general PCH_ENABLE option in CMake to disable PCH with one simple option (use cmake -DPCH_ENABLE=FALSE when configuring).
Also moved all build-related options to BuildConfig and moved some code around there.

Modified: trunk/cmake/BuildConfig.cmake
===================================================================
--- trunk/cmake/BuildConfig.cmake	2009-07-19 17:05:00 UTC (rev 3329)
+++ trunk/cmake/BuildConfig.cmake	2009-07-21 09:53:13 UTC (rev 3330)
@@ -24,7 +24,7 @@
  #    This also includes handling the OGRE plugins and the media directory.
  #
 
-################# Misc Options ##################
+################# Misc Settings #################
 
 # Standard path suffixes, might not hold everywhere though
 SET(DEFAULT_RUNTIME_PATH bin)
@@ -69,14 +69,7 @@
   MARK_AS_ADVANCED(CMAKE_BUILD_TYPE)
 ENDIF()
 
-# Enable expensive optimisations: Use this for a binary release build
-OPTION(ORXONOX_RELEASE "Enable when building restributable releases" FALSE)
 
-# Use WinMain() or main()?
-IF(WIN32)
-  OPTION(ORXONOX_USE_WINMAIN "Use WinMain (doesn't show console) or main" FALSE)
-ENDIF()
-
 ################# OGRE Plugins ##################
 
 # More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
@@ -123,9 +116,6 @@
 ENDIF(USER_SCRIPT_BUILD_CONFIG)
 
 
-################# Test options ##################
-
-
 ############# Installation Settings #############
 
 SET(_info_text "Puts all installed files in subfolders of the install prefix path. That root folder can then be moved, copied and renamed as you wish. The executable will not write to folders like ~/.orxonox or \"Applictation Data\"")
@@ -186,8 +176,27 @@
 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 
 
-######## Static/Dynamic linking defines #########
+################ Various options ################
 
+# Enable expensive optimisations: Use this for a binary release build
+OPTION(ORXONOX_RELEASE "Enable when building restributable releases" FALSE)
+
+# Use WinMain() or main()?
+IF(WIN32)
+  OPTION(ORXONOX_USE_WINMAIN "Use WinMain (doesn't show console) or main" FALSE)
+ENDIF()
+
+# Global switch to disable Precompiled Header Files
+IF(PCH_COMPILER_SUPPORT)
+  OPTION(PCH_ENABLE "Global PCH switch" TRUE)
+ENDIF()
+
+
+############ Static/Dynamic linking #############
+
+# Default linking is SHARED
+SET(ORXONOX_DEFAULT_LINK SHARED)
+
 # Disable Boost auto linking completely
 ADD_COMPILER_FLAGS("-DBOOST_ALL_NO_LIB")
 

Modified: trunk/cmake/TargetUtilities.cmake
===================================================================
--- trunk/cmake/TargetUtilities.cmake	2009-07-19 17:05:00 UTC (rev 3329)
+++ trunk/cmake/TargetUtilities.cmake	2009-07-21 09:53:13 UTC (rev 3330)
@@ -111,7 +111,7 @@
   ENDIF()
 
   # First part (pre target) of precompiled header files
-  IF(PCH_COMPILER_SUPPORT AND _arg_PCH_FILE)
+  IF(PCH_COMPILER_SUPPORT AND PCH_ENABLE AND _arg_PCH_FILE)
     # Provide convenient option to control PCH
     STRING(TOUPPER "${_target_name}" _target_name_upper)
     IF(_arg_PCH_NO_DEFAULT)

Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt	2009-07-19 17:05:00 UTC (rev 3329)
+++ trunk/src/CMakeLists.txt	2009-07-21 09:53:13 UTC (rev 3330)
@@ -30,9 +30,6 @@
 # Tolua binding speedup if required
 ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" ORXONOX_RELEASE)
 
-# Default linking is SHARED
-SET(ORXONOX_DEFAULT_LINK SHARED)
-
 ################ OrxonoxConfig.h ################
 
 # Check endianness




More information about the Orxonox-commit mailing list