Skip to content

Commit 2f94834

Browse files
Fix compilation with cce 17.0.1 (#37)
1 parent fe120ed commit 2f94834

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

src/multio/tools/CMakeLists.txt

+8-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ ecbuild_add_executable( TARGET multio-feed
4949
SOURCES multio-feed.cc MultioTool.cc
5050
LIBS multio-api )
5151

52-
# TODO ADD SOME FCKIT condition
53-
ecbuild_add_executable( TARGET multio-replay-nemo-fapi
54-
CONDITION HAVE_FORTRAN
55-
SOURCES multio-replay-nemo-fapi.f90
56-
LIBS multio-fapi fckit MPI::MPI_Fortran )
52+
ecbuild_find_mpi(COMPONENTS Fortran)
53+
if( HAVE_MPI AND TARGET MPI::MPI_Fortran )
54+
# TODO ADD SOME FCKIT condition
55+
ecbuild_add_executable( TARGET multio-replay-nemo-fapi
56+
CONDITION HAVE_FORTRAN
57+
SOURCES multio-replay-nemo-fapi.f90
58+
LIBS multio-fapi fckit MPI::MPI_Fortran )
59+
endif()
5760

5861
# TODO: add atlas condition/dependency
5962
ecbuild_add_executable( TARGET multio-generate-grib-template

tests/multio/CMakeLists.txt

+11-8
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,17 @@ ecbuild_add_test( TARGET test_multio_replay_nemo_capi_initdefault_passdown
232232
ENVIRONMENT "${_test_environment}"
233233
)
234234

235-
ecbuild_add_test( TARGET test_multio_replay_nemo_fapi
236-
CONDITION HAVE_FORTRAN
237-
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/replay-nemo.sh
238-
TEST_DEPENDS multio_replay_get_test_data
239-
ARGS $<TARGET_FILE:multio-replay-nemo-fapi>
240-
$<TARGET_FILE:multio-probe> ${MPIEXEC_EXECUTABLE} ${MPI_ARGS}
241-
ENVIRONMENT "${_test_environment}"
242-
)
235+
ecbuild_find_mpi(COMPONENTS Fortran)
236+
if( HAVE_MPI AND TARGET MPI::MPI_Fortran )
237+
ecbuild_add_test( TARGET test_multio_replay_nemo_fapi
238+
CONDITION HAVE_FORTRAN
239+
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/replay-nemo.sh
240+
TEST_DEPENDS multio_replay_get_test_data
241+
ARGS $<TARGET_FILE:multio-replay-nemo-fapi>
242+
$<TARGET_FILE:multio-probe> ${MPIEXEC_EXECUTABLE} ${MPI_ARGS}
243+
ENVIRONMENT "${_test_environment}"
244+
)
245+
endif()
243246

244247
ecbuild_add_test( TARGET test_multio_replay_nemo_capi_masked
245248
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/replay-nemo.sh

0 commit comments

Comments
 (0)