astitcher commented on code in PR #371:
URL: https://github.com/apache/qpid-proton/pull/371#discussion_r875923818
##########
c/src/ProtonConfig.cmake.in:
##########
@@ -52,26 +52,38 @@ if (Proton_USE_STATIC_LIBS)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD})
endif()
-set (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+set_and_check (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_LIBRARIES Proton::qpid-proton)
set (Proton_FOUND True)
-set (Proton_Core_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+set_and_check (Proton_Core_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_Core_LIBRARIES Proton::core)
set (Proton_Core_FOUND True)
set (HAS_PROACTOR @HAS_PROACTOR@)
if (HAS_PROACTOR)
- set (Proton_Proactor_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+ set_and_check (Proton_Proactor_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_Proactor_LIBRARIES Proton::proactor)
set (Proton_Proactor_FOUND True)
endif()
set (HAS_TLS @HAS_TLS@)
if (HAS_TLS)
- set (Proton_Tls_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+ set_and_check (Proton_Tls_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_Tls_LIBRARIES Proton::tls)
set (Proton_Tls_FOUND True)
endif()
-check_required_components(Proton)
+macro(pn_check_required_components _NAME)
+ check_required_components(${_NAME})
+
+ if (NOT ${_NAME}_FIND_QUIETLY)
+ foreach(comp ${${_NAME}_FIND_COMPONENTS})
+ if(NOT ${_NAME}_${comp}_FOUND)
+ MESSAGE(STATUS "Requested ${_NAME} component ${comp} is NOT FOUND")
+ endif()
+ endforeach()
+ endif()
+endmacro()
Review Comment:
Why make this a macro? It is only used once here and is repeated in the C++
config too - I'd make a macro if we could share it somehow, but we're not doing
that.
##########
c/src/ProtonConfig.cmake.in:
##########
@@ -52,26 +52,38 @@ if (Proton_USE_STATIC_LIBS)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD})
endif()
-set (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
+set_and_check (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
Review Comment:
What does set_and_check do? I can't find any documentation for it in the
cmake docs and it isn't anywhere else in the proton code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]