]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Small changes on the BUILD_TYPE specific configuration
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Sep 2012 08:23:32 +0000 (08:23 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Sep 2012 08:23:32 +0000 (08:23 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26339 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/contrib/cmake/configure/configure_build.cmake [moved from deal.II/contrib/cmake/configure/configure_compiler_flags.cmake with 75% similarity]

index f4fa7657d16fa5aa63b5f6c677010c82cbbd45e3..72b65c06ba0234fb2a9920c874950e3da9f556c6 100644 (file)
@@ -1,5 +1,3 @@
-PROJECT(deal.II)
-
 SET(VERSION "8.0.pre")
 
 #
@@ -41,6 +39,13 @@ SET(VERSION "8.0.pre")
 #   separately.
 #
 #
+# And, last but not least, CMAKE_BUILD_TYPES:
+#
+# We support the "Debug" and "Release" build types. Default is the
+# "Release" target.
+#
+# TODO: Explanation
+#
 
 #
 # General configuration options:
@@ -130,6 +135,17 @@ SET(CMAKE_MODULE_PATH
   "${CMAKE_SOURCE_DIR}/contrib/cmake/modules/"
   )
 
+# We have to initialize this cached variable before PROJECT is called:
+IF(CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING
+    "Choose the type of build, options are: Debug Release.")
+ELSE()
+  SET(CMAKE_BUILD_TYPE Release CACHE STRING
+    "Choose the type of build, options are: Debug Release.")
+ENDIF()
+
+PROJECT(deal.II)
+
 
 
 #
@@ -160,6 +176,12 @@ ADD_CUSTOM_TARGET(deal_ii_target_dependencies)
 SET(deal_ii_external_libraries "")
 SET(deal_ii_required_linker_flags "")
 
+#
+# Configuration for CMAKE_BUILD_TYPES (CFLAGS, CXXFLAGS, ..)
+#
+
+INCLUDE(configure_build)
+
 #
 # Platform checks:
 #
@@ -174,8 +196,6 @@ INCLUDE(check_for_compiler_bugs)
 # Feature configuration:
 #
 
-INCLUDE(configure_compiler_flags)
-
 IF(DEAL_II_WITH_FUNCTIONPARSER)
   INCLUDE(configure_functionparser)
 ENDIF()
similarity index 75%
rename from deal.II/contrib/cmake/configure/configure_compiler_flags.cmake
rename to deal.II/contrib/cmake/configure/configure_build.cmake
index dc87f53d34df514185c4cf1e8bc27f680f0d5570..3d0847795d263e9d14ced182c963680bf2d43b09 100644 (file)
@@ -1,4 +1,11 @@
+#
+# Setup the build type and compiler flags
+#
+
+
+
 #TODO:
+
 SET(CMAKE_CXX_FLAGS "-Wfatal-errors -D_REENTRANT -fPIC -O2 -march=native")
 SET(CMAKE_C_FLAGS "-Wfatal-errors -D_REENTRANT -fPIC -O2 -march=native")
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.