File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 7
7
8
8
if (BUILD_TESTING)
9
9
set (TESTS
10
- testmain
11
10
testCategory testFixedContextCategory testNDC testPattern
12
11
testErrorCollision testPriority testFilter testProperties
13
12
testConfig testPropertyConfig testRollingFileAppender testDailyRollingFileAppender
@@ -28,19 +27,23 @@ if(BUILD_TESTING)
28
27
${PROJECT_SOURCE_DIR} /src
29
28
)
30
29
30
+ add_executable (testmain EXCLUDE_FROM_ALL testmain.cpp)
31
+ target_link_libraries (testmain ${LOG4CPP_LIBRARY_NAME} -pthread)
32
+ #add_test(NAME testmain COMMAND testmain)
33
+
34
+ add_executable (testbench EXCLUDE_FROM_ALL Clock.cpp Clock.hh testbench.cpp)
35
+ target_link_libraries (testbench ${LOG4CPP_LIBRARY_NAME} -pthread)
36
+ #add_test(NAME testbench COMMAND testbench)
37
+
31
38
foreach (test ${TESTS} )
32
39
add_executable (${test} EXCLUDE_FROM_ALL ${test} .cpp)
33
40
target_link_libraries (${test} ${LOG4CPP_LIBRARY_NAME} -pthread)
34
41
add_test (NAME ${test} COMMAND ${test} )
35
42
endforeach ()
36
43
37
- add_executable (testbench EXCLUDE_FROM_ALL Clock.cpp Clock.hh testbench.cpp)
38
- target_link_libraries (testbench ${LOG4CPP_LIBRARY_NAME} -pthread)
39
- add_test (NAME testbench COMMAND testbench)
40
-
41
44
add_custom_target (check
42
45
COMMAND ctest -V
43
- DEPENDS ${TESTS} testbench
46
+ DEPENDS ${TESTS}
44
47
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
45
48
)
46
49
You can’t perform that action at this time.
0 commit comments