From b062c5d0248158a4fd4b1c71abf7bf057032654e Mon Sep 17 00:00:00 2001 From: Denis Arnaud Date: Sun, 31 May 2020 14:34:06 +0200 Subject: [PATCH] [Config] Fixed a typo in a CMake list --- config/FindBoost.cmake | 12 ++++++++---- config/project_config_embeddable.cmake | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/config/FindBoost.cmake b/config/FindBoost.cmake index 1e815a0..80d11bd 100644 --- a/config/FindBoost.cmake +++ b/config/FindBoost.cmake @@ -248,7 +248,9 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) # Save project's policies cmake_policy(PUSH) cmake_policy(SET CMP0057 NEW) # if IN_LIST -cmake_policy(SET CMP0102 NEW) # if mark_as_advanced(non_cache_var) +if (POLICY CMP0102) + cmake_policy(SET CMP0102 NEW) # if mark_as_advanced(non_cache_var) +endif (POLICY CMP0102) function(_boost_get_existing_target component target_var) set(names "${component}") @@ -1644,9 +1646,11 @@ if(Boost_INCLUDE_DIR) set(Boost_VERSION_STRING "${Boost_VERSION_MAJOR}.${Boost_VERSION_MINOR}.${Boost_VERSION_PATCH}") # Define final Boost_VERSION - cmake_policy(GET CMP0093 _Boost_CMP0093 - PARENT_SCOPE # undocumented, do not use outside of CMake - ) + if (POLICY CMP0093) + cmake_policy(GET CMP0093 _Boost_CMP0093 + PARENT_SCOPE # undocumented, do not use outside of CMake + ) + endif (POLICY CMP0093) if("x${_Boost_CMP0093}x" STREQUAL "xNEWx") set(Boost_VERSION ${Boost_VERSION_STRING}) else() diff --git a/config/project_config_embeddable.cmake b/config/project_config_embeddable.cmake index 6b79c6c..794e0cb 100644 --- a/config/project_config_embeddable.cmake +++ b/config/project_config_embeddable.cmake @@ -696,7 +696,7 @@ macro (get_boost) # distribution, it can be libboost_python3 or libboost_python3x if (${Boost_PYTHON3_FOUND}) set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name1}) - list (BOOST_REQUIRED_COMPONENTS ${python_cpt_name2}) + list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2}) endif (${Boost_PYTHON3_FOUND}) if (${Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND})