Exercise3.cmake 627 B

123456789101112131415161718192021222324252627282930
  1. cmake_minimum_required(VERSION 3.23)
  2. # TODO4: Set the SKIP_TESTS variable to a true value, so that the tests from
  3. # Exercise1 and Exercise2 are skipped
  4. # TODO5: Include Exercise1.cmake and Exercise2.cmake
  5. set(InList FooBar QuxBar)
  6. # TODO6: Append FooBaz and QuxBaz to InList with FuncAppend
  7. if(NOT InList STREQUAL "FooBar;QuxBar;FooBaz;QuxBaz")
  8. message(WARNING "Append failed, InList contains: ${InList}")
  9. endif()
  10. # TODO7: Filter InList with FilterFoo, use OutList as the output variable
  11. check_contains(FooBar)
  12. check_contains(FooBaz)
  13. check_nonfoo(${OutList})
  14. if(NOT Failed)
  15. message("Success!")
  16. endif()