forked from enlightenment/efl
EflMacros: build tests before running them.
'make test' wouldn't build the test, which is annoying. There is no way to add dependencies to reserved target 'test'. The test is also executed by another tool (ctest), not cmake itself, then we must create a test '-build' that is actually calling back cmake to compile the test suite and make it a dependency for the test itself. Nasty but improves usability.
This commit is contained in:
parent
f009bc8b2b
commit
b10fc88bb0
|
@ -766,6 +766,9 @@ function(EFL_TEST _testname)
|
|||
|
||||
add_test(NAME ${_testname} COMMAND ${_testtarget})
|
||||
LIST_APPEND_GLOBAL(${EFL_LIB_CURRENT}_TESTS ${_testtarget})
|
||||
|
||||
add_test(${_testname}-build "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_testtarget})
|
||||
set_tests_properties(${_testname} PROPERTIES DEPENDS ${_testname}-build)
|
||||
endfunction()
|
||||
|
||||
# EFL_MODULE(Name)
|
||||
|
|
Loading…
Reference in New Issue