1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-12-02 14:05:27 -05:00
polybar/tests/CMakeLists.txt

26 lines
736 B
Text
Raw Normal View History

2016-10-24 19:47:00 -04: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-14 23:32:35 -04:00
2017-01-26 11:17:02 -05:00
link_libraries(${libs})
include_directories(${dirs})
include_directories(${PROJECT_SOURCE_DIR}/src)
include_directories(${CMAKE_CURRENT_LIST_DIR})
2016-06-14 23:32:35 -04:00
2016-10-24 19:47:00 -04:00
function(unit_test file)
string(REPLACE "/" "_" testname ${file})
2017-01-26 11:17:02 -05:00
add_executable(unit_test.${testname} unit_tests/${file}.cpp)
2016-10-24 19:47:00 -04:00
add_test(unit_test.${testname} unit_test.${testname})
endfunction()
2016-06-14 23:32:35 -04:00
2017-01-26 11:17:02 -05:00
unit_test(utils/color)
unit_test(utils/math)
unit_test(utils/memory)
unit_test(utils/string)
unit_test(components/command_line)
# XXX: Requires mocked xcb connection
#unit_test("x11/connection")
#unit_test("x11/winspec")