Bump to doxygen 1.9.2
[platform/upstream/doxygen.git] / testing / CMakeLists.txt
1 # run all tests sequentially (keep for backward compatibility)
2 add_custom_target(tests
3         COMMENT "Running doxygen tests..."
4         COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
5         DEPENDS doxygen
6 )
7
8 # get the files in the testing directory starting with 3 digits and an underscore
9 if (${CMAKE_VERSION} VERSION_EQUAL "3.11.0" OR ${CMAKE_VERSION} VERSION_GREATER "3.11.0")
10         file(GLOB TEST_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/[0-9][0-9][0-9]_*.*")
11 else()
12         file(GLOB TEST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/[0-9][0-9][0-9]_*.*")
13 endif()
14
15 foreach(TEST_FILE ${TEST_FILES})
16         # extract the test name from the file name
17         string(REGEX REPLACE "^.*/([0-9][0-9][0-9]*.*)\\.[^.]*$" "\\1" TEST_NAME "${TEST_FILE}")
18         # extract the test id from the file name
19         string(REGEX REPLACE "^.*/([0-9][0-9][0-9]*).*$" "\\1" TEST_ID "${TEST_FILE}")
20         # add a test target for each test
21         add_test(NAME ${TEST_NAME}
22                  COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --id ${TEST_ID} --doxygen $<TARGET_FILE:doxygen> --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
23         )
24 endforeach()