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

Logical flaw when creating the shell script to set environment variables #53

Closed
climbfuji opened this issue Feb 24, 2020 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@climbfuji
Copy link
Collaborator

On systems where netCDF is loaded as a module, the current logic searches for it using

find_package(NetCDF REQUIRED MODULE)

in the top-level CMakeLists.txt. This requires the environment variable NETCDF to be set when invoking cmake, but it does not set the NETCDF cmake variable. As a consequence, the scripts setenv_nceplibs.sh and setenv_nceplibs.csh are populated with

setenv NETCDF ""

If netCDF is built as part of NCEPLIBS-external (i.e. the netcdf libraries are in the PATH and LD_LIBRARY_PATH after sourcing the shell script) or on systems where modulefiles are used (i.e. the shell scripts are not sourced) , this is no problem. We should augment the findNetCDF.cmake package to set the cmake variable NETCDF correctly.

This is high priority for the beta03 tag of NCEPLIBS.

@climbfuji climbfuji self-assigned this Feb 24, 2020
@climbfuji climbfuji added the bug Something isn't working label Feb 24, 2020
@climbfuji
Copy link
Collaborator Author

@kgerheiser @mark-a-potts FYI

@climbfuji climbfuji changed the title Logical flaw when creating the shell scrip to set environment variables Logical flaw when creating the shell script to set environment variables Feb 24, 2020
@climbfuji
Copy link
Collaborator Author

This will be fixed by NOAA-EMC/CMakeModules#23.

@climbfuji
Copy link
Collaborator Author

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant