camitk_application( ADDITIONAL_SOURCES CommandLineOptions.cxx CommandLineOptions.hxx
                    CEP_NAME SDK
                    NEEDS_VIEWER_EXTENSION actionviewer interactivesliceviewer interactivegeometryviewer medicalimageviewer componentexplorer transformationexplorer propertyexplorer 
                    DESCRIPTION "All-in-one application to load actions and components and interact with them"
)


#-----------------------------------------------------------------------------
# Testing the application be ran (no linkage error) + command-line robustness
#-----------------------------------------------------------------------------
set(TEST_BASENAME ${APPLICATION_TARGET_NAME})
camitk_init_test(${TEST_BASENAME})
# should pass because invoking testcomponents without arguments or with help arg shows usage and exit success
camitk_add_test(EXECUTABLE_ARGS "--help" PROJECT_NAME ${TEST_BASENAME} TEST_SUFFIX "-")
camitk_add_test(EXECUTABLE_ARGS "-h"     PROJECT_NAME ${TEST_BASENAME} TEST_SUFFIX "-")

# should pass because invoking testcomponents with a faulty arguments results in printing
# an "Argument error" message (and exit failure)
camitk_add_test(EXECUTABLE_ARGS "-badarg" 
                PASS_REGULAR_EXPRESSION "unknown option '-badarg'"
                PROJECT_NAME ${TEST_BASENAME} TEST_SUFFIX "-")