Skip to content

Commit

Permalink
Merge pull request #285 from gsjaardema/patch-4
Browse files Browse the repository at this point in the history
NETCDF: Fix search of netcdf_meta
  • Loading branch information
bartlettroscoe authored Apr 3, 2019
2 parents 55d85d2 + e059a8d commit 7389a43
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 7389a43

Please sign in to comment.