Skip to content
Snippets Groups Projects
Commit 131878ce authored by Olivier Ldff's avatar Olivier Ldff Committed by Olivier LDff
Browse files

use target_compile_features to use c++11 if cmake > 3.8

If target_compile_features is available and cxx_std_11.
This fix compilation with clang and gcc when c++11 isn't specified by user.
parent aee0f9d9
No related branches found
No related tags found
No related merge requests found
......@@ -188,6 +188,10 @@ function(cxx_library_with_type name type cxx_flags)
endif()
target_link_libraries(${name} PUBLIC ${threads_spec})
endif()
if (NOT "${CMAKE_VERSION}" VERSION_LESS "3.8")
target_compile_features(${name} PUBLIC cxx_std_11)
endif()
endfunction()
########################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment