Debian Codegraph @

Help/guide/tutorial/Step10/TutorialProject/Tests/CMakeLists.txt

raw
1 add_executable(TestMathFunctions)
2
3 target_sources(TestMathFunctions
4 PRIVATE
5 TestMathFunctions.cxx
6 )
7
8 # TODO1: Find the SimpleTest package. This should be a required dependency when
9 # building tests.
10
11 # TODO2: Add the SimpleTest::SimpleTest target to Test MathFunctions
12
13 target_link_libraries(TestMathFunctions
14 PRIVATE
15 MathFunctions
16 )
17
18 # TODO3: Replace MathFunctionTest and all the calls to it with
19 # simpletest_discover_tests called on TestMathFunctions
20
21 function(MathFunctionTest op)
22 add_test(
23 NAME ${op}
24 COMMAND TestMathFunctions ${op}
25 )
26 endfunction()
27
28 MathFunctionTest(add)
29 MathFunctionTest(mul)
30 MathFunctionTest(sqrt)
31 MathFunctionTest(sub)