Skip to content

Commit 3c7f5d8

Browse files
committed
Replace hardcoded library paths by generator expr
The `STATIC` keyword for the targets `opencoarrays_mod` and `opencoarrays_test_utilities` could now probably be removed.
1 parent d861abf commit 3c7f5d8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -543,17 +543,17 @@ function(caf_compile_executable target main_depend)
543543
foreach(d ${DirDefs})
544544
list(APPEND localDefs "-D${d}")
545545
endforeach()
546-
add_custom_command(OUTPUT "${target}"
547-
COMMAND "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/caf"
548-
${includes} ${localDefs} ${config_Fortran_flags}
549-
-o "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target}"
550-
"${CMAKE_CURRENT_SOURCE_DIR}/${main_depend}"
551-
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopencoarrays_test_utilities.a"
552-
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopencoarrays_mod.a"
553-
${ARGN}
554-
DEPENDS "${main_depend}" ${ARGN} caf_mpi_static opencoarrays_test_utilities opencoarrays_mod
555-
VERBATIM
556-
)
546+
add_custom_command(OUTPUT "${target}"
547+
COMMAND "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/caf"
548+
${includes} ${localDefs} ${config_Fortran_flags}
549+
-o "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target}"
550+
"${CMAKE_CURRENT_SOURCE_DIR}/${main_depend}"
551+
$<TARGET_FILE:opencoarrays_test_utilities>
552+
$<TARGET_FILE:opencoarrays_mod>
553+
${ARGN}
554+
DEPENDS "${main_depend}" ${ARGN} caf_mpi_static opencoarrays_test_utilities opencoarrays_mod
555+
VERBATIM
556+
)
557557
add_custom_target("build_${target}" ALL
558558
DEPENDS "${target}")
559559
endfunction(caf_compile_executable)

src/mpi/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ configure_file("${CMAKE_SOURCE_DIR}/src/extensions/caf.in" "${CMAKE_BINARY_DIR}/
308308
@ONLY)
309309

310310

311-
# List of carrun.in variables needing configuration:
311+
# List of cafrun.in variables needing configuration:
312312
#
313313
# @CAF_VERSION@ @MPIEXEC@ @MPIEXEC_NUMPROC_FLAG@ @MPIEXEC_PREFLAGS@ @MPIEXEC_POSTFLAGS@
314314
# @HAVE_FAILED_IMG@

0 commit comments

Comments
 (0)