Skip to content

Commit

Permalink
Repeat ENV sub-option for all env vars in find_program
Browse files Browse the repository at this point in the history
ENV only applies to *the next* entry, not to all the entries in the HINTS list
  • Loading branch information
bartgol committed Feb 7, 2024
1 parent e3eaa53 commit 6b8a111
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/FindNetCDF.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# First try to locate nf-config.
find_program(NetCDF_Fortran_CONFIG_EXECUTABLE
NAMES nf-config
HINTS ENV NetCDF_ROOT NetCDF_Fortran_ROOT
HINTS ENV NetCDF_ROOT ENV NetCDF_Fortran_ROOT
PATH_SUFFIXES bin Bin
DOC "NetCDF config program. Used to detect NetCDF Fortran include directory and linker flags." )
mark_as_advanced(NetCDF_Fortran_CONFIG_EXECUTABLE)
find_program(NetCDF_C_CONFIG_EXECUTABLE
NAMES nc-config
HINTS ENV NetCDF_ROOT NetCDF_C_ROOT
HINTS ENV NetCDF_ROOT ENV NetCDF_C_ROOT
PATH_SUFFIXES bin Bin
DOC "NetCDF config program. Used to detect NetCDF C include directory and linker flags." )
mark_as_advanced(NetCDF_C_CONFIG_EXECUTABLE)
Expand Down

0 comments on commit 6b8a111

Please sign in to comment.