From c564ca9fd03ad37bdbdca676558351b47af84455 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 31 Jul 2014 08:59:12 +0200 Subject: [PATCH] CMake: Fix various bugs in check_01_cxx_features 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index f464702949..94c57fd104 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -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. ## @@ -40,12 +40,12 @@ 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() -- 2.39.5