From 0af8e9b36a4ade55bd0c4af4f335a208d19a4e70 Mon Sep 17 00:00:00 2001 From: Anthony Islas Date: Thu, 29 Jun 2023 17:19:46 -0600 Subject: [PATCH] geogrid build --- geogrid/CMakeLists.txt | 47 ++++++++++++++++++++++++++++++++++++++++++++++ geogrid/src/CMakeLists.txt | 27 ++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 geogrid/CMakeLists.txt create mode 100644 geogrid/src/CMakeLists.txt diff --git a/geogrid/CMakeLists.txt b/geogrid/CMakeLists.txt new file mode 100644 index 0000000..d243adc --- /dev/null +++ b/geogrid/CMakeLists.txt @@ -0,0 +1,47 @@ +add_executable( geogrid ) + +add_subdirectory( src ) + +set_target_properties( + geogrid + PROPERTIES + # Just dump everything in here + Fortran_MODULE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/geogrid/ + Fortran_FORMAT FREE + ) + + +# Control dependencies and linking +target_link_libraries( + geogrid + PRIVATE + $<$:$> + $<$:$> + $<$:$> + ${netCDF_LIBRARIES} + WRF::WRF_Core + WRF::io_netcdf + WRF::io_grib1 + WRF::io_grib_share + ) + +target_compile_definitions( + geogrid + PRIVATE + _GEOGRID + ) + +target_include_directories( + geogrid + PRIVATE + ${netCDF_INCLUDE_DIRS} + ) + +# Add these to the export targets +install( + TARGETS geogrid + EXPORT ${EXPORT_NAME}Targets + RUNTIME DESTINATION bin/ + ARCHIVE DESTINATION lib/ + LIBRARY DESTINATION lib/ + ) diff --git a/geogrid/src/CMakeLists.txt b/geogrid/src/CMakeLists.txt new file mode 100644 index 0000000..77628f8 --- /dev/null +++ b/geogrid/src/CMakeLists.txt @@ -0,0 +1,27 @@ + +target_sources( + geogrid + PRIVATE + cio.c + wrf_debug.F + bitarray_module.F + constants_module.F + module_stringutil.F + geogrid.F + gridinfo_module.F + hash_module.F + interp_module.F + list_module.F + llxy_module.F + misc_definitions_module.F + module_debug.F + module_map_utils.F + output_module.F + parallel_module.F + process_tile_module.F + proc_point_module.F + queue_module.F + read_geogrid.c + smooth_module.F + source_data_module.F + ) \ No newline at end of file -- 2.11.4.GIT