Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
# - Find StatTest
|
||||
# This module tries to find the StatTest application
|
||||
# Once done this will define
|
||||
#
|
||||
#
|
||||
# STATTEST_FOUND - Application found
|
||||
# STATTEST_APP - Application
|
||||
# STATTEST_CMD - Command line to run the application
|
||||
# STATTEST_ADD_TEST - Helper function to define a ctest using
|
||||
# StatTest (Only if we are using for G4 testing)
|
||||
#
|
||||
# Variables used by this module, which can change the default behaviour
|
||||
# Variables used by this module, which can change the default behaviour
|
||||
# and need to be set before calling find_package
|
||||
#
|
||||
# STATTEST_ROOT_DIR Root directory to StatTest package
|
||||
@@ -22,7 +22,7 @@ if(NOT GEANT4_ENABLE_TESTING)
|
||||
endif()
|
||||
|
||||
#Search application
|
||||
#Note that the second suggested path is G4 specific...
|
||||
#Note that the second suggested path is G4 specific...
|
||||
find_path(STATTEST_APP_DIR
|
||||
NAMES StatTestVersion.py
|
||||
PATHS ${STATTEST_ROOT_DIR} ${CMAKE_SOURCE_DIR}/verification/StatTest
|
||||
@@ -43,7 +43,7 @@ if(NOT ROOT_FOUND)
|
||||
set(_root_isok FALSE)
|
||||
else()
|
||||
set(_root_isok TRUE)
|
||||
# - Check if python interpreter is correct version
|
||||
# - Check if python interpreter is correct version
|
||||
# (the one compatible with root)
|
||||
find_package(PythonInterp ${ROOT_PYTHONVER} QUIET)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
@@ -70,9 +70,9 @@ if(STATTEST_FOUND)
|
||||
set(STATTEST_APP ${STATTEST_APP_DIR}/runtests.py)
|
||||
set(STATTEST_CMD ${PYTHON_EXECUTABLE} ${STATTEST_APP})
|
||||
|
||||
# Let's create a function that helps in building tests for
|
||||
# Let's create a function that helps in building tests for
|
||||
# regression testing
|
||||
# function STATTEST_ADD_TEST(<name>
|
||||
# function STATTEST_ADD_TEST(<name>
|
||||
# G4TEST testname
|
||||
# CONFIG conffile
|
||||
# INPUT inputfile
|
||||
@@ -82,7 +82,7 @@ if(STATTEST_FOUND)
|
||||
# [LABELS label1 label2 ...]
|
||||
# [IMG filename])
|
||||
function(STATTEST_ADD_TEST stattest)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG;TEXT"
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG;TEXT"
|
||||
"CONFIG;INPUT;REFERENCE;G4TEST;IMG"
|
||||
"LABELS" ${ARGN}
|
||||
)
|
||||
@@ -91,12 +91,12 @@ if(STATTEST_FOUND)
|
||||
if(_len LESS 1)
|
||||
message(FATAL_ERROR "STATTEST_ADD_TEST: conffile is mandatory")
|
||||
endif()
|
||||
|
||||
|
||||
list(LENGTH ARG_INPUT _len)
|
||||
if(_len LESS 1)
|
||||
message(FATAL_ERROR "STATTEST_ADD_TEST: inputfile is mandatory")
|
||||
endif()
|
||||
|
||||
|
||||
list(LENGTH ARG_G4TEST _len)
|
||||
if(_len LESS 1)
|
||||
message(FATAL_ERROR "STATTEST_ADD_TEST: testname is mandatory")
|
||||
@@ -108,10 +108,10 @@ if(STATTEST_FOUND)
|
||||
else()
|
||||
set(_command ${STATTEST_CMD})
|
||||
endif()
|
||||
|
||||
|
||||
if(ARG_TEXT)
|
||||
set(_command ${_command} "-T")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#Mandatory parameters
|
||||
set(_command ${_command} ${ARG_CONFIG} ${ARG_INPUT})
|
||||
@@ -125,10 +125,10 @@ if(STATTEST_FOUND)
|
||||
set(_labels "")
|
||||
endif()
|
||||
|
||||
include(Geant4CTest)
|
||||
|
||||
include(G4CTest)
|
||||
|
||||
#Now build G4 test
|
||||
GEANT4_ADD_TEST(${stattest}
|
||||
GEANT4_ADD_TEST(${stattest}
|
||||
COMMAND ${_command}
|
||||
DEPENDS ${ARG_G4TEST}
|
||||
LABELS ${_labels}
|
||||
|
||||
Reference in New Issue
Block a user