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:
commit
bc14cd7d18
2 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue