Browse Source

Improved target handling.

main
offa 7 years ago
parent
commit
f3b4c202d1
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      CMakeLists.txt
  2. +1
    -1
      test/CMakeLists.txt

+ 2
- 1
CMakeLists.txt View File

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 )

+ 1
- 1
test/CMakeLists.txt View File



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()



Loading…
Cancel
Save