Add support for CMake policy CMP0077

This commit is contained in:
JB_12 2021-05-16 22:49:02 +01:00
parent 87133ef6b7
commit 181c22f798

View File

@ -15,6 +15,13 @@ message(STATUS "Build spdlog: ${SPDLOG_VERSION}")
include(GNUInstallDirs) 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 # Set default build to release
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------