Skip to content

Commit 7d7943a

Browse files
committed
unittests: fix pythonpath
1 parent af74ca1 commit 7d7943a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

unittest/cpp/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ function(eigenpy_add_test name)
2323
NAME ${test_name}
2424
COMMAND $<TARGET_FILE:Python::Interpreter> ${CMAKE_CURRENT_SOURCE_DIR}/test_${name}.py
2525
)
26-
set_tests_properties(
27-
${test_name}
28-
PROPERTIES ENVIRONMENT "PYTHONPATH=$<TARGET_FILE_DIR:${name}>" DEPENDS ${name}
26+
set_property(
27+
TEST ${test_name}
28+
PROPERTY
29+
ENVIRONMENT_MODIFICATION
30+
"PYTHONPATH=path_list_prepend:$<TARGET_FILE_DIR:eigenpy>/.."
31+
"PYTHONPATH=path_list_prepend:$<TARGET_FILE_DIR:${name}>/.."
2932
)
3033
endfunction()
3134

0 commit comments

Comments
 (0)