Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CamiTKSubProjectAdd.h
Go to the documentation of this file.
18  parse_arguments(ADD_SUB_PROJECT
19  "ACTIONCOMPONENTCEP_LIBRARYAPPLICATIONCORELIBDEPENDENCIES" # possible lists
20  "" #possible options
21  ${ARGN}
22  )
23 
24  # check types
25  if(ADD_SUB_PROJECT_ACTION)
26  set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_ACTION})
27  set(CAMITK_ACTION_TARGETS ${CAMITK_ACTION_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of CamiTK action targets" FORCE)
28  endif()
29  if(ADD_SUB_PROJECT_COMPONENT)
30  set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_COMPONENT})
31  set(CAMITK_COMPONENT_TARGETS ${CAMITK_COMPONENT_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of CamiTK component targets" FORCE)
32  endif()
33  if(ADD_SUB_PROJECT_CEP_LIBRARY)
34  set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CEP_LIBRARY})
35  set(CAMITK_CEP_LIBRARY_TARGETS ${CAMITK_CEP_LIBRARY_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of CamiTK CEP library targets" FORCE)
36  endif()
37  if(ADD_SUB_PROJECT_APPLICATION)
38  set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_APPLICATION})
39  set(CAMITK_APPLICATION_TARGETS ${CAMITK_APPLICATION_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of CamiTK applications targets" FORCE)
40  endif()
41  if(ADD_SUB_PROJECT_CORELIB)
42  set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CORELIB})
43  endif()
44 
45  # Create the xml node for this current subproject
46  set(xml_subproject "\n <SubProject name=\"${SUB_PROJECT_NAME}\">")
47  foreach(DEPENDENCY ${ADD_SUB_PROJECT_DEPENDENCIES})
48  set(xml_subproject ${xml_subproject} "\n <Dependency name=\"${DEPENDENCY}\"/>")
49  endforeach()
50  set(xml_subproject ${xml_subproject} " </SubProject>")
51  # Please note that no "\n" character is used, avoiding cmake cache to throw an "Offending entry"
52  # At the moment I did not find a way to solve this one.
53 
54  # Add it to the list of different nodes
55  set(CAMITK_XML_PROJECT_DESCRIPTION ${CAMITK_XML_PROJECT_DESCRIPTION} ${xml_subproject} CACHE INTERNAL "")
56  set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${SUB_PROJECT_NAME} CACHE INTERNAL "")
57 
58 end(){)
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
camitk_sub_project_add()
macro camitk_sub_project_add adds a subproject definition from targets and its dependencies (if any) ...
Definition: CamiTKSubProjectAdd.h:17