Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ‘ฉโ€๐ŸŒพ ign_find_package: respect QUIET #164

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cmake/IgnUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
# <project>-config.cmake file.
#
# [QUIET]: Optional. If provided, it will be passed forward to cmake's
# find_package(~) command. This macro will still print its normal
# output.
# find_package(~) command. It also suppresses warnings emitted by this
# macro.
#
# [BUILD_ONLY]: Optional. Use this to indicate that the project only needs this
# package while building, and it does not need to be available to
Expand Down Expand Up @@ -221,7 +221,9 @@ macro(ign_find_package PACKAGE_NAME)

# Otherwise, if it was only required by some of the components, create
# a warning about which components will not be available.
ign_build_warning("Cannot build component [${component}] - ${${PACKAGE_NAME}_msg}")
if(NOT ign_find_package_QUIET)
ign_build_warning("Cannot build component [${component}] - ${${PACKAGE_NAME}_msg}")
endif()

# Also create a variable to indicate that we should skip the component
set(SKIP_${component} true)
Expand All @@ -231,7 +233,9 @@ macro(ign_find_package PACKAGE_NAME)
endforeach()

else()
ign_build_warning(${${PACKAGE_NAME}_msg})
if(NOT ign_find_package_QUIET)
ign_build_warning(${${PACKAGE_NAME}_msg})
endif()
endif()

endif()
Expand Down