Update the FindCasacore script to include version info#291
Merged
aroffringa merged 6 commits intomasterfrom Apr 13, 2026
Merged
Update the FindCasacore script to include version info#291aroffringa merged 6 commits intomasterfrom
aroffringa merged 6 commits intomasterfrom
Conversation
c33f2d3 to
aea8296
Compare
gmloose
reviewed
Apr 10, 2026
Collaborator
gmloose
left a comment
There was a problem hiding this comment.
LGTM, but see my comment.
Comment on lines
+214
to
+220
| # Use 'find_package' directly for HDF5, since 'casacore_find_package' | ||
| # does not support the extra 'COMPONENTS CXX' arguments. | ||
| find_package(HDF5 COMPONENTS CXX) | ||
| if (HDF5_FOUND) | ||
| list(APPEND CASACORE_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) | ||
| list(APPEND CASACORE_LIBRARIES ${HDF5_LIBRARIES}) | ||
| endif(HDF5_FOUND) |
Collaborator
There was a problem hiding this comment.
I propose to fix the macro casacore_find_package instead as follows:
macro(casacore_find_package _name)
set(_arg_list ${ARGN})
if(NOT Casacore_FIND_REQUIRED OR CASACORE_MAKE_REQUIRED_EXTERNALS_OPTIONAL)
list(REMOVE_ITEM _arg_list "REQUIRED")
endif()
find_package(${_name} ${_arg_list})
if(${_name}_FOUND)
list(APPEND CASACORE_INCLUDE_DIRS ${${_name}_INCLUDE_DIRS})
list(APPEND CASACORE_LIBRARIES ${${_name}_LIBRARIES})
endif(${_name}_FOUND)
endmacro(casacore_find_package _name)
Then here, we have just a one-liner change.
Contributor
Author
There was a problem hiding this comment.
Good idea, I've applied it. This FindCasacore script comes from DP3 by the way, so we might update that one as well :) (as well as WSClean).
Contributor
Author
There was a problem hiding this comment.
(could you check if the call to the macro and code around is correct? I.e. the one here https://github.com/casacore/python-casacore/pull/291/changes#diff-dca8aead57c8ac2a5091ef3f09fc6ca2d75730189ad38cf6ff82dbaa74e82904R212 ).
Collaborator
There was a problem hiding this comment.
Yeah, that should be good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.