CMakeLists.txt 1000 B

12345678910111213141516171819202122232425262728293031323334
  1. cmake_minimum_required(VERSION 3.10)
  2. project(TestFindDoxygen VERSION 1.0 LANGUAGES NONE)
  3. find_package(Doxygen REQUIRED)
  4. set(DOXYGEN_PROJECT_BRIEF "String with spaces")
  5. set(DOXYGEN_ALIASES
  6. [[somealias="@some_command param"]]
  7. "anotherAlias=@foobar"
  8. )
  9. set(DOXYGEN_VERBATIM_VARS DOXYGEN_ALIASES)
  10. doxygen_add_docs(docsQuoting)
  11. if(NOT EXISTS "${PROJECT_BINARY_DIR}/Doxyfile.docsQuoting")
  12. message(FATAL_ERROR "Missing generated file: Doxyfile.docsQuoting")
  13. endif()
  14. file(STRINGS "${PROJECT_BINARY_DIR}/Doxyfile.docsQuoting" matches
  15. REGEX [[^PROJECT_BRIEF *= *"String with spaces"]]
  16. )
  17. if(NOT matches)
  18. message(FATAL_ERROR "PROJECT_BRIEF does not match expected contents")
  19. endif()
  20. file(STRINGS "${PROJECT_BINARY_DIR}/Doxyfile.docsQuoting" matches
  21. REGEX [[^ALIASES *= *somealias="@some_command param" anotherAlias=@foobar]]
  22. )
  23. if(NOT matches)
  24. message(FATAL_ERROR "ALIASES does not match expected contents")
  25. endif()
  26. add_custom_target(allDocTargets)
  27. add_dependencies(allDocTargets docsQuoting)