Skip to content

Commit 12b7f03

Browse files
authored
Fix TEST_SRCS property - use CMAKE_SOURCE_DIR (#154)
Let's use CMAKE_SOURCE_DIR instead of PROJECT_SOURCE_DIR in order to use the top-level CMakeLists path instead of the current project path.
1 parent 38cf865 commit 12b7f03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TestTargets.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ function(swift_add_test target)
403403
if(${absolute_src} MATCHES "${CMAKE_BINARY_DIR}.*")
404404
continue()
405405
endif()
406-
string(REPLACE ${PROJECT_SOURCE_DIR}/ "" relative_src ${absolute_src})
406+
string(REPLACE ${CMAKE_SOURCE_DIR}/ "" relative_src ${absolute_src})
407407

408408
set_property(GLOBAL
409409
APPEND_STRING

0 commit comments

Comments
 (0)