Skip to content

Commit

Permalink
Merge pull request #23 from NOAA-EMC/develop
Browse files Browse the repository at this point in the history
Version 2.5.1

Don't transitively add dependencies
  • Loading branch information
kgerheiser authored Jun 30, 2020
2 parents e422268 + 9f09769 commit 6278632
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ make install

### Version

2.5.0
2.5.1



Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.5.1
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ set_target_properties(${lib_name} PROPERTIES Fortran_MODULE_DIRECTORY
target_include_directories(${lib_name} INTERFACE
$<BUILD_INTERFACE:${module_dir}>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${lib_name} PRIVATE MPI::MPI_Fortran bacio::bacio_4 w3nco::w3nco_d)

#depends on w3nco and bacio, but users must link their own version
target_link_libraries(${lib_name} PRIVATE MPI::MPI_Fortran)
list(APPEND LIB_TARGETS ${lib_name})

install(DIRECTORY ${module_dir} DESTINATION ${CMAKE_INSTALL_PREFIX})
Expand Down
5 changes: 2 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

set(tstName read_nemsio)
set(srcName read_nemsio.f90)
set(exeName read_nemsio.x)
Expand All @@ -9,10 +8,10 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink

add_executable(${exeName} ${srcName})
add_dependencies(${exeName} nemsio)
target_link_libraries( ${exeName} PUBLIC nemsio)
target_link_libraries( ${exeName} PUBLIC nemsio bacio::bacio_4 w3nco::w3nco_d)
add_test(NAME ${tstName} COMMAND ${exeName} testdataset)

add_pfunit_ctest (nemsio_test
TEST_SOURCES test_mod.pf
LINK_LIBRARIES nemsio
LINK_LIBRARIES nemsio bacio::bacio_4 w3nco::w3nco_d
)
8 changes: 4 additions & 4 deletions utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
add_executable(nemsio_read nemsio_read.f90)
target_link_libraries(nemsio_read nemsio)
target_link_libraries(nemsio_read nemsio bacio::bacio_4 w3nco::w3nco_d)

add_executable(nemsio_get nemsio_get.f90)
target_link_libraries(nemsio_get nemsio)
target_link_libraries(nemsio_get nemsio bacio::bacio_4 w3nco::w3nco_d)

add_executable(nemsio_chgdate nemsio_chgdate.f90)
target_link_libraries(nemsio_chgdate nemsio)
target_link_libraries(nemsio_chgdate nemsio bacio::bacio_4 w3nco::w3nco_d)

add_executable(mkgfsnemsioctl mkgfsnemsioctl.f90)
target_link_libraries(mkgfsnemsioctl nemsio)
target_link_libraries(mkgfsnemsioctl nemsio bacio::bacio_4 w3nco::w3nco_d)

install(TARGETS nemsio_read nemsio_get nemsio_chgdate mkgfsnemsioctl
RUNTIME DESTINATION bin COMPONENT utilities)
Expand Down

0 comments on commit 6278632

Please sign in to comment.