Skip to content

Commit

Permalink
Add netCDF C flags to CMake build (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanheerdegen committed Feb 14, 2023
1 parent 8b7ee7a commit 5126b54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/CMakeLists.txt
Expand Up @@ -75,6 +75,8 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
else ()
message ("Unknown C compiler default flags only...")
endif()
execute_process(COMMAND nc-config --cflags OUTPUT_VARIABLE NETCDF_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NETCDF_CFLAGS}")

# Transfer command line setting of CPP defs to CMake
set(CPPDEFS
Expand Down

0 comments on commit 5126b54

Please sign in to comment.