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

Option to install binaries to any directory. #685

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ find_package(ip 3.3.3 REQUIRED)
find_package(g2 3.4.3 REQUIRED)
find_package(sigio 2.3.0 REQUIRED)

# EMC requires executables in ./exec
set(exec_dir bin)
if(EMC_EXEC_DIR)
set(exec_dir exec)
endif()

# If doxygen documentation we enabled, build it. This must come before
# adding the source code directories; the main documentation build
# must happen before any of the utility document builds.
Expand Down
11 changes: 6 additions & 5 deletions build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ else
set -x
fi


# The unit test data download is part of the build system. Not all machines can
# access the EMC ftp site, so turn off the build (-DBUILD_TESTING=OFF) of the units tests accordingly.
# Those with access to the EMC ftp site are: Orion and Hera.

if [[ "$target" == "hera" || "$target" == "orion" || "$target" == "wcoss2" ]]; then
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DBUILD_TESTING=OFF"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DBUILD_TESTING=ON"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DENABLE_DOCS=ON -DBUILD_TESTING=ON"
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DBUILD_TESTING=OFF"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DBUILD_TESTING=ON"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DENABLE_DOCS=ON -DBUILD_TESTING=ON"
else
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DBUILD_TESTING=OFF"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DENABLE_DOCS=ON -DBUILD_TESTING=OFF"
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DBUILD_TESTING=OFF"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DENABLE_DOCS=ON -DBUILD_TESTING=OFF"
fi

rm -fr ./build
Expand Down
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ endif()

target_link_libraries(${exe_name} PRIVATE chgres_cube_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion sorc/cpld_gridgen.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ endif()

target_link_libraries(${exe_name} PRIVATE cpld_gridgen_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion sorc/emcsfc_ice_blend.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ target_link_libraries(
g2::g2_4
w3nco::w3nco_4)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion sorc/emcsfc_snow2mdl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ endif()

target_link_libraries(${exe_name} PRIVATE snow2mdl_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion sorc/fre-nctools.fd/tools/fregrid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ target_link_libraries(fregrid_lib

target_link_libraries(fregrid PRIVATE fregrid_lib)

install(TARGETS fregrid RUNTIME DESTINATION ${exec_dir})
install(TARGETS fregrid)
2 changes: 1 addition & 1 deletion sorc/fre-nctools.fd/tools/make_hgrid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ target_link_libraries(make_hgrid_lib

target_link_libraries(make_hgrid PRIVATE make_hgrid_lib)

install(TARGETS make_hgrid RUNTIME DESTINATION ${exec_dir})
install(TARGETS make_hgrid)
2 changes: 1 addition & 1 deletion sorc/fre-nctools.fd/tools/make_solo_mosaic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ target_link_libraries(make_solo_mosaic_lib

target_link_libraries(make_solo_mosaic PRIVATE make_solo_mosaic_lib)

install(TARGETS make_solo_mosaic RUNTIME DESTINATION ${exec_dir})
install(TARGETS make_solo_mosaic)
2 changes: 1 addition & 1 deletion sorc/fvcom_tools.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ target_link_libraries(

target_link_libraries(${exe_name} PRIVATE fvcom_tools_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion sorc/global_cycle.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif()

target_link_libraries(${exe_name} PRIVATE global_cycle_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion sorc/grid_tools.fd/filter_topo.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ target_link_libraries(

target_link_libraries(${exe_name} PRIVATE filter_topo_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})
2 changes: 1 addition & 1 deletion sorc/grid_tools.fd/global_equiv_resol.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ target_link_libraries(
${exe_name}
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})
2 changes: 1 addition & 1 deletion sorc/grid_tools.fd/regional_esg_grid.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ target_link_libraries(
${exe_name}
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})
2 changes: 1 addition & 1 deletion sorc/grid_tools.fd/shave.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ target_link_libraries(
${exe_name}
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})
2 changes: 1 addition & 1 deletion sorc/orog_mask_tools.fd/inland.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ target_link_libraries(

target_link_libraries(inland PRIVATE inland_lib)

install(TARGETS inland RUNTIME DESTINATION ${exec_dir})
install(TARGETS inland)
2 changes: 1 addition & 1 deletion sorc/orog_mask_tools.fd/lake.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ target_link_libraries(

target_link_libraries(lakefrac PRIVATE lakefrac_lib)

install(TARGETS lakefrac RUNTIME DESTINATION ${exec_dir})
install(TARGETS lakefrac)
2 changes: 1 addition & 1 deletion sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ endif()

target_link_libraries(orog PRIVATE orog_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})
2 changes: 1 addition & 1 deletion sorc/orog_mask_tools.fd/orog_gsl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ target_link_libraries(

target_link_libraries(${exe_name} PRIVATE orog_gsl_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})
2 changes: 1 addition & 1 deletion sorc/sfc_climo_gen.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ target_link_libraries(

target_link_libraries(${exe_name} PRIVATE sfc_climo_gen_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion sorc/vcoord_gen.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ target_include_directories(vcoord_gen_lib INTERFACE ${mod_dir})

target_link_libraries(${exe_name} vcoord_gen_lib)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})


# If doxygen documentation we enabled, build it.
Expand Down
2 changes: 1 addition & 1 deletion sorc/weight_gen.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ target_link_libraries(
sp::sp_d
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down