From 4009ed07e7da3fc4236b736a4860a7d3d1a6d330 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 17 Jul 2021 18:12:07 +0200 Subject: [PATCH] Find find_package(Boost CONFIG) if cmake_minimum_required is <= 3.2 --- BoostConfig.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BoostConfig.cmake b/BoostConfig.cmake index 1402bf5..fd17821 100644 --- a/BoostConfig.cmake +++ b/BoostConfig.cmake @@ -235,6 +235,10 @@ set(Boost_VERSION_MACRO ${Boost_VERSION_MAJOR}0${Boost_VERSION_MINOR}0${Boost_VE get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES) set(Boost_LIBRARIES "") +# Save project's policies +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST + # Find components if("ALL" IN_LIST Boost_FIND_COMPONENTS) @@ -280,3 +284,6 @@ endif() if("ALL" IN_LIST Boost_FIND_COMPONENTS) set(Boost_ALL_FOUND ${boost_headers_FOUND}) endif() + +# Restore project's policies +cmake_policy(POP)