]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | include_directories(../src) |
2 | include_directories(../support/src) | |
3 | include_directories(../sim/src) | |
7c673cae FG |
4 | |
5 | set(support_srcs ../sim/src/test_dmclock.cc) | |
6 | set(test_srcs | |
7 | test_test_client.cc | |
8 | test_dmclock_server.cc | |
9 | test_dmclock_client.cc | |
10 | ) | |
11 | ||
12 | set_source_files_properties(${core_srcs} ${test_srcs} | |
13 | PROPERTIES | |
14 | COMPILE_FLAGS "${local_flags}" | |
15 | ) | |
16 | ||
17 | add_executable(dmclock-tests ${test_srcs} ${support_srcs}) | |
18 | ||
19 | if (TARGET gtest AND TARGET gtest_main) | |
20 | add_dependencies(dmclock-tests gtest gtest_main) | |
21 | target_link_libraries(dmclock-tests | |
22 | LINK_PRIVATE $<TARGET_FILE:dmclock> | |
23 | pthread | |
24 | $<TARGET_FILE:gtest> | |
25 | $<TARGET_FILE:gtest_main>) | |
26 | else() | |
27 | target_link_libraries(dmclock-tests | |
31f18b77 | 28 | LINK_PRIVATE $<TARGET_FILE:dmclock> pthread ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}) |
7c673cae FG |
29 | endif() |
30 | ||
31 | add_dependencies(dmclock-tests dmclock) |