Skip to content

Commit aa3808e

Browse files
jhaleclaude
andcommitted
Build Boost via its own CMake instead of copying headers
cpp/CMakeLists.txt sets CMP0167 NEW (Boost CONFIG mode), so find_package(Boost) requires an installed Boost CMake package (BoostConfig.cmake etc.), not just headers on the include path - dropping a bare header tree into /usr/local/include left CMake unable to find a Boost config file at all. Build Boost from its official 1.87.0 source release using its own CMake support, restricted via BOOST_INCLUDE_LIBRARIES to the libraries DOLFINx actually includes (unordered, sort, uuid, lexical_cast, algorithm, container_hash, multiprecision) plus their transitive dependencies, which Boost's CMake resolves automatically. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent c5cfa72 commit aa3808e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/build-wheels.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ jobs:
173173
dnf -y update &&
174174
dnf -y install git hdf5-mpich-devel make \
175175
mpich-devel ninja-build openblas-devel pugixml-devel spdlog-devel &&
176-
curl -L https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz | tar -xz --strip-components=1 -C /usr/local/include boost_1_87_0/boost &&
176+
curl -L https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz | tar -xz &&
177+
cmake -G Ninja -S boost_1_87_0/ -B boost-build-dir/ \
178+
-DCMAKE_BUILD_TYPE=Release \
179+
-DBOOST_INCLUDE_LIBRARIES="unordered;sort;uuid;lexical_cast;algorithm;container_hash;multiprecision" &&
180+
cmake --build boost-build-dir/ &&
181+
cmake --install boost-build-dir/ &&
177182
ln -s /usr/include/mpich-$(arch) /usr/lib64/mpich/include &&
178183
mkdir -p scotch && curl -L https://gitlab.inria.fr/scotch/scotch/-/archive/v7.0.12/scotch-v7.0.12.tar.bz2 | tar -xj --strip-components=1 -C scotch &&
179184
cmake -G Ninja -S scotch/ -B scotch-build-dir/ \

0 commit comments

Comments
 (0)