2016-10-24 23:47:00 +00:00
|
|
|
#
|
|
|
|
# Based on https://github.com/modern-cpp-examples/match3/blob/master/test/CMakeLists.txt
|
|
|
|
#
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -include common/test.hpp")
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2016-10-24 23:47:00 +00:00
|
|
|
include_directories(${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
include_directories(${APP_INCLUDE_DIRS})
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2016-10-24 23:47:00 +00:00
|
|
|
function(unit_test file)
|
|
|
|
string(REPLACE "/" "_" testname ${file})
|
|
|
|
add_executable(unit_test.${testname} ${CMAKE_CURRENT_LIST_DIR}/unit_tests/${file}.cpp)
|
|
|
|
add_test(unit_test.${testname} unit_test.${testname})
|
|
|
|
endfunction()
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2016-10-31 00:21:24 +00:00
|
|
|
unit_test("utils/color")
|
2016-10-25 05:04:14 +00:00
|
|
|
unit_test("utils/math")
|
2016-10-24 23:47:00 +00:00
|
|
|
unit_test("utils/memory")
|
|
|
|
unit_test("utils/string")
|
|
|
|
unit_test("components/command_line")
|
|
|
|
unit_test("components/di")
|
|
|
|
#unit_test("components/logger")
|
2016-11-02 19:22:45 +00:00
|
|
|
#unit_test("x11/color")
|
|
|
|
#unit_test("x11/connection")
|
|
|
|
#unit_test("x11/window")
|