diff --git a/npc/CMakeLists.txt b/npc/CMakeLists.txt index ead1658..3c5d300 100644 --- a/npc/CMakeLists.txt +++ b/npc/CMakeLists.txt @@ -83,8 +83,15 @@ foreach(TOPMODULE IN LISTS TOPMODULES) add_dependencies(V${TOPMODULE} ChiselBuild_${TOPMODULE}) enable_testing() - add_test(NAME V${TOPMODULE}_test COMMAND V${TOPMODULE}) - set_tests_properties(V${TOPMODULE}_test PROPERTIES DEPENDS V${TOPMODULE}) + add_test(V${TOPMODULE}_build + "${CMAKE_COMMAND}" + --build "${CMAKE_BINARY_DIR}" + --config "$" + --target V${TOPMODULE} + ) + set_tests_properties(V${TOPMODULE}_build PROPERTIES FIXTURES_SETUP V${TOPMODULE}_fixture) + add_test(NAME V${TOPMODULE} COMMAND V${TOPMODULE}) + set_tests_properties(V${TOPMODULE} PROPERTIES FIXTURES_REQUIRED V${TOPMODULE}_fixture) # -- Add build tracking add_custom_command(