Computer Assited Medical Intervention Tool Kit
version 4.1
|
Go to the source code of this file.
Functions | |
test result | execute_process (COMMAND ${CMAKE_COMMAND} -E remove -f ${CAMITK_TEST_COMMAND_FILE} ${CAMITK_TEST_COMMAND_RESULT_FILE} ${CAMITK_TEST_COMMAND_OUTPUT_FILE} ${CAMITK_TEST_PASS_FILE_COMMAND_FILE} ${CAMITK_TEST_PASS_FILE_OUTPUT_FILE} ${CAMITK_TEST_PASS_FILE_RESULT_FILE}) file(WRITE $ |
set (CAMITK_TEST_COMMAND_FILE ${CAMITK_TEST_OUTPUT_DIR}/command) set(CAMITK_TEST_COMMAND_RESULT_FILE $ | |
This CMake file run a command, put the command output in a given file and check if the command output is the same as the given input file. More... | |
command result | set (CAMITK_TEST_COMMAND_OUTPUT_FILE ${CAMITK_TEST_OUTPUT_DIR}/command-output) set(CAMITK_TEST_PASS_FILE_COMMAND_FILE $ |
test | set (CAMITK_TEST_PASS_FILE_OUTPUT_FILE ${CAMITK_TEST_OUTPUT_DIR}/test-output) set(CAMITK_TEST_PASS_FILE_RESULT_FILE $ |
test result execute_process | ( | COMMAND ${CMAKE_COMMAND} -E remove -f ${CAMITK_TEST_COMMAND_FILE} ${CAMITK_TEST_COMMAND_RESULT_FILE} ${CAMITK_TEST_COMMAND_OUTPUT_FILE} ${CAMITK_TEST_PASS_FILE_COMMAND_FILE} ${CAMITK_TEST_PASS_FILE_OUTPUT_FILE} ${CAMITK_TEST_PASS_FILE_RESULT_FILE} | ) |
References endif().
Referenced by camitk_communityedition_packaging(), and get_filename_component().
set | ( | CAMITK_TEST_COMMAND_FILE ${CAMITK_TEST_OUTPUT_DIR}/ | command | ) |
This CMake file run a command, put the command output in a given file and check if the command output is the same as the given input file.
Use this CMake file to test if a command returns the same log as a given expected log.
Inspired from http://stackoverflow.com/questions/3305545/how-to-adapt-my-unit-tests-to-cmake-and-ctest and http://www.cmake.org/pipermail/cmake/2009-July/030619.html
command result set | ( | CAMITK_TEST_COMMAND_OUTPUT_FILE ${CAMITK_TEST_OUTPUT_DIR}/command- | output | ) |
test set | ( | CAMITK_TEST_PASS_FILE_OUTPUT_FILE ${CAMITK_TEST_OUTPUT_DIR}/test- | output | ) |