diff --git a/AMDiS/CMakeLists.txt b/AMDiS/CMakeLists.txt index 4cd7fc577c14e5d5211e8c8c61c92ff80fd96bb6..b0a3da6ceb0ed87c13b4e146da634d8645f8aea6 100644 --- a/AMDiS/CMakeLists.txt +++ b/AMDiS/CMakeLists.txt @@ -268,13 +268,6 @@ else() 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 diff --git a/AMDiS/cmake/dummy.cc b/AMDiS/cmake/dummy.cc new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/AMDiS/cmake/enable_cxx11.cmake b/AMDiS/cmake/enable_cxx11.cmake index 9c3972305b99eee4cfa2ae67b4a4188605b8819d..c8fb56ccabc68000fd07b41f10bdfa0eb5d52023 100644 --- a/AMDiS/cmake/enable_cxx11.cmake +++ b/AMDiS/cmake/enable_cxx11.cmake @@ -6,6 +6,11 @@ if (ENABLE_CXX11) 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") + + add_library(test_compiler_features dummy.cc) + foreach(feature ${REQUIRED_CXX_FEATURES}) + target_compile_features(test_compiler_features PUBLIC ${feature}) + endforeach(feature) else() if (CMAKE_COMPILER_IS_GNUCXX) set(GXX_MIN_VER "4.8")