set(CMAKE_CXX_EXTENSIONS OFF) | set(CMAKE_CXX_EXTENSIONS OFF) | ||||
include_directories("include") | |||||
add_library(ScopeGuard INTERFACE) | |||||
target_include_directories(ScopeGuard INTERFACE "include") | |||||
if( UNITTEST ) | if( UNITTEST ) |
function(add_test_suite name) | function(add_test_suite name) | ||||
add_executable(${name} ${name}.cpp) | add_executable(${name} ${name}.cpp) | ||||
target_link_libraries(${name} TestMain) | |||||
target_link_libraries(${name} TestMain ScopeGuard) | |||||
add_test(NAME ${name} COMMAND ${name}) | add_test(NAME ${name} COMMAND ${name}) | ||||
endfunction() | endfunction() | ||||