Skip to content

Commit

Permalink
resolve linkage bug with netcdf
Browse files Browse the repository at this point in the history
  • Loading branch information
sandro-elsweijer committed Mar 6, 2025
1 parent 003e1e6 commit 1033c12
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ if( T8CODE_ENABLE_NETCDF )
message("Found netCDF")
include(cmake/CheckNetCDFPar.cmake)
endif (netCDF_FOUND)
install( FILES
t8_cmesh_netcdf.h
t8_forest_netcdf.h
t8_netcdf.h
DESTINATION include
)
endif( T8CODE_ENABLE_NETCDF )

# Override default for this libsc option
Expand Down Expand Up @@ -191,22 +197,16 @@ function(t8_add_cmake_properties target)
endif()

if( T8CODE_ENABLE_NETCDF )
target_link_libraries( T8 PUBLIC netCDF::netcdf )
target_compile_definitions(T8 PUBLIC
target_link_libraries( ${target} PUBLIC netCDF::netcdf )
target_compile_definitions(${target} PUBLIC
T8_WITH_NETCDF
$<$<AND:$<BOOL:${NETCDF_HAVE_NETCDF_PAR}>,$<BOOL:${T8CODE_ENABLE_MPI}>>:T8_WITH_NETCDF_PAR>
)
target_sources( T8 PRIVATE
target_sources( ${target} PRIVATE
t8_netcdf.c
t8_cmesh/t8_cmesh_netcdf.c
t8_forest/t8_forest_netcdf.cxx
)
install( FILES
t8_cmesh_netcdf.h
t8_forest_netcdf.h
t8_netcdf.h
DESTINATION include
)
endif()

if( T8CODE_BUILD_WPEDANTIC )
Expand Down

0 comments on commit 1033c12

Please sign in to comment.