]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Update the documentation
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Sep 2012 11:15:26 +0000 (11:15 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Sep 2012 11:15:26 +0000 (11:15 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26825 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/README.CMAKE

index 81ba7bf34ea595a2f0e60f318a068fd0cc929ed7..8ac36fc13dee838bf8f63a9307aa96f5d5fe4833 100644 (file)
@@ -637,11 +637,51 @@ DEVELOPMENT
   We currently have
 
     cmake/check/check_for_compiler_bugs.cmake
-
+    cmake/check/check_for_compiler_bugs_*.cmake
     cmake/check/check_for_compiler_features.cmake
-
     cmake/check/check_for_cxx_features.cmake
 
+  Useful commands:
+
+  - There are a number of readily available platform check macros:
+
+      CHECK_CXX_SOURCE_COMPILES(source variable)
+        Checks whether it is possible to compile _and_ link the code snipet
+        <source>. If succesful, variable is set to 1.
+
+      CHECK_CXX_SOURCE_RUNS(source variable)
+        variable is set to 1 if <source> coulde be succesfully compiled and
+        linked and the resulting program ran and exited wihtout error.
+
+      CHECK_CXX_COMPILER_BUG(source variable)
+        Inverts the logic of CHECK_CXX_SOURCE_COMPILES(), i.e. variable is
+        set to 1 if it was not possible to compile and link <source>.
+
+      CHECK_INCLUDE_FILE_CXX(header variable)
+        Check whether it is possible to compile and link a dummy program
+        including <header>.
+
+      CHECK_FUNCTION_EXISTS(function variable)
+        Check for the existence of a function prototype with name
+        <function>. (Don't forget to specify the link libraries, see
+        below.)
+
+  - Necessary compiler flags can easily set in the string variable
+    CMAKE_REQUIRED_FLAGS. There are two small macros that do this job
+    nicely:
+
+      PUSH_TEST_FLAG("-Werror")
+      CHECK_CXX_SOURCE_COMPILES(...)
+      POP_TEST_FLAG()
+
+  - Libraries necessary for linkage can be set in the list variable
+    CMAKE_REQUIRED_LIBRARIES. It is best two hard set this variable to a
+    specific value and later on cleaning it, instead of appending/removing:
+
+      SET(CMAKE_REQUIRED_LIBRARIES <a list of libraries>
+      CHECK_CXX_SOURCE_COMPILES(...)
+      SET(CMAKE_REQUIRED_LIBRARIES)
+
 
   General notes:
 

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.