From 7bf0ba32a0ef9aa731b6f66fb7be892970439153 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Thu, 28 Apr 2022 12:37:50 +0100 Subject: [PATCH] CMake: Centralise C++ version and set to 17 --- CMakeLists.txt | 4 ++++ scripts/target_post.cmake | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f64c819..9cca690 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,10 @@ cmake_minimum_required(VERSION 3.11) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/release-packaging" CACHE PATH "") # message(FATAL_ERROR ${CMAKE_INSTALL_PREFIX}) diff --git a/scripts/target_post.cmake b/scripts/target_post.cmake index a54ff95..647b75a 100644 --- a/scripts/target_post.cmake +++ b/scripts/target_post.cmake @@ -30,13 +30,6 @@ target_include_directories( "${FLUID_VERSION_PATH}" ) -set_target_properties(${PROG} - PROPERTIES - CXX_STANDARD 14 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF -) - if (APPLE) #targeting <= 10.9, need to explicitly set libc++ target_compile_options(${PROG} PRIVATE -stdlib=libc++)