summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Widen <andreas@harmonicflow.org>2019-07-17 18:51:28 +0200
committerAndreas Widen <andreas@harmonicflow.org>2019-07-17 18:51:28 +0200
commita3e659e4e699b1247813c44c5b65f297f93256a3 (patch)
tree39c08d282d8dd716a2e2ae78de8532d810bf087f
parentbcf8e0f8539e2b1da3b5dfb87bc43d495fd0e5b0 (diff)
downloadHarmonicFlowFramework-a3e659e4e699b1247813c44c5b65f297f93256a3.tar.xz
HarmonicFlowFramework-a3e659e4e699b1247813c44c5b65f297f93256a3.zip
Require C++14 capable compiler '-std=c++14'.
Signed-off-by: Andreas Widen <andreas@harmonicflow.org>
-rw-r--r--cmake/macros.cmake9
-rw-r--r--configure.ac17
2 files changed, 7 insertions, 19 deletions
diff --git a/cmake/macros.cmake b/cmake/macros.cmake
index 6848ebf..47f88f1 100644
--- a/cmake/macros.cmake
+++ b/cmake/macros.cmake
@@ -54,12 +54,9 @@ macro(check_compiler_capabilities)
endif()
if(HF_USE_GNUCXX OR HF_USE_CLANG)
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
- CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- if(COMPILER_SUPPORTS_CXX11)
- list(APPEND EXTRA_CXX_FLAGS -std=c++11)
- elseif(COMPILER_SUPPORTS_CXX0X)
- list(APPEND EXTRA_CXX_FLAGS -std=c++0x)
+ CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
+ if(COMPILER_SUPPORTS_CXX14)
+ list(APPEND EXTRA_CXX_FLAGS -std=c++14)
else()
message(STATUS
"The compiler ${CMAKE_CXX_COMPILER} has no C++11 support."
diff --git a/configure.ac b/configure.ac
index 40e84c1..4a30d38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,22 +166,13 @@ case "$host" in
esac
AC_MSG_RESULT($have_b_dynamic)
-# Checking for Standard C++ 11 compiler flag: -std=c++0x:
-# (gcc version < 4.7)
-saved_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="-Werror -std=c++0x"
-AC_MSG_CHECKING([whether CXX supports -std=c++0x])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [AC_MSG_RESULT([yes]); \
-HF_CPP_STD="-std=c++0x" ], [AC_MSG_RESULT([no])])
-CXXFLAGS="$saved_CXXFLAGS"
-
-# Checking for Standard C++ 11 compiler flag: -std=c++11:
+# Checking for Standard C++ 14 compiler flag: -std=c++14:
# (gcc version >= 4.7)
saved_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="-Werror -std=c++11"
-AC_MSG_CHECKING([whether CXX supports -std=c++11])
+CXXFLAGS="-Werror -std=c++14"
+AC_MSG_CHECKING([whether CXX supports -std=c++14])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [AC_MSG_RESULT([yes]); \
-HF_CPP_STD="-std=c++11" ], [AC_MSG_RESULT([no])])
+HF_CPP_STD="-std=c++14" ], [AC_MSG_RESULT([no])])
CXXFLAGS="$saved_CXXFLAGS"
# Windows Direct3D9 arg