From b6bb7e677bc3b4088a9cf8fd4b61b2ea883265ec Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Wed, 23 Oct 2024 16:05:53 +0200 Subject: [PATCH] build: Unconditionally load Boost in CMake config Currently, as @krasznaa discovered, the finding of the Boost dependency in an installed version of Acts (i.e., through `ActsConfig.cmake` uses the `@ACTS_USE_SYSTEM_BOOST@` template, but this variable no longer exists. CMake, in its infinite wisdom, silently ignores this, producing `if()`, which it _again_ silently accepts and which apparently evaluates to false, so Boost is never loaded. This commit fixes the issue by ensuring that Boost is loaded unconditionally. --- cmake/ActsConfig.cmake.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/ActsConfig.cmake.in b/cmake/ActsConfig.cmake.in index 7ed4b3884a5..2254bbfda25 100644 --- a/cmake/ActsConfig.cmake.in +++ b/cmake/ActsConfig.cmake.in @@ -52,9 +52,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/Modules) # `find_dependency` is a wrapper around `find_package` that automatically # handles QUIET and REQUIRED parameters. include(CMakeFindDependencyMacro) -if(@ACTS_USE_SYSTEM_BOOST@) - find_dependency(Boost @Boost_VERSION_STRING@ CONFIG EXACT) -endif() +find_dependency(Boost @Boost_VERSION_STRING@ CONFIG EXACT) if(@ACTS_USE_SYSTEM_EIGEN3@) find_dependency(Eigen3 @Eigen3_VERSION@ CONFIG EXACT) endif()