Skip to content

Commit 5bc41ac

Browse files
committed
Scope "Downloading" messages to avoid misleading repeated output
1 parent 85456b0 commit 5bc41ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmake/FetchCatch2.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
include(FetchContent)
44

5-
message(STATUS "Downloading Catch2...")
6-
75
function(fetch_catch2)
86
set(fetch_args "")
97
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.25.0")
@@ -26,6 +24,8 @@ function(fetch_catch2)
2624
FetchContent_GetProperties(EP_Catch2)
2725

2826
if(NOT ep_catch2_POPULATED)
27+
message(STATUS "Downloading Catch2...")
28+
2929
# Avoid Catch2 compile warnings from being treated as errors.
3030
string(REPLACE " -Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
3131
string(REPLACE " -Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
@@ -43,9 +43,9 @@ function(fetch_catch2)
4343
# Catch2 config vars.
4444
set_property(CACHE CATCH_INSTALL_DOCS PROPERTY VALUE OFF)
4545
set_property(CACHE CATCH_INSTALL_EXTRAS PROPERTY VALUE OFF)
46+
47+
message (STATUS "Downloading Catch2... done.")
4648
endif()
4749
endfunction()
4850

4951
fetch_catch2()
50-
51-
message (STATUS "Downloading Catch2... done.")

0 commit comments

Comments
 (0)