feat(test): added testing setup
This commit is contained in:
parent
143d3769c7
commit
d086cf629b
2 changed files with 10 additions and 0 deletions
|
@ -14,6 +14,9 @@ set(USE_CCACHE ON)
|
|||
|
||||
add_subdirectory(autogen)
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
|
||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
|
||||
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
|
||||
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
|
||||
|
|
7
tests/CMakeLists.txt
Normal file
7
tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
function (create_test TEST_NAME)
|
||||
set(TARGET_NAME test_${TEST_NAME})
|
||||
add_executable(${TARGET_NAME} ${ARGN})
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE openblocks)
|
||||
add_dependencies(${TARGET_NAME} openblocks)
|
||||
add_test(NAME ${TARGET_NAME} COMMAND ${TARGET_NAME})
|
||||
endfunction ()
|
Loading…
Add table
Reference in a new issue