File: CMakeLists.txt

package info (click to toggle)
doxygen 1.9.8%2Bds-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,000 kB
  • sloc: cpp: 215,370; lex: 42,621; python: 32,388; ansic: 26,705; xml: 15,390; javascript: 8,352; yacc: 581; f90: 455; php: 441; perl: 378; makefile: 195; sh: 24; objc: 14; cs: 5; java: 1
file content (24 lines) | stat: -rw-r--r-- 1,281 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# run all tests sequentially (keep for backward compatibility)
add_custom_target(tests
  COMMENT "Running doxygen tests..."
  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
  DEPENDS doxygen
)

# get the files in the testing directory starting with 3 digits and an underscore
if (${CMAKE_VERSION} VERSION_EQUAL "3.11.0" OR ${CMAKE_VERSION} VERSION_GREATER "3.11.0")
  file(GLOB TEST_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/[0-9][0-9][0-9]_*.*")
else()
  file(GLOB TEST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/[0-9][0-9][0-9]_*.*")
endif()

foreach(TEST_FILE ${TEST_FILES})
  # extract the test name from the file name
  string(REGEX REPLACE "^.*/([0-9][0-9][0-9]*.*)\\.[^.]*$" "\\1" TEST_NAME "${TEST_FILE}")
  # extract the test id from the file name
  string(REGEX REPLACE "^.*/([0-9][0-9][0-9]*).*$" "\\1" TEST_ID "${TEST_FILE}")
  # add a test target for each test
  add_test(NAME ${TEST_NAME}
    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
  )
endforeach()