-
Notifications
You must be signed in to change notification settings - Fork 153
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
Fix PackageConfig.cmake.in to include mgbf #797
Fix PackageConfig.cmake.in to include mgbf #797
Conversation
@TingLei-NOAA , would you please review this PR since it involves MGBF @ShunLiu-NOAA and @TingLei-NOAA : who else do you recommend as the second peer reviewer? |
Russ
Sure I will do the reviewing as soon as possible.
I would recommend Gang to the reviewer too.
Ting
…______________________________
Ting Lei
Physical Scientist, Contractor with Lynker in support of
EMC/NCEP/NWS/NOAA
5830 University Research Ct., Cubicle 2765
College Park, MD 20740
***@***.***
301-683-3624
On Fri, Oct 18, 2024 at 8:44 AM RussTreadon-NOAA ***@***.***> wrote:
@TingLei-NOAA <https://github.com/TingLei-NOAA> , would you please review
this PR since it involves MGBF
@ShunLiu-NOAA <https://github.com/ShunLiu-NOAA> and @TingLei-NOAA
<https://github.com/TingLei-NOAA> : who else do you recommend as the
second peer reviewer?
—
Reply to this email directly, view it on GitHub
<#797 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APEFS7FDBTSCRNB54SMXIVLZ4D7DJAVCNFSM6AAAAABQAGRUUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRSGM4TGMZRGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@GangZhao-NOAA , do you have time to review this PR? |
Hi Russ,
Sure. I can review it.
Thank you!
-Gang
…On Fri, Oct 18, 2024 at 9:29 AM RussTreadon-NOAA ***@***.***> wrote:
@GangZhao-NOAA <https://github.com/GangZhao-NOAA> , do you have time to
review this PR?
—
Reply to this email directly, view it on GitHub
<#797 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMWMXU2RIDYYMYJGG7DP3LTZ4EEJ3AVCNFSM6AAAAABQAGRUUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRSGQ4DANJRHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@RussTreadon-NOAA |
Thank you @TingLei-NOAA and @GangZhao-NOAA for reviewing @AlexanderRichert-NOAA ' s PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RussTreadon-NOAA @AlexanderRichert-NOAA
Hi Russ and Alexander,
The added two lines in src/gsi/cmake/PacakgeConfig.cmake.in seem good to me. I approved this PR.
By the way, I noticed that in the 4 automatic checks by github, 2 checks (Intel Linux Build/setup and GCC Linux Build/gsi) failed. These checks are trivial, so these failures are neglectable, right?
Thanks,
-Gang
I just noticed that
@AlexanderRichert-NOAA @RussTreadon-NOAA I am not familiar with cmake. So I do have a question for you about how cmake generates the targets.cmake and config-version.cmake. Usually in PackageConfig.cmake.in, the two files -- "@[email protected]" and "@[email protected]" are assumed to be created under and then imported from the same directory. But sometimes I noticed that these two files are not stored under the same directory, for example in GSI, Anyway, this inconsistence seems to have no influence on the building process, the GSI package still can be built successfully. So I guess it is not a problem. I just feel curious about it. Do you have any idea or explanation about it? Thank you! Best regards |
@AlexanderRichert-NOAA I had approved this PR and thanks for sorting out this issue.
to
would make the export files to be automatically included in the @[email protected] and @[email protected]. |
I'm not sure if it would, but I think at most that would only work is mgbf was already compiled and could be found in CMAKE_PREFIX_PATH, so it wouldn't work for building gsi & mgbf simultaneously because there's no mgbf package to be found (there's no mgbf-config.cmake before we've run |
The only other pitfall I can think of here would be if mgbf was built separately and used as an external package-- Is that ever the case? If so, this could be wrapped with something to the effect of |
@TingLei-NOAA , above you say
but I see no approval from you in this PR. At present only @GangZhao-NOAA has approved this PR. If you are ready to approve this PR, please do so. If not, what else would you like @AlexanderRichert-NOAA to do? |
@RussTreadon-NOAA Thanks for pointing out my oversight. I thought I had already clicked the approval button. |
Cactus and Hera ctests Install Cactus
Hera
The Passed results are expected. This PR does not change source code or fix files. Hercules and Orion are down today, 10/23/2024, for monthly PM. |
@TingLei-NOAA , we would like to merge this PR no later than next Wednesday, 10/30/2024. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctests pass on Cactus and Hera.
Approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't successfully created a dummy CMakeList.txt to reproduce the issue and verify if a different change I referred to in previous discussion would actually work. Since this is a question about the style and could be further improved in future if needed, I would approve this PR.
This PR adds a (proposed) solution for #796. This block should be encapsulated with
if(@BUILD_MGBF@)
or something to that effect as part of resolving #765.Description
Including the mgbf config/target files in gsi's will allow users to call
find_package(GSI)
from their own CMake-based packages without the build failing due to thembgf::mbgf
target being undefined/not found.Fixes #796
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
In GSI repo (head of develop):
Then download https://github.com/NOAA-GSL/rrfs_utl/ (or just create a dummy CMakeLists.txt and call
find_package(GSI REQUIRED)
:The cmake invocation will fail due to missing
mgbf::mgbf
target.Checklist