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

NETCDF: Fix search of netcdf_meta #285

Merged
merged 1 commit into from
Apr 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tribits/common_tpls/find_modules/FindNetCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ else(NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS)
NO_DEFAULT_PATH)
if(meta_path)
# Search meta for NC_HAS_PARALLEL setting...
file(STRINGS "${meta_path}/netcdf_meta.h" netcdf_par_string REGEX "NC_HAS_PARALLEL")
# Note that there is both NC_HAS_PARALLEL4 and NC_HAS_PARALLEL, only want NC_HAS_PARALLEL
# so add a space to end to avoid getting NC_HAS_PARALLEL4
file(STRINGS "${meta_path}/netcdf_meta.h" netcdf_par_string REGEX "NC_HAS_PARALLEL ")
string(REGEX REPLACE "[^0-9]" "" netcdf_par_val "${netcdf_par_string}")
# NOTE: The line for NC_HAS_PARALLEL has an hdf5 string in it which results
# netcdf_par_val being set to 05 or 15 above...
Expand Down