From 0caf98650595aae4e83053cf65bb4853594331ef Mon Sep 17 00:00:00 2001 From: onqtam Date: Mon, 25 Mar 2019 22:04:37 +0200 Subject: [PATCH] reverted the removal of this if/else branching - this is the easiest way to get -std=c++0x support --- test/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b2f59d5f..53fd3ae6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -65,7 +65,11 @@ set_target_properties(doctest_main PROPERTIES COMPILE_OPTIONS "$<$:/EHsc;$<$:/Od>>" ) -target_compile_features(doctest_main PUBLIC cxx_std_11) +if (${CMAKE_VERSION} VERSION_LESS "3.8.0") + target_compile_features(doctest_main PUBLIC cxx_range_for) +else() + target_compile_features(doctest_main PUBLIC cxx_std_11) +endif() target_include_directories(doctest_main PRIVATE "thirdparty/doctest") # https://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake