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

Updates to netcdf-cxx4 tool #3

Merged
merged 6 commits into from
Mar 26, 2024
Merged

Updates to netcdf-cxx4 tool #3

merged 6 commits into from
Mar 26, 2024

Conversation

isabels
Copy link
Contributor

@isabels isabels commented Feb 26, 2024

No description provided.

@garyjg
Copy link
Member

garyjg commented Feb 28, 2024

It is unusual for a tool to create a variable only if pkg-config fails. It means the developer cannot use the variable at all if pkg-config happens to succeed, which at the least might make testing difficult and also is probably not what someone expects. If the variable is definitely not useful on OSX, then I guess it might make sense to not to create there, but if there's a chance it could be useful, then I suggest always creating the NETCDFCXX4DIR variable, with a default of None. The None default implies use the platform-specific default: no change on Darwin, pkg-config if it works, and otherwise /opt/local. Then a developer can set it explicitly anywhere, and if set it will be used as is, regardless of platform or pkg-config state. Otherwise the default works everywhere, and there's no confusion about when the variable should or shouldn't exist. Thoughts?

@isabels
Copy link
Contributor Author

isabels commented Mar 19, 2024

Now that it looks like there's a package for netcdf-cxx4 on alma9, there's no current need for the NETCDFCXX4DIR variable. Should I get rid of it, or should we keep in case it's useful later?

since the netcdf-cxx4 library when built with cmake from source ends up with a
different name, go ahead and search for both names when the NETCDFCXX4DIR
variable is set, and in both subdirectory names, lib and lib64.  as before,
use the default library name for the platform unless pkg-config works.
@garyjg
Copy link
Member

garyjg commented Mar 26, 2024

I think the variable can still be useful, in particular I've been using it to test against the latest netcdf-cxx4 built from source. So I've left it in and expanded the search to find "lib64/libnetcdf-cxx4.so" on Fedora. Hopefully, this works the same as before when NETCDFCXX4DIR is not set, including on MacOS and Windows.

@garyjg garyjg merged commit efde784 into master Mar 26, 2024
2 of 3 checks passed
@garyjg garyjg deleted the netcdf-cxx4 branch March 26, 2024 04:46
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 this pull request may close these issues.

None yet

2 participants