Skip to content

Commit

Permalink
Merge pull request #627 from gergondet/topic/ImproveComponentsDiagnos…
Browse files Browse the repository at this point in the history
…tics
  • Loading branch information
gergondet authored Oct 18, 2023
2 parents c1ac236 + f764192 commit 9bd257d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ foreach(component ${@PROJECT_NAME@_FIND_COMPONENTS})
if(@PROJECT_NAME@_${component}_FOUND)
message(STATUS "@PROJECT_NAME@: ${component} found.")
else()
message(STATUS "@PROJECT_NAME@: ${component} not found.")
if(@PROJECT_NAME@_FIND_REQUIRED_${component})
message(FATAL_ERROR "@PROJECT_NAME@: ${component} not found.")
else()
message(STATUS "@PROJECT_NAME@: ${component} not found.")
endif()
endif()
endforeach()
check_required_components("@PROJECT_NAME@")
Expand Down

0 comments on commit 9bd257d

Please sign in to comment.