Skip to content

Commit

Permalink
keep up to date with how cmake handles boost
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed Sep 18, 2024
1 parent 5ca68d8 commit 6d345ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# This call must be placed BEFORE "project" command
cmake_minimum_required(VERSION 3.3)

cmake_policy(SET CMP0167 NEW)

project(evio VERSION 6.0)

Expand Down Expand Up @@ -219,12 +220,13 @@ include(FindPackageHandleStandardArgs)


# search for boost libs
find_package(Boost REQUIRED system thread chrono)
find_package(Boost REQUIRED COMPONENTS system thread chrono CONFIG)


if (Boost_FOUND)
message(STATUS "Boost Found: libs = " ${Boost_LIBRARIES} ", include dirs = " ${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
elseif(NOT DEFINED C_ONLY)
message(FATAL_ERROR "Boost cannot be found, cmake will exit." )
endif()
Expand Down

0 comments on commit 6d345ae

Please sign in to comment.