Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use project configs from NCEPLIBS #118

Merged
merged 35 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a0f3c54
move cmake to CMakeModules
aerorahul Jun 16, 2020
597f47f
update pointer to CMakeModules
aerorahul Jun 16, 2020
9a6bd56
use imported targets for NCEPLIBS
aerorahul Jun 17, 2020
039d884
update pointer to CMakeModules
aerorahul Jun 17, 2020
15d58e0
update pointer to CMakeModules
aerorahul Jun 17, 2020
08c4475
update gitmodule to point to correct branch of CMakeModules
aerorahul Jun 17, 2020
6c73bff
removed explicit dependency on png, jasper and zlib as they are resol…
aerorahul Jun 17, 2020
f1a4036
ignore exec/ and update build.hera to temporarily point to user test …
aerorahul Jun 19, 2020
4d98f4b
CMakeModules was updated. Update pointer to CMakeModules submoule and…
aerorahul Jun 23, 2020
9b582d0
Merge branch 'develop' into feature/cmakepkgs
aerorahul Jul 28, 2020
a24e981
update modules on hera orion cray and dell to point to cmake libraries
aerorahul Jul 28, 2020
ed48cc1
- utilities linking with nemsio library need to link with bacio_4 and…
aerorahul Jul 28, 2020
75c03de
remove unused modules crtm, nceppost and g2tmpl
aerorahul Jul 28, 2020
45b91de
update intel module on cray. Export esmfmkfile variable
aerorahul Jul 28, 2020
910aaff
update orion paths for netcdf and esmf
aerorahul Jul 28, 2020
a4554c7
update pointer to CMakeModules
aerorahul Jul 31, 2020
1cc4a56
use wgrib2 cmake library
aerorahul Aug 13, 2020
2a52d41
update cmakemodues pointer
aerorahul Aug 18, 2020
8afe499
Merge branch 'develop' into feature/cmakepkgs
aerorahul Aug 19, 2020
69c5282
update modulefile
aerorahul Aug 20, 2020
0087304
fix gfortran issues
aerorahul Aug 20, 2020
bab941e
remove find_package(ip2)
aerorahul Aug 29, 2020
1feec6b
minor cleanup of flags
aerorahul Aug 29, 2020
b410fbe
Merge branch 'develop' into feature/cmakepkgs
aerorahul Sep 8, 2020
d30e435
Update modules and CMakeModules (#2)
kgerheiser Sep 9, 2020
65743fa
Fix synax error in global_equiv_resol.f90 (using gnu compiler) (#1)
DusanJovic-NOAA Sep 9, 2020
511b25e
Update Jet and load wgrib2 instead of manually setting wgrib2_ROOT (#3)
kgerheiser Sep 9, 2020
175e0c7
Fix typos and load PNG for Jet
kgerheiser Sep 9, 2020
0edc764
Load correct wgrib2
kgerheiser Sep 9, 2020
1710db6
Update build.jet to point to OpenMP-enabled sp lib
kgerheiser Sep 10, 2020
cbd3a43
Update build.jet
kgerheiser Sep 10, 2020
c649d9c
Update build.wcoss_cray
kgerheiser Sep 11, 2020
35e03ce
Update module_base.wcoss_dell_p3
kgerheiser Sep 14, 2020
09f1baf
Update build.wcoss_dell_p3
kgerheiser Sep 14, 2020
7e72c57
Revert "Update module_base.wcoss_dell_p3"
kgerheiser Sep 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
build/
install/

*.[ao]
*.mod
*.so
*.exe
*.x

*.swp
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "cmake"]
path = cmake
path = CMakeModules
url = https://github.com/NOAA-EMC/CMakeModules
branch = release/public-v1
branch = feature/cmakepkgs
71 changes: 15 additions & 56 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project(
ufs_util
VERSION ${pVersion}
LANGUAGES C Fortran)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/Modules")

if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
message(STATUS "Setting build type to 'Release' as none was specified.")
Expand All @@ -17,11 +17,7 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
"MinSizeRel" "RelWithDebInfo")
endif()

if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|GNU|Clang|AppleClang)$")
message(WARNING "Compiler not officially supported: ${CMAKE_Fortran_COMPILER_ID}")
endif()

if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Intel|GNU)$")
if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Intel|GNU|Clang|AppleClang)$")
message(WARNING "Compiler not officially supported: ${CMAKE_C_COMPILER_ID}")
endif()

Expand Down Expand Up @@ -49,7 +45,7 @@ find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(Jasper REQUIRED)
find_package(NetCDF REQUIRED C Fortran)
find_package(MPI REQUIRED )
find_package(MPI REQUIRED)
find_package(ESMF MODULE REQUIRED)
find_package(WGRIB2 REQUIRED)

Expand All @@ -58,55 +54,18 @@ if(OPENMP)
find_package(OpenMP REQUIRED COMPONENTS Fortran)
endif()

set(CMAKE_FIND_PACKAGE_PREFER_CONFIG true)

if(NOT TARGET gfsio_4)
find_package(gfsio REQUIRED)
endif()

if(NOT TARGET sfcio_4)
find_package(sfcio REQUIRED)
endif()

if(NOT TARGET w3nco_d)
find_package(w3nco REQUIRED)
endif()

if(NOT TARGET landsfcutil_d)
find_package(landsfcutil REQUIRED)
endif()

if(NOT TARGET bacio_4)
find_package(bacio REQUIRED)
endif()

if(NOT TARGET nemsio)
find_package(nemsio REQUIRED)
endif()

if(NOT TARGET nemsiogfs)
find_package(nemsiogfs REQUIRED)
endif()

if(NOT TARGET sigio_4)
find_package(sigio REQUIRED)
endif()

if(NOT TARGET sp_d)
find_package(sp REQUIRED)
endif()

if(NOT TARGET ip_d)
find_package(ip REQUIRED)
endif()

if(NOT TARGET w3emc_d)
find_package(w3emc REQUIRED)
endif()

if(NOT TARGET g2_d)
find_package(g2 REQUIRED)
endif()
find_package(gfsio REQUIRED)
find_package(sfcio REQUIRED)
find_package(w3nco REQUIRED)
find_package(landsfcutil REQUIRED)
find_package(bacio REQUIRED)
find_package(nemsio REQUIRED)
find_package(nemsiogfs REQUIRED)
find_package(sigio REQUIRED)
find_package(sp REQUIRED)
find_package(ip REQUIRED)
find_package(w3emc REQUIRED)
find_package(g2 REQUIRED)

# EMC requires executables in ./exec
set(exec_dir bin)
Expand Down
1 change: 1 addition & 0 deletions CMakeModules
Submodule CMakeModules added at e72d04
1 change: 0 additions & 1 deletion cmake
Submodule cmake deleted from f38685
12 changes: 6 additions & 6 deletions sorc/chgres_cube.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ set(exe_name chgres_cube)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
nemsio
sfcio_4
sigio_4
bacio_4
sp_d
w3nco_d
nemsio::nemsio
sfcio::sfcio
sigio::sigio
bacio::bacio_4
sp::sp_d
w3nco::w3nco_d
esmf
wgrib2
MPI::MPI_Fortran
Expand Down
6 changes: 3 additions & 3 deletions sorc/emcsfc_ice_blend.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set(exe_name emcsfc_ice_blend)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
bacio_4
g2_4
w3nco_4
bacio::bacio_4
g2::g2_4
w3nco::w3nco_4
${JASPER_LIBRARIES}
PNG::PNG
ZLIB::ZLIB)
Expand Down
12 changes: 6 additions & 6 deletions sorc/emcsfc_snow2mdl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ set(exe_name emcsfc_snow2mdl)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
g2_d
ip_d
sp_d
landsfcutil_d
bacio_4
w3nco_d
g2::g2_d
ip::ip_d
sp::sp_d
landsfcutil::landsfcutil_d
bacio::bacio_4
w3nco::w3nco_d
${JASPER_LIBRARIES}
PNG::PNG
ZLIB::ZLIB)
Expand Down
28 changes: 15 additions & 13 deletions sorc/global_chgres.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ set(exe_name global_chgres)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
gfsio_4
nemsiogfs
nemsio
sigio_4
sfcio_4
landsfcutil_d
ip_d
sp_d
w3emc_d
w3nco_d
bacio_4
NetCDF::NetCDF_Fortran
OpenMP::OpenMP_Fortran)
gfsio::gfsio
nemsiogfs::nemsiogfs
nemsio::nemsio
sigio::sigio
sfcio::sfcio
landsfcutil::landsfcutil_d
ip::ip_d
sp::sp_d
w3emc::w3emc_d
w3nco::w3nco_d
bacio::bacio_4
NetCDF::NetCDF_Fortran)
if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} OpenMP::OpenMP_Fortran)
endif()

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
16 changes: 9 additions & 7 deletions sorc/global_cycle.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(fortran_src
cycle.f90
cycle.f90
machine.f90
num_parthds.f90
sfcsub.F
Expand All @@ -15,12 +15,14 @@ set(exe_name global_cycle)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
w3nco_d
bacio_4
ip_d
sp_d
w3nco::w3nco_d
bacio::bacio_4
ip::ip_d
sp::sp_d
MPI::MPI_Fortran
NetCDF::NetCDF_Fortran
OpenMP::OpenMP_Fortran)
NetCDF::NetCDF_Fortran)
if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} OpenMP::OpenMP_Fortran)
endif()

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
6 changes: 3 additions & 3 deletions sorc/mkgfsnemsioctl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set(exe_name mkgfsnemsioctl)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
nemsio
bacio_4
w3nco_d)
nemsio::nemsio
bacio::bacio_4
w3nco::w3nco_d)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
4 changes: 2 additions & 2 deletions sorc/nemsio_chgdate.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(exe_name nemsio_chgdate)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
nemsio
bacio_4)
nemsio::nemsio
bacio::bacio_4)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
6 changes: 3 additions & 3 deletions sorc/nemsio_get.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(exe_name nemsio_get)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
nemsio
bacio_4
w3nco_d)
nemsio::nemsio
bacio::bacio_4
w3nco::w3nco_d)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
6 changes: 3 additions & 3 deletions sorc/nemsio_read.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set(exe_name nemsio_read)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
nemsio
bacio_4
w3nco_d)
nemsio::nemsio
bacio::bacio_4
w3nco::w3nco_d)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
6 changes: 3 additions & 3 deletions sorc/nst_tf_chg.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ set(exe_name nst_tf_chg)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
nemsio
w3nco_d
bacio_4
nemsio::nemsio
w3nco::w3nco_d
bacio::bacio_4
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
8 changes: 4 additions & 4 deletions sorc/orog.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ set(exe_name orog)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}
bacio_4
w3nco_d
ip_d
sp_d
bacio::bacio_4
w3nco::w3nco_d
ip::ip_d
sp::sp_d
NetCDF::NetCDF_Fortran)
if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} OpenMP::OpenMP_Fortran)
Expand Down