aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-11-30 01:29:06 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-11-30 01:29:06 +0300
commit5bd5f30fb1d9aa11a9473995e634f8affac1c818 (patch)
treea825e96716bdc70dd821482292f11f971adbb4f7
parentbetter toolset identification (diff)
downloadcmake-common-5bd5f30fb1d9aa11a9473995e634f8affac1c818.tar.gz
cmake-common-5bd5f30fb1d9aa11a9473995e634f8affac1c818.zip
C++17 by default
Diffstat (limited to '')
-rw-r--r--common.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/common.cmake b/common.cmake
index 57451ab..911a160 100644
--- a/common.cmake
+++ b/common.cmake
@@ -21,6 +21,7 @@ endif()
set(USE_STATIC_RUNTIME "${is_root_project}" CACHE BOOL "Link the runtime statically")
set(STRIP_SYMBOL_TABLE "${is_root_project}" CACHE BOOL "Strip symbol tables")
+set(CXX_STANDARD "17" CACHE BOOL "Set C++ standard version")
if(is_root_project)
if(MSVC)
@@ -32,7 +33,7 @@ if(is_root_project)
endif()
endif()
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD "${CXX_STANDARD}")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)