diff --git a/src/clib/CMakeLists.txt b/src/clib/CMakeLists.txt index c806856eb88..87a617c66c8 100644 --- a/src/clib/CMakeLists.txt +++ b/src/clib/CMakeLists.txt @@ -94,8 +94,8 @@ endif () if (NetCDF_C_FOUND) target_include_directories (pioc PUBLIC ${NetCDF_C_INCLUDE_DIRS}) - # target_compile_definitions (pioc - # PUBLIC _NETCDF) + target_compile_definitions (pioc + PUBLIC _NETCDF) target_link_libraries (pioc PUBLIC ${NetCDF_C_LIBRARIES}) # if (${NetCDF_C_HAS_PARALLEL}) @@ -109,17 +109,17 @@ if (NetCDF_C_FOUND) target_compile_definitions (pioc PUBLIC LOGGING) endif() -# else () -# target_compile_definitions (pioc -# PUBLIC _NONETCDF) +else () + target_compile_definitions (pioc + PUBLIC _NONETCDF) endif () #===== PnetCDF-C ===== if (PnetCDF_C_FOUND) target_include_directories (pioc PUBLIC ${PnetCDF_C_INCLUDE_DIRS}) - # target_compile_definitions (pioc - # PUBLIC _PNETCDF) + target_compile_definitions (pioc + PUBLIC _PNETCDF) target_link_libraries (pioc PUBLIC ${PnetCDF_C_LIBRARIES}) @@ -131,9 +131,9 @@ if (PnetCDF_C_FOUND) PUBLIC USE_PNETCDF_VARN PUBLIC USE_PNETCDF_VARN_ON_READ) endif() -# else () -# target_compile_definitions (pioc -# PUBLIC _NOPNETCDF) +else () + target_compile_definitions (pioc + PUBLIC _NOPNETCDF) endif () #===== Add EXTRAs ===== diff --git a/src/flib/CMakeLists.txt b/src/flib/CMakeLists.txt index 8c52d247c51..8ee65c77ad6 100644 --- a/src/flib/CMakeLists.txt +++ b/src/flib/CMakeLists.txt @@ -216,14 +216,14 @@ endif () if (NetCDF_Fortran_FOUND) target_include_directories (piof PUBLIC ${NetCDF_Fortran_INCLUDE_DIRS}) - # target_compile_definitions (piof - # PUBLIC _NETCDF) + target_compile_definitions (piof + PUBLIC _NETCDF) target_link_libraries (piof PUBLIC ${NetCDF_Fortran_LIBRARIES}) - # if (EXISTS ${NetCDF_Fortran_INCLUDE_DIR}/netcdf_par.h) - # target_compile_definitions (piof - # PUBLIC _NETCDF4) - # endif () + if (EXISTS ${NetCDF_Fortran_INCLUDE_DIR}/netcdf_par.h) + target_compile_definitions (piof + PUBLIC _NETCDF4) + endif () else () target_compile_definitions (piof PUBLIC _NONETCDF) @@ -233,8 +233,8 @@ endif () if (PnetCDF_Fortran_FOUND) target_include_directories (piof PUBLIC ${PnetCDF_Fortran_INCLUDE_DIRS}) - # target_compile_definitions (piof - # PUBLIC _PNETCDF) + target_compile_definitions (piof + PUBLIC _PNETCDF) target_link_libraries (piof PUBLIC ${PnetCDF_Fortran_LIBRARIES}) @@ -246,9 +246,9 @@ if (PnetCDF_Fortran_FOUND) PUBLIC USE_PNETCDF_VARN PUBLIC USE_PNETCDF_VARN_ON_READ) endif() -# else () -# target_compile_definitions (piof -# PUBLIC _NOPNETCDF) +else () + target_compile_definitions (piof + PUBLIC _NOPNETCDF) endif () #===== Add EXTRAs =====