Skip to content

Commit e46df0a

Browse files
committed
Also use PROJECT_NAME for library dependency when linking tests
1 parent f088d43 commit e46df0a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tests/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
macro(ADDTEST name)
22
add_executable(test_${name} test_${name}.f90)
3-
target_link_libraries(test_${name} fortran_stdlib)
3+
target_link_libraries(test_${name} ${PROJECT_NAME})
44
add_test(NAME ${name}
55
COMMAND $<TARGET_FILE:test_${name}> ${CMAKE_CURRENT_BINARY_DIR}
66
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

src/tests/system/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
add_executable(test_sleep test_sleep.f90)
2-
target_link_libraries(test_sleep fortran_stdlib)
2+
target_link_libraries(test_sleep ${PROJECT_NAME})
33

44
add_test(NAME Sleep COMMAND $<TARGET_FILE:test_sleep> 350)
5-
set_tests_properties(Sleep PROPERTIES TIMEOUT 1)
5+
set_tests_properties(Sleep PROPERTIES TIMEOUT 1)

0 commit comments

Comments
 (0)