Skip to content

Commit 02fc9f3

Browse files
committed
Make boost find_package call silent after first invocation.
1 parent 322bfb4 commit 02fc9f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/core/cmake/find_utils.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,20 @@ endmacro()
3232
# Finds and sets up the the Boost library.
3333
# @return Forwards any variables from the `find_package` call.
3434
macro(clp_find_boost)
35+
get_clp_checked_find(boost)
36+
if(CLP_CHECKED_FIND)
37+
# Silence output from `find_package(Boost)` on repeated invocations.
38+
set(CLP_QUIET_FIND_BOOST QUIET)
39+
endif()
40+
3541
if(CLP_USE_STATIC_LIBS)
3642
set(Boost_USE_STATIC_LIBS ON)
3743
endif()
44+
3845
find_package(
3946
Boost
4047
1.81
48+
${CLP_QUIET_FIND_BOOST}
4149
REQUIRED
4250
filesystem
4351
iostreams
@@ -52,6 +60,7 @@ macro(clp_find_boost)
5260
"Boost version ${Boost_VERSION} is newer than the maximum allowed version (1.88.0)."
5361
)
5462
endif()
63+
set_clp_checked_find(boost)
5564
endmacro()
5665

5766
# Finds and sets up Catch2.

0 commit comments

Comments
 (0)