[cmake] Link Python3 to unit tests

This commit is contained in:
Matthias Hochsteger 2019-03-29 15:27:52 +01:00
parent 0567fdd6d0
commit a874e64756

View File

@ -14,7 +14,7 @@ add_test(NAME unit_tests_built COMMAND ${CMAKE_COMMAND} --build . --target unit_
macro(add_unit_test name sources) macro(add_unit_test name sources)
add_executable(test_${name} ${sources} ) add_executable(test_${name} ${sources} )
target_link_libraries(test_${name} ngcore catch_main) target_link_libraries(test_${name} ngcore catch_main ${PYTHON_LIBRARIES})
add_dependencies(unit_tests test_${name}) add_dependencies(unit_tests test_${name})
add_test(NAME unit_${name} COMMAND test_${name}) add_test(NAME unit_${name} COMMAND test_${name})