Commit 7e699189 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

CMakeLists updated to detect compiler-features

parent 65729524
......@@ -267,6 +267,14 @@ else()
add_library(muparser SHARED ${MUPARSER_SRC})
endif()
if (${CMAKE_VERSION} VERSION_GREATER "3.0")
foreach(feature in ${REQUIRED_CXX_FEATURES})
target_compile_features(amdis INTERFACE feature)
target_compile_features(muparser INTERFACE feature)
endforeach(feature)
endif ()
list(APPEND AMDIS_LIBS amdis ${Boost_LIBRARIES})
# some special treatements for Windows systems
......
......@@ -5,6 +5,7 @@ if (ENABLE_CXX11)
if (${CMAKE_VERSION} VERSION_GREATER "3.0")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(REQUIRED_CXX_FEATURES "cxx_alias_templates" "cxx_auto_type" "cxx_lambdas" "cxx_override" "cxx_range_for" "cxx_static_assert" "cxx_variadic_templates")
else()
if (CMAKE_COMPILER_IS_GNUCXX)
set(GXX_MIN_VER "4.8")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment