diff --git a/src/cmake/stir_lib_target.cmake b/src/cmake/stir_lib_target.cmake index 53481e4b0..56884b214 100644 --- a/src/cmake/stir_lib_target.cmake +++ b/src/cmake/stir_lib_target.cmake @@ -18,13 +18,8 @@ target_include_directories(${dir} PUBLIC $ $) -# make sure that if you use STIR, the compiler will be set to at least C++11 -if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.8.0") - target_compile_features(${dir} PUBLIC cxx_std_11) -else() - # Older CMake didn't have cxx_std_11 yet, but using auto will presumably force it anyway - target_compile_features(${dir} PUBLIC cxx_auto_type) -endif() +# make sure that if you use STIR, the compiler will be set to what was set via UseCXX +target_compile_features(${dir} PUBLIC cxx_std_${CMAKE_CXX_STANDARD}) target_include_directories(${dir} PUBLIC ${Boost_INCLUDE_DIR}) SET_PROPERTY(TARGET ${dir} PROPERTY FOLDER "Libs")