Debian Codegraph @

cmake/tribits/ctest_driver/TribitsGetCTestTestXmlDir.cmake

raw
1 #
2 # cmake -P script to get the CTest testing XML directory
3 # <build>/Testing/<buildstarttime> given just the <build> directory path.
4 #
5 # Usage:
6 #
7 # cmake \
8 # -DPROJECT_NAME=<projectName> \
9 # -D${PROJECT_NAME}_TRIBITS_DIR=<tribits-dir> \
10 # -DCTEST_BUILD_DIR=<build-dir> \
11 # -P <tribits-dir>/ctest_driver/TribitsGetCTestTestXmlDir.cmake
12 #
13 # This script reads in the <build-dir>/Testing/TAG to get <bulidstarttime> and
14 # then prints the directory <build>/Testing/<buildstarttime> to STDOUT.
15 #
16
17 cmake_minimum_required(VERSION 3.23.0 FATAL_ERROR)
18
19 if ("${PROJECT_NAME}" STREQUAL "")
20 message(FATAL_ERROR "Error, PROJECT_NAME must be set!")
21 endif()
22
23 if ("${${PROJECT_NAME}_TRIBITS_DIR}" STREQUAL "")
24 message(FATAL_ERROR "Error, ${PROJECT_NAME}_TRIBITS_DIR must be set!")
25 endif()
26
27 if ("${CTEST_BUILD_DIR}" STREQUAL "")
28 message(FATAL_ERROR "Error, CTEST_BUILD_DIR must be set!")
29 endif()
30
31 set( CMAKE_MODULE_PATH
32 "${${PROJECT_NAME}_TRIBITS_DIR}/core/utils"
33 "${${PROJECT_NAME}_TRIBITS_DIR}/core/package_arch"
34 "${${PROJECT_NAME}_TRIBITS_DIR}/ctest_driver"
35 )
36
37 include(TribitsReadTagFile)
38
39 set(TAG_FILE "${CTEST_BUILD_DIR}/Testing/TAG")
40
41 tribits_read_ctest_tag_file("${TAG_FILE}" buildStartTime cdashGroup cdashModel)
42
43 message("${CTEST_BUILD_DIR}/Testing/${buildStartTime}")