summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2024-02-09 06:51:41 -0500
committerGitHub <noreply@github.com>2024-02-09 06:51:41 -0500
commit63f53de380732ab4c088c6b6d7eb48e33310eea9 (patch)
tree881bff344bce6d2d22bab9032dfa9c894f0fbafc /CMakeLists.txt
parentdd11815cd97c9a427bc06e8d3efbb8b7f2bd7712 (diff)
Use C++14 by default when building on systems that support it. (#16972)
This is needed to properly support the latest versions of Protobuf.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48326c887b..944a5105ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,7 +60,13 @@ project(netdata
find_package(PkgConfig REQUIRED)
set(CMAKE_C_STANDARD 11)
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 14)
+
+option(USE_CXX_11 "use C++11 instead of C++14" False)
+
+if(USE_CXX_11)
+ set(CMAKE_CXX_STANDARD 11)
+endif()
set(CMAKE_C_STANDARD_REQUIRED On)
set(CMAKE_CXX_STANDARD_REQUIRED On)