Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CamiTKInitTest.h
Go to the documentation of this file.
1 #
38  parse_arguments(CAMITK_INIT_TEST
39  "" # possible lists
40  ""
41  ${ARGN}
42  )
43 
44  set(CAMITK_TEST_ID "0")
45  set(CAMITK_TEST_LIST "")
46 
47  # check for executable
48  if(NOT CAMITK_INIT_TEST_DEFAULT_ARGS)
49  message(FATAL_ERROR "Initializing test ${CAMITK_TEST_BASENAME} cannot proceed: please specify the target in brackets")
50  else()
51  if(NOT TARGET ${CAMITK_INIT_TEST_DEFAULT_ARGS})
52  message(FATAL_ERROR "Initializing test ${CAMITK_TEST_BASENAME} cannot proceed: ${CAMITK_INIT_TEST_DEFAULT_ARGS} is not a proper target")
53  endif()
54  get_target_property( APP_NAME ${CAMITK_INIT_TEST_DEFAULT_ARGS} OUTPUT_NAME )
55  set( APP_SUFFIX "" )
56  if(MSVC)
57  get_target_property( APP_SUFFIX ${CAMITK_INIT_TEST_DEFAULT_ARGS} DEBUG_POSTFIX )
58  endif()
59 # message( STATUS "CAMITK_INIT_TEST_DEFAULT_ARGS " ${CAMITK_INIT_TEST_DEFAULT_ARGS} "APP_SUFFIX " ${APP_SUFFIX} "APP_NAME " ${APP_NAME})
60  endif()
61  set(CAMITK_TEST_BASENAME ${CAMITK_INIT_TEST_DEFAULT_ARGS})
62 # message(STATUS "Initializing test series for ${CAMITK_TEST_BASENAME}")
63  set( CAMITK_INIT_TEST_EXECUTABLE ${CAMITK_BUILD_BIN_DIR}/${APP_NAME}${APP_SUFFIX} ) #Here, it is not the application name we give but the name of the binary to be executed.
64 end(){)
camitk_init_test()
camitk_init_test is a macro to initialize a group of test (for the same command) It is used to initia...
Definition: CamiTKInitTest.h:37
parse_arguments()
macro parse_arguments is a fork from CMakeMacroParseArguments see http://www.cmake.org/Wiki/CMakeMacroParseArguments for more information
Definition: ParseArguments.h:13
set(CAMITK_TEST_COMMAND_FILE ${CAMITK_TEST_OUTPUT_DIR}/command) set(CAMITK_TEST_COMMAND_RESULT_FILE $
This CMake file run a command and put the output in a given file.
Definition: CamiTKTestPassFile.h:11