From b61c7318bcca5c88ce8d325aeab00de888a611c4 Mon Sep 17 00:00:00 2001 From: Heiko Thiel Date: Thu, 4 Jul 2019 15:23:27 +0200 Subject: [PATCH] Export C++11 as required compile feature --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 31b17e8..ee278cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,14 @@ set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1 ) +if(CMAKE_VERSION VERSION_LESS 3.8) + # CMake did not have cxx_std_11 compile feature prior to 3.8 + # We use cxx_auto_type as a proxy because this feature is a part of c++11 standard + target_compile_features(${PROJECT_NAME} PUBLIC cxx_auto_type) +else() + target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) +endif() + target_include_directories(${PROJECT_NAME} PUBLIC $ $