File: RunCTest.cmake

package info (click to toggle)
cmake 3.25.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 121,376 kB
  • sloc: ansic: 361,053; cpp: 250,806; sh: 3,828; yacc: 3,243; python: 2,707; lex: 1,328; lisp: 382; asm: 371; f90: 314; java: 266; perl: 217; objc: 212; xml: 202; cs: 200; fortran: 131; makefile: 99; javascript: 83; pascal: 63; tcl: 55; php: 25; ruby: 22
file content (25 lines) | stat: -rw-r--r-- 968 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
include(RunCMake)

function(run_ctest CASE_NAME)
  configure_file(${RunCMake_SOURCE_DIR}/test.cmake.in
                 ${RunCMake_BINARY_DIR}/${CASE_NAME}/test.cmake @ONLY)
  if(EXISTS "${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in")
    configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in
                   ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake @ONLY)
  else()
    file(REMOVE ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake)
  endif()
  configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in
                 ${RunCMake_BINARY_DIR}/${CASE_NAME}/CMakeLists.txt @ONLY)
  if(NOT DEFINED RunCTest_VERBOSE_FLAG)
    set(RunCTest_VERBOSE_FLAG "-V")
  endif()
  run_cmake_command(${CASE_NAME} ${CMAKE_CTEST_COMMAND}
    -C Debug
    -S ${RunCMake_BINARY_DIR}/${CASE_NAME}/test.cmake
    ${RunCTest_VERBOSE_FLAG}
    --output-log ${RunCMake_BINARY_DIR}/${CASE_NAME}-build/testOutput.log
    --no-compress-output
    ${ARGN}
    )
endfunction()