From 181c22f798e209ed1130776bfffece18e5b9b11e Mon Sep 17 00:00:00 2001 From: JB_12 Date: Sun, 16 May 2021 22:49:02 +0100 Subject: [PATCH] Add support for CMake policy CMP0077 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9694655..6258defd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,13 @@ message(STATUS "Build spdlog: ${SPDLOG_VERSION}") include(GNUInstallDirs) +# --------------------------------------------------------------------------------------- +# Set CMake policies to support later version behaviour +# --------------------------------------------------------------------------------------- +if(POLICY CMP0077) + cmake_policy(SET CMP0077 NEW) # option() honors variables already set +endif() + # --------------------------------------------------------------------------------------- # Set default build to release # ---------------------------------------------------------------------------------------