Skip to content

Commit 895f714

Browse files
committed
fix: GH-29
This commit resolves an issue with verbose messaging, which made it so as the sources and headers where not printed even if the option to do so was turnt on. Signed-off-by: Filip Dutescu <[email protected]>
1 parent 4b6ae29 commit 895f714

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

CMakeLists.txt

+32
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,49 @@ include(cmake/SourcesAndHeaders.cmake)
5959
if(${PROJECT_NAME}_BUILD_EXECUTABLE)
6060
add_executable(${PROJECT_NAME} ${exe_sources})
6161

62+
if(${PROJECT_NAME}_VERBOSE_OUTPUT)
63+
verbose_message("Found the following sources:")
64+
foreach(source IN LISTS exe_sources)
65+
verbose_message("* ${source}")
66+
endforeach()
67+
endif()
68+
6269
if(${PROJECT_NAME}_ENABLE_UNIT_TESTING)
6370
add_library(${PROJECT_NAME}_LIB ${headers} ${sources})
71+
72+
if(${PROJECT_NAME}_VERBOSE_OUTPUT)
73+
verbose_message("Found the following headers:")
74+
foreach(header IN LISTS headers)
75+
verbose_message("* ${header}")
76+
endforeach()
77+
endif()
6478
endif()
6579
elseif(${PROJECT_NAME}_BUILD_HEADERS_ONLY)
6680
add_library(${PROJECT_NAME} INTERFACE)
81+
82+
if(${PROJECT_NAME}_VERBOSE_OUTPUT)
83+
verbose_message("Found the following headers:")
84+
foreach(header IN LIST headers)
85+
verbose_message("* ${header}")
86+
endforeach()
87+
endif()
6788
else()
6889
add_library(
6990
${PROJECT_NAME}
7091
${headers}
7192
${sources}
7293
)
94+
95+
if(${PROJECT_NAME}_VERBOSE_OUTPUT)
96+
verbose_message("Found the following sources:")
97+
foreach(source IN LISTS sources)
98+
verbose_message("* ${source}")
99+
endforeach()
100+
verbose_message("Found the following headers:")
101+
foreach(header IN LISTS headers)
102+
verbose_message("* ${header}")
103+
endforeach()
104+
endif()
73105
endif()
74106

75107
set_target_properties(

0 commit comments

Comments
 (0)