Skip to content

Commit

Permalink
only find_package(boost) when needed, take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Nov 16, 2023
1 parent b44f971 commit 972f175
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 @@ -107,6 +107,8 @@ if(ZEEP_BUILD_LIBRARY)
GIT_TAG boost-1.74.0
)
FetchContent_MakeAvailable(Boost)

set(Boost_FETCHED ON)
else()
message(FATAL_ERROR "No boost found and cannot use FetchContent")
endif()
Expand Down Expand Up @@ -321,7 +323,7 @@ endif()
# Test applications
if(BUILD_TESTING)

if(NOT Boost_FOUND)
if(NOT Boost_FETCHED)
find_package(Boost REQUIRED)
endif()

Expand Down

0 comments on commit 972f175

Please sign in to comment.