Skip to content

Commit bd7917d

Browse files
committed
Issue deprecation warning for FC=mpifort
- Also fix issue in CAF script arising from the use of FC=mpifort
1 parent 994d436 commit bd7917d

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,11 @@ get_filename_component( C_COMPILER_DIR "${CMAKE_C_COMPILER}"
214214
REALPATH )
215215

216216
if (FTN_COMPILER_NAME MATCHES "^[mM][pP][iI]")
217+
message( DEPRECATION "Setting the Fortran compiler to an MPI wrapper script is deprecated!")
217218
set (MPI_Fortran_COMPILER "${CMAKE_Fortran_COMPILER}")
218219
endif()
219220
if (C_COMPILER_NAME MATCHES "^[mM][pP][iI]")
221+
message( DEPRECATION "Setting the Fortran compiler to an MPI wrapper script is deprecated!")
220222
set (MPI_C_COMPILER "${CMAKE_C_COMPILER}")
221223
endif()
222224

src/extensions/caf.in

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,16 @@ if [[ -n "${mpi_link_flags[*]:-}" ]]; then
195195
fi
196196

197197
# Now do libraries, IN CORRECT ORDER, to append to command
198-
for lib in "${caf_libs[@]:-}"; do
199-
caf_added_libs+=("${prefix%/}/${lib}")
200-
done
201-
for lib in "${mpi_libs[@]:-}"; do
202-
caf_added_libs+=("${lib}")
203-
done
198+
if [[ -n "${caf_libs[*]:-}" ]]; then
199+
for lib in "${caf_libs[@]:-}"; do
200+
caf_added_libs+=("${prefix%/}/${lib}")
201+
done
202+
fi
203+
if [[ -n "${mpi_libs[*]:-}" ]]; then
204+
for lib in "${mpi_libs[@]:-}"; do
205+
caf_added_libs+=("${lib}")
206+
done
207+
fi
204208

205209
usage() {
206210
echo ""

0 commit comments

Comments
 (0)