Skip to content

Commit ac27876

Browse files
Merge pull request #13565 from KratosMultiphysics/cmake/improve-boost-root-directory-
[CMake] Improve `Boost` detection when manually setting `BOOST_ROOT`
2 parents 870304d + fed3bd0 commit ac27876

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmake_modules/KratosBoost.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# Check if the BOOST_ROOT environment variable is defined
44
if(DEFINED ENV{BOOST_ROOT})
55
set(BOOST_ROOT $ENV{BOOST_ROOT})
6+
# Check that boost/any.hpp exists in the BOOST_ROOT include directory
7+
if(EXISTS "${BOOST_ROOT}/boost/any.hpp")
8+
set(BOOST_INCLUDEDIR "${BOOST_ROOT}")
9+
set(BOOST_LIBRARYDIR "${BOOST_ROOT}")
10+
endif(EXISTS "${BOOST_ROOT}/boost/any.hpp")
611
else(DEFINED ENV{BOOST_ROOT})
712
# Check if BOOST_INCLUDEDIR and BOOST_LIBRARYDIR are already defined as environment variables
813
if(DEFINED ENV{BOOST_INCLUDEDIR})

0 commit comments

Comments
 (0)