adjust verbosity, move debug/release variables in the right section cmake_pascal
authorkoda
Wed, 20 Mar 2013 18:31:13 +0100
branchcmake_pascal
changeset 8821 e85ff6e298b5
parent 8819 8e25b820b360
child 8823 65b430b6cd68
adjust verbosity, move debug/release variables in the right section
CMakeLists.txt
cmake_modules/CMakePascalInformation.cmake
hedgewars/CMakeLists.txt
misc/libphysfs/CMakeLists.txt
--- a/CMakeLists.txt	Tue Mar 19 18:32:22 2013 +0100
+++ b/CMakeLists.txt	Wed Mar 20 18:31:13 2013 +0100
@@ -211,7 +211,7 @@
 if(NOT ${MINIMAL_CFLAGS})
     add_flag_append(CMAKE_C_FLAGS "-pipe")
     add_flag_append(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer")
-    add_flag_append(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG")
+    add_flag_append(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -DDEBUG")
     add_flag_append(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
     add_flag_append(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
     add_flag_append(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
@@ -252,8 +252,9 @@
                  "-O2"                      # optimise for faster code
                  )
 
-add_flag_append(CMAKE_Pascal_FLAGS "-vm4079,4080,4081 -Cs2000000 -vewnq")
-add_flag_append(CMAKE_Pascal_FLAGS_DEBUG "-O- -g -gl -gv")
+#-vm4079,4080,4081
+add_flag_append(CMAKE_Pascal_FLAGS "-Cs2000000")
+add_flag_append(CMAKE_Pascal_FLAGS_DEBUG "-O- -gv")
 add_flag_append(CMAKE_Pascal_FLAGS_RELEASE "-Os -Xs")
 
 #get BUILD_TYPE and enable/disable optimisation
--- a/cmake_modules/CMakePascalInformation.cmake	Tue Mar 19 18:32:22 2013 +0100
+++ b/cmake_modules/CMakePascalInformation.cmake	Wed Mar 20 18:31:13 2013 +0100
@@ -7,8 +7,15 @@
     ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
 include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
 
+# This section should actually be in Platform/${CMAKE_SYSTME_NAME}-fpc.cmake
+set(CMAKE_Pascal_FLAGS_INIT "-l- -v0ewn")
+set(CMAKE_Pascal_FLAGS_DEBUG_INIT "-g -gl -gp -gh")
+set(CMAKE_Pascal_FLAGS_MINSIZEREL_INIT "-Os -dNDEBUG")
+set(CMAKE_Pascal_FLAGS_RELEASE_INIT "-O3 -dNDEBUG")
+set(CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -gl -gp")
+
 # This should be included before the _INIT variables are
-# used to initialize the cache.  Since the rule variables
+# used to initialize the cache. Since the rule variables
 # have if blocks on them, users can still define them here.
 # But, it should still be after the platform file so changes can
 # be made to those values.
@@ -186,13 +193,13 @@
 endif(CMAKE_Pascal_STANDARD_LIBRARIES_INIT)
 
 if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
-  SET (CMAKE_Pascal_FLAGS_DEBUG "${CMAKE_Ada_FLAGS_DEBUG_INIT}" CACHE STRING
+  SET (CMAKE_Pascal_FLAGS_DEBUG "${CMAKE_Pascal_FLAGS_DEBUG_INIT}" CACHE STRING
      "Flags used by the compiler during debug builds.")
-  SET (CMAKE_Pascal_FLAGS_MINSIZEREL "${CMAKE_Ada_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+  SET (CMAKE_Pascal_FLAGS_MINSIZEREL "${CMAKE_Pascal_FLAGS_MINSIZEREL_INIT}" CACHE STRING
      "Flags used by the compiler during release minsize builds.")
-  SET (CMAKE_Pascal_FLAGS_RELEASE "${CMAKE_Ada_FLAGS_RELEASE_INIT}" CACHE STRING
+  SET (CMAKE_Pascal_FLAGS_RELEASE "${CMAKE_Pascal_FLAGS_RELEASE_INIT}" CACHE STRING
      "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
-  SET (CMAKE_Pascal_FLAGS_RELWITHDEBINFO "${CMAKE_Ada_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+  SET (CMAKE_Pascal_FLAGS_RELWITHDEBINFO "${CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
      "Flags used by the compiler during Release with Debug Info builds.")
 endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
 
--- a/hedgewars/CMakeLists.txt	Tue Mar 19 18:32:22 2013 +0100
+++ b/hedgewars/CMakeLists.txt	Wed Mar 20 18:31:13 2013 +0100
@@ -106,7 +106,7 @@
     message(FATAL_ERROR "Freepascal ${FREEPASCAL_VERSION} is too old, minimum version required is ${required_fpc_version}")
 elseif(FREEPASCAL_VERSION VERSION_GREATER 2.4)
     #enable INLINE only with a recent version of fpc
-    add_flag_append(CMAKE_Pascal_FLAGS_RELEASE -Si)
+    add_flag_prepend(CMAKE_Pascal_FLAGS_RELEASE -Si)
 endif()
 
 
--- a/misc/libphysfs/CMakeLists.txt	Tue Mar 19 18:32:22 2013 +0100
+++ b/misc/libphysfs/CMakeLists.txt	Wed Mar 20 18:31:13 2013 +0100
@@ -51,7 +51,7 @@
 # Add some gcc-specific command lines.
 if(CMAKE_COMPILER_IS_GNUCC)
     # Always build with debug symbols...you can strip it later.
-    add_definitions(-g -pipe -Werror -fsigned-char)
+    add_definitions(-g -pipe -fsigned-char)
 
     # Stupid BeOS generates warnings in the system headers.
     if(NOT BEOS)