]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Fix various bugs in check_01_cxx_features 42/head
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 31 Jul 2014 06:59:12 +0000 (08:59 +0200)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 31 Jul 2014 06:59:12 +0000 (08:59 +0200)
This commit fixes a typo of the "-std=c++0x" fallback found by Chad Balen
(mailing list).

Furthermore, the fallback logic was also broken (as reported by Wolfgang).

cmake/checks/check_01_cxx_features.cmake

index f464702949f2bfaf69a44f46578b80a087f2ce2a..94c57fd104313e380ed37e52ea5dde210cf729d9 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
 IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11)
 
   IF("${DEAL_II_CXX11_FLAG}" STREQUAL "")
+    CHECK_CXX_COMPILER_FLAG("-std=c++0x" DEAL_II_HAVE_FLAG_stdcxx0x)
     CHECK_CXX_COMPILER_FLAG("-std=c++11" DEAL_II_HAVE_FLAG_stdcxx11)
     IF(DEAL_II_HAVE_FLAG_stdcxx11)
       SET(DEAL_II_CXX11_FLAG "-std=c++11")
-    ELSEIF(DEAL_II_HAVE_FLAG_stdcxx11)
-      CHECK_CXX_COMPILER_FLAG("-std=c++0x" DEAL_II_HAVE_FLAG_stdcxx0x)
-      SET(DEAL_II_CXX11_FLAG "-std=x++0x")
+    ELSEIF(DEAL_II_HAVE_FLAG_stdcxx0x)
+      SET(DEAL_II_CXX11_FLAG "-std=c++0x")
     ENDIF()
   ENDIF()
 

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.