3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-25 00:22:34 +00:00

Merge pull request #6062 from YosysHQ/mmicko/tests_only

Add dependencies to gtests
This commit is contained in:
Miodrag Milanović 2026-07-22 13:39:05 +00:00 committed by GitHub
commit bc14cd7d18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -535,6 +535,7 @@ if (NOT YOSYS_BUILD_PYTHON_ONLY)
add_custom_target(test-unit
COMMAND ${CMAKE_CTEST_COMMAND} --test-dir tests/unit --output-on-failure
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPENDS $<$<TARGET_EXISTS:yosys-gtest-all>:yosys-gtest-all>
)
add_custom_target(test-vanilla

View file

@ -14,6 +14,7 @@ function(yosys_gtest arg_TARGET)
)
yosys_expand_components(test_components essentials ${arg_COMPONENTS})
yosys_link_components(${target} PRIVATE ${test_components})
add_dependencies(yosys-gtest-all ${target})
if(NOT CMAKE_CROSSCOMPILING)
gtest_discover_tests(${target})
@ -21,6 +22,8 @@ function(yosys_gtest arg_TARGET)
endfunction()
if (GTest_FOUND)
add_custom_target(yosys-gtest-all)
add_subdirectory(kernel)
add_subdirectory(opt)
add_subdirectory(techmap)