2 #! Create a Command Line App. 4 #! \brief This function will create a command line executable and the scripts required to run it 6 #! \param NAME (required) Name of the command line app 7 #! \param DEPENDS (optional) Required MITK modules beyond MitkCommandLine 8 #! \param PACKAGE_DEPENDS (optional) list of "packages" this command line app depends on (e.g. ITK, VTK, etc.) 9 #! \param CPP_FILES (optional) list of cpp files, if it is not given NAME.cpp is assumed 11 #! Assuming that there exists a file called <code>MyApp.cpp</code>, an example call looks like: 13 #! mitkFunctionCreateCommandLineApp( 15 #! DEPENDS MitkCore MitkPlanarFigure 16 #! PACKAGE_DEPENDS ITK VTK 27 set(_function_multiparams
28 DEPENDS # list of modules
this command
line app depends on
29 PACKAGE_DEPENDS # list of
"packages" this command
line app depends on (e.g. ITK, VTK, etc.)
30 CPP_FILES
# (optional) list of cpp files, if it is not given NAME.cpp is assumed 37 cmake_parse_arguments(CMDAPP
"${_function_options}" "${_function_params}" "${_function_multiparams}" ${ARGN})
40 message(FATAL_ERROR
"NAME argument cannot be empty.")
43 if(NOT CMDAPP_CPP_FILES)
44 set(CMDAPP_CPP_FILES ${CMDAPP_NAME}.cpp)
46 if(CMDAPP_WARNINGS_NO_ERRORS)
47 LIST(APPEND _CMDAPP_OPTIONS WARNINGS_NO_ERRORS)
50 DEPENDS MitkCommandLine ${CMDAPP_DEPENDS}
51 PACKAGE_DEPENDS ${CMDAPP_PACKAGE_DEPENDS}
52 CPP_FILES ${CMDAPP_CPP_FILES}
mitkFunctionCreateCommandLineApp()
This function will create a command line executable and the scripts required to run it...