]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Oct 2012 13:45:59 +0000 (13:45 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Oct 2012 13:45:59 +0000 (13:45 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@27152 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/checks/check_for_cxx_features.cmake

index adb67c9c99c988bbcccf1ed8fe37492b17f75aef..dc8f29140310189aefdf02d67b6e5408e11ee8f4 100644 (file)
 #
 # See if there is a compiler flag to enable C++11 features
 #
-FOREACH(test_flag
-    "-std=c++11"
-    "-std=c++0x"
-    )
-
-  CHECK_CXX_COMPILER_FLAG("${test_flag}" DEAL_II_HAVE_CXX11_FLAG)
-
-  IF(DEAL_II_HAVE_CXX11_FLAG)
-    # We have found a CXX11_FLAG that the compiler understands
-    SET(DEAL_II_CXX11_FLAG "${test_flag}")
-    BREAK()
-  ELSE()
-    # Remove test result from cache and try the next flag in the list
-    UNSET(DEAL_II_HAVE_CXX11_FLAG CACHE)
-  ENDIF()
-
-ENDFOREACH()
+IF(NOT DEFINED DEAL_II_HAVE_CXX11_FLAG)
+  FOREACH(test_flag
+      "-std=c++11"
+      "-std=c++0x"
+      )
+    CHECK_CXX_COMPILER_FLAG("${test_flag}" DEAL_II_HAVE_CXX11_FLAG)
+
+    IF(DEAL_II_HAVE_CXX11_FLAG)
+      # We have found a CXX11_FLAG that the compiler understands
+      SET(DEAL_II_CXX11_FLAG "${test_flag}")
+      BREAK()
+    ELSE()
+      # Remove test result from cache and try the next flag in the list
+      UNSET(DEAL_II_HAVE_CXX11_FLAG CACHE)
+    ENDIF()
+  ENDFOREACH()
+ENDIF()
 
 
 IF(DEAL_II_HAVE_CXX11_FLAG)

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.