Skip to content

Commit

Permalink
build: Unconditionally load Boost in CMake config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stephenswat committed Oct 23, 2024
1 parent 43312de commit b6bb7e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmake/ActsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b6bb7e6

Please sign in to comment.