diff --git a/CMakeLists.txt b/CMakeLists.txt index 7385d711..5fdcaa5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,10 @@ option(USE_PETSC "Use PETSC solver library" OFF) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) # Boost Archive -find_package(Boost REQUIRED COMPONENTS filesystem system) +find_package(Boost REQUIRED COMPONENTS filesystem) +if(Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 69) + find_package(Boost REQUIRED COMPONENTS filesystem system) +endif() include_directories(${BOOST_INCLUDE_DIRS}) link_libraries(${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})