diff --git a/CMakeLists.txt b/CMakeLists.txt index 4eeebf15fc7..0c18b15e62a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,7 @@ cmake_policy(VERSION 3.18) hpx_set_cmake_policy(CMP0042 NEW) hpx_set_cmake_policy(CMP0060 NEW) hpx_set_cmake_policy(CMP0074 NEW) +hpx_set_cmake_policy(CMP0167 OLD) # We save the passed compiler flag to a special variable. This is needed for our # build system unit tests. Some flags might influence the created symbols diff --git a/cmake/HPX_SetupAsio.cmake b/cmake/HPX_SetupAsio.cmake index 86a33a635f0..ea17a574472 100644 --- a/cmake/HPX_SetupAsio.cmake +++ b/cmake/HPX_SetupAsio.cmake @@ -32,10 +32,7 @@ elseif(NOT TARGET Asio::asio AND NOT HPX_FIND_PACKAGE) GIT_TAG ${HPX_WITH_ASIO_TAG} ) - fetchcontent_getproperties(asio) - if(NOT asio_POPULATED) - fetchcontent_populate(asio) - endif() + fetchcontent_makeavailable(asio) set(Asio_ROOT ${asio_SOURCE_DIR}) add_library(asio INTERFACE) diff --git a/cmake/HPX_SetupBoost.cmake b/cmake/HPX_SetupBoost.cmake index 7560311b828..01b6058375d 100644 --- a/cmake/HPX_SetupBoost.cmake +++ b/cmake/HPX_SetupBoost.cmake @@ -1,5 +1,6 @@ # Copyright (c) 2018 Christopher Hinz # Copyright (c) 2014 Thomas Heller +# Copyright (c) 2007-2024 The STE||AR-Group # # SPDX-License-Identifier: BSL-1.0 # Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -81,6 +82,13 @@ if(NOT TARGET hpx_dependencies_boost) # cmake-format: off set(Boost_ADDITIONAL_VERSIONS ${Boost_ADDITIONAL_VERSIONS} + "1.85.0" "1.85" + "1.84.0" "1.84" + "1.83.0" "1.83" + "1.82.0" "1.82" + "1.81.0" "1.81" + "1.80.0" "1.80" + "1.79.0" "1.79" "1.78.0" "1.78" "1.77.0" "1.77" "1.76.0" "1.76" @@ -98,6 +106,8 @@ if(NOT TARGET hpx_dependencies_boost) set(Boost_NO_BOOST_CMAKE ON) # disable the search for boost-cmake + hpx_set_cmake_policy(CMP0167 OLD) # use CMake's FindBoost for now + # Find the headers and get the version find_package(Boost ${Boost_MINIMUM_VERSION} REQUIRED) if(NOT Boost_VERSION_STRING) diff --git a/cmake/HPX_SetupBoostFilesystem.cmake b/cmake/HPX_SetupBoostFilesystem.cmake index 44cc5f4531a..65b69a14392 100644 --- a/cmake/HPX_SetupBoostFilesystem.cmake +++ b/cmake/HPX_SetupBoostFilesystem.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023 The STE||AR-Group +# Copyright (c) 2019-2024 The STE||AR-Group # # SPDX-License-Identifier: BSL-1.0 # Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -7,6 +7,8 @@ if(HPX_FILESYSTEM_WITH_BOOST_FILESYSTEM_COMPATIBILITY) # In case find_package(HPX) is called multiple times if(NOT TARGET Boost::filesystem) + hpx_set_cmake_policy(CMP0167 OLD) # use CMake's FindBoost for now + find_package( Boost ${Boost_MINIMUM_VERSION} NO_POLICY_SCOPE MODULE COMPONENTS filesystem diff --git a/cmake/HPX_SetupBoostIostreams.cmake b/cmake/HPX_SetupBoostIostreams.cmake index 77784cd073c..92c68bf44f7 100644 --- a/cmake/HPX_SetupBoostIostreams.cmake +++ b/cmake/HPX_SetupBoostIostreams.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023 The STE||AR-Group +# Copyright (c) 2019-2024 The STE||AR-Group # # SPDX-License-Identifier: BSL-1.0 # Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -9,6 +9,8 @@ if((HPX_WITH_COMPRESSION_BZIP2 OR HPX_WITH_COMPRESSION_ZLIB) AND NOT TARGET Boost::iostreams ) + hpx_set_cmake_policy(CMP0167 OLD) # use CMake's FindBoost for now + find_package( Boost ${Boost_MINIMUM_VERSION} NO_POLICY_SCOPE MODULE COMPONENTS iostreams ) diff --git a/cmake/HPX_SetupBoostRegex.cmake b/cmake/HPX_SetupBoostRegex.cmake index 5ea12927da3..c3ab0448dbd 100644 --- a/cmake/HPX_SetupBoostRegex.cmake +++ b/cmake/HPX_SetupBoostRegex.cmake @@ -1,10 +1,12 @@ -# Copyright (c) 2019-2023 The STE||AR-Group +# Copyright (c) 2019-2024 The STE||AR-Group # # SPDX-License-Identifier: BSL-1.0 # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) if(NOT TARGET Boost::regex) + hpx_set_cmake_policy(CMP0167 OLD) # use CMake's FindBoost for now + find_package( Boost ${Boost_MINIMUM_VERSION} NO_POLICY_SCOPE MODULE COMPONENTS regex ) diff --git a/cmake/HPX_SetupTarget.cmake b/cmake/HPX_SetupTarget.cmake index 5b3f8c61950..5086f7ea822 100644 --- a/cmake/HPX_SetupTarget.cmake +++ b/cmake/HPX_SetupTarget.cmake @@ -10,6 +10,8 @@ cmake_policy(PUSH) hpx_set_cmake_policy(CMP0054 NEW) hpx_set_cmake_policy(CMP0060 NEW) +hpx_set_cmake_policy(CMP0074 NEW) +hpx_set_cmake_policy(CMP0167 OLD) function(hpx_setup_target target) # retrieve arguments