Skip to content

Commit

Permalink
Fix NetCDF C lib detection
Browse files Browse the repository at this point in the history
Fix typo when setting the NetCDF C libraries.

Without this fix standalone builds of cprnc fails with missing
NetCDF lib dependencies
  • Loading branch information
jayeshkrishna committed Mar 20, 2024
1 parent 9276b21 commit 1866859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/FindNetCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if(NetCDF_C_CONFIG_EXECUTABLE)
OUTPUT_VARIABLE clibs
OUTPUT_STRIP_TRAILING_WHITESPACE)
if (clibs)
set(NetCDF_C_LIBRARIES ${libs} CACHE STRING "NetCDF libraries (or linking flags)")
set(NetCDF_C_LIBRARIES ${clibs} CACHE STRING "NetCDF libraries (or linking flags)")
set(AUTODETECTED_NetCDF_C ON)
endif()

Expand Down

1 comment on commit 1866859

@mvdebolskiy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work with netCDF4.9.2, btw. --libs works.

Please sign in to comment.