Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/build_config/debian/patches/10_cmake_cxx_version.patch
169678 views
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
index 42d6876ef57..dd2dd48f612 100644
3
--- a/CMakeLists.txt
4
+++ b/CMakeLists.txt
5
@@ -93,7 +93,11 @@ endif ()
6
# C++17 is needed by std::filesystem and parquet.
7
# C++14 is needed by Google Test >= 1.13, for all the other parts C++11 should be enough.
8
# This will silently fall back to C++14 or even C++11, whatever is supported by the compiler.
9
-set(CMAKE_CXX_STANDARD 17)
10
+if (${CMAKE_VERSION} VERSION_LESS 3.8.0)
11
+ set(CMAKE_CXX_STANDARD 14)
12
+else()
13
+ set(CMAKE_CXX_STANDARD 17)
14
+endif()
15
if (NOT "cxx_std_17" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
16
message(WARNING "Your compiler does not support C++17. Please consider upgrading your compiler toolchain.")
17
endif()
18
19