Skip to content

Commit 26138a2

Browse files
committed
add fortran linker for cmake (instead of using a cxx linker)
1 parent e854563 commit 26138a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tests/hash_functions/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ generate_hash_arrays.cpp
1111

1212
add_library(libc_hash ${SRC})
1313

14+
set(CMAKE_FORTRAN_LINK_EXECUTABLE "<CMAKE_Fortran_COMPILER> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
1415

1516
add_executable(test_hash_functions test_hash_functions.f90)
1617
target_link_libraries(test_hash_functions "${PROJECT_NAME}" "test-drive::test-drive" "libc_hash")
1718
add_test(NAME hash_functions
1819
COMMAND $<TARGET_FILE:test_hash_functions> ${CMAKE_CURRENT_BINARY_DIR}
1920
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
21+
22+
set_target_properties(test_hash_functions PROPERTIES LINKER_LANGUAGE FORTRAN)

0 commit comments

Comments
 (0)