-
Notifications
You must be signed in to change notification settings - Fork 249
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
Possible issue with FindESMF.cmake #39
Comments
Thanks for reporting this issue. Please note that the entire ufs model, including the NCEPLIBS umbrella build, are currently under development and testing (basically what you did, thank you). We are currently refactoring the NCEPLIBS build, by the end of the week we hope to have it finalized. We will make sure that the issue you reported (that is, a -I in the filepath) is addressed in the refactored build system. Meanwhile, I need to ask you for your patience. Thanks! |
How about changing:
to:
@mathomp4 Can you install ESMF in |
This will not catch the leading
|
We should use the following imo:
This also takes care of filenames containing spaces unless it's something really weird, but who would do that?
Well, probably someone will. @kgerheiser @mark-a-potts I will create a PR for Kyle's refactored version. |
This could also work: separate_arguments(ESMF_F90COMPILEPATHS)
foreach (ITEM ${ESMF_F90COMPILEPATHS})
string(REGEX REPLACE "^-I" "" ITEM "${ITEM}")
list(APPEND tmp ${ITEM})
endforeach()
set(ESMF_F90COMPILEPATHS ${tmp}) |
This file is in ufs-weather-model (this repository). We should thoroughly test this change and commit it in one of our next PRs. |
Actually, this still might cause issue with paths with spaces in. Okay. New challenge... |
Thanks @mathomp4. I tested your version to see if it fixes the shortcoming I noted for my suggestion, and unfortunately it doesn't solve this problem either:
So, for now I will keep what is in https://github.com/kgerheiser/CMakeModules/pull/2. Thanks for helping! |
@mathomp4 if course we could replace |
This seems to handle spaces in paths: separate_arguments(ESMF_F90COMPILEPATHS NATIVE_COMMAND ${ESMF_F90COMPILEPATHS})
foreach (ITEM ${ESMF_F90COMPILEPATHS})
string(REGEX REPLACE "^-I" "" ITEM "${ITEM}")
list(APPEND tmp ${ITEM})
endforeach()
set(ESMF_F90COMPILEPATHS ${tmp}) ETA: Should perhaps work on Windows as well. |
This works as long as the ESMF_F90COMPILEPATHS variable puts the filepath with spaces in quotes, otherwise not. I hope it does.
Anyway, your solution is better. I'll update the PR. Thanks. |
This has been fixed in the new branch release/public-v1, which will replace all other branches associated with the UFS public release. Have a look here, and if satisfied, please close the issue: Thanks! |
The problem was fixed. Close issue. |
…nto_dtc_hwrf-physics dtc/hwrf-physics: merge HWRF saSAS with GFS version, update to a more recent version of ufs-weather-model from EMC develop
Update submodule pointer for fv3atm / ccpp-physics (changes for flexible number of soil levels)
Fix mesh generation in init_grid()
modified ADCIRC-interface/CMakeLists.txt to support Python & Bash for the generation of the version file
All,
I was trying to build following the instructions and was getting frustrated by the fact that ESMF could not be found. Eventually, I tracked down my issue to this line:
ufs-weather-model/cmake/FindESMF.cmake
Line 21 in 52795b8
Why? Well, if we look in my
esmf.mk
file:ESMF_F90COMPILEPATHS=-I/discover/swdev/mathomp4/NCEPLIBS/install-Intel18/mod -I/discover/swdev/mathomp4/NCEPLIBS/install-Intel18/include -I/discover/swdev/mathomp4/NCEPLIBS/install-Intel18/include
The issue is that I installed NCEPLIBS with
-DCMAKE_INSTALL_PREFIX=../install-Intel18
. And what's in the center of that?-I
. Thus, CMake was seeing:I solved it by installing to a different directory, but I'm lucky only in that nowhere else in my full path was a
-I
.It's not a fatal flaw, but it might be useful to make a bit more robust.
The text was updated successfully, but these errors were encountered: