summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step2/Exercise3.cmake
blob: 439aa2514e14617f2fe2f8a91d36dd7b8c004159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.23)


# TODO4: Set the SKIP_TESTS variable to a true value, so that the tests from
#        Exercise1 and Exercise2 are skipped


# TODO5: Include Exercise1.cmake and Exercise2.cmake


set(InList FooBar QuxBar)

# TODO6: Append FooBaz and QuxBaz to InList with FuncAppend


if(NOT InList STREQUAL "FooBar;QuxBar;FooBaz;QuxBaz")
  message(WARNING "Append failed, InList contains: ${InList}")
endif()


# TODO7: Filter InList with FilterFoo, use OutList as the output variable


check_contains(FooBar)
check_contains(FooBaz)
check_nonfoo(${OutList})

if(NOT Failed)
  message("Success!")
endif()