From 247539cb5a21814647aaf9f72031c000cbd49fe6 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 25 May 2020 11:12:01 +0200 Subject: [PATCH] Set cxx standard as cache variable for when toolchain file is not used --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5b046f..91a4111 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,9 @@ set( CACHE FILEPATH "Default toolchain" ) - +set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard") +set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Require C++ standard to be supported") +set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default") option(HUNTER_ENABLED "Enable Hunter package manager" OFF) include("cmake/HunterGate.cmake")