Skip to content

Commit

Permalink
Keep using boost module in cmake version < 3.30
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed Nov 16, 2024
1 parent 4299e55 commit 13d6a51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,12 @@ endif(HDF5_FOUND)
#-------------------------------------------------------------------
# set up libboost library, header only
#-------------------------------------------------------------------
find_package(Boost 1.70.0 CONFIG REQUIRED headers)
if(CMAKE_VERSION VERSION_LESS 3.30.0)
set(Boost_NO_BOOST_CMAKE on)
find_package(Boost 1.61.0 REQUIRED)
else()
find_package(Boost 1.70.0 CONFIG REQUIRED headers)
endif()
if(Boost_FOUND)
target_compile_definitions(Boost::boost INTERFACE "HAVE_LIBBOOST")
message(STATUS "Setting Boost_INCLUDE_DIRS=${Boost_INCLUDE_DIRS}")
Expand Down

0 comments on commit 13d6a51

Please sign in to comment.