Skip to content
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

Need to search for uppercase ESMF_ROOT instead of esmf_ROOT in CMakeLists.txt with next spack-stack release #767

Open
climbfuji opened this issue Mar 7, 2024 · 1 comment

Comments

@climbfuji
Copy link

WIth spack-stack-1.7.0, we revert to the spack develop version of UPPERCASEPACKAGENAME_ROOT instead of CaseSensitivePackageName_ROOT. This will require changing esmf_ROOT to ESMF_ROOT in `CMakelistst.txt:

if (DEFINED ENV{esmf_ROOT})

I am surprised to find the spack-stack convention (CaseSensitivePackageName_ROOT) in CMakeLists.txt, since I though GEOS so far didn't use spack-stack. If your build systems also set esmf_ROOT, can you either consider changing those to ESMF_ROOT as well, or check for both esmf_ROOT and ESMF_ROOT inCMakeLists.txt, please?

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5e6810..cef7ff7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,9 +57,9 @@ if (NOT Baselibs_FOUND)
   endif()

   if (NOT TARGET esmf)
-    if (DEFINED ENV{esmf_ROOT})
-      message (STATUS "Found esmf_ROOT in environment: $ENV{esmf_ROOT}")
-      find_path(ESMF_CMAKE_PATH FindESMF.cmake HINTS "$ENV{esmf_ROOT}/cmake")
+         if (DEFINED ENV{ESMF_ROOT})
+                 message (STATUS "Found ESMF_ROOT in environment: $ENV{ESMF_ROOT}")
+                 find_path(ESMF_CMAKE_PATH FindESMF.cmake HINTS "$ENV{ESMF_ROOT}/cmake")
       message (STATUS "Found FindESMF.cmake in: ${ESMF_CMAKE_PATH}")
       if (ESMF_CMAKE_PATH)
         message (STATUS "Appending to CMAKE_PREFIX_PATH: ${ESMF_CMAKE_PATH}")
@mathomp4
Copy link
Member

mathomp4 commented Mar 7, 2024

@climbfuji My guess is this code is pretty much tested by you. I mean, I have built GEOS with mainline Spack and I guess it must be good enough? But you are our main customer for this, so a PR is incoming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants