Changes to CMakeLists.txt for FMS#243
Closed
mlee03 wants to merge 2 commits into
Closed
Conversation
Author
|
could you review to make sure everything looks ok? Thank you! |
aerorahul
reviewed
Feb 1, 2021
Comment on lines
+34
to
+42
| if(32BIT) | ||
| target_link_libraries(io PRIVATE FMS::fms_r4 | ||
| gfsphysics | ||
| ccppdriver) | ||
| else() | ||
| target_link_libraries(io PRIVATE FMS::fms_r8 | ||
| gfsphysics | ||
| ccppdriver) | ||
| endif() |
Contributor
There was a problem hiding this comment.
This is fine for now, but in the subsequent PR's we could use an alias target when FMS is provided as a module or "third-party library" or built in the UFS (as is the case now).
This can be achieved by something like this in the UFS:
find_package(FMS QUIET)
if (FMS_FOUND)
if (32BIT)
add_library(fms ALIAS FMS::fms_r4)
else()
add_library(fms ALIAS FMS::fms_r8)
endif()
else()
add_subdirectory(FMS)
if (32BIT)
add_library(fms ALIAS FMS::fms_r4)
else()
add_library(fms ALIAS FMS::fms_r8)
endif()
endif()
All downstream targets can then use fms without the need for and if-else block scattered everywhere.
aerorahul
approved these changes
Feb 1, 2021
Author
|
This change is not necessary. |
LarissaReames
pushed a commit
to LarissaReames/fv3atm
that referenced
this pull request
Nov 17, 2023
* only send w to CCPP physics in non-hydrostatic mode, and only if the physics wants it
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.
Description
This PR updates
CMakeLists.txt,io/CMakeLists.txt, andstochastic_physics/CMakeLists.txtto be compatible with the FMS CMakeLists.txt. The fms target has been changed to FMS::fms_r4 for 32BIT or FMS::fms_r8 for a 64BIT compilation. This change is necessary for the UFS Weather Model to use the FMS CMakeLists.txt file. Answer changes are not expected.Issue(s) addressed
Testing
Regression tests are currently running after making last minute minor changes.
Dependencies