18 set(_indent_level
"${ARGV1}")
19 string(REPEAT
"\t" ${_indent_level} _INDENT_)
24 message(STATUS
"${_INDENT_}Setting up ${srcdir}")
25 add_subdirectory(
"${CMAKE_CURRENT_LIST_DIR}/${srcdir}")
26 include(
"${CMAKE_CURRENT_LIST_DIR}/${srcdir}/propagate_vars.cmake")
36macro(ensure_extra_tool_is_available tool_name)
38 get_property(available_extra_tools GLOBAL PROPERTY BUILDMASTER_PLUGINS_EXTRA_AVAILABLE)
39 list(FIND available_extra_tools
"${tool_name}" _found_index)
40 if(_found_index EQUAL -1)
41 message(FATAL_ERROR
"The extra tool '${tool_name}' is not available. Available extra tools are: ${available_extra_tools}")
51macro(propagate_vars_extra_tool tool_name)
53 get_property(configured_extra_tools GLOBAL PROPERTY BUILDMASTER_PLUGINS_EXTRA_ENABLED)
54 list(FIND configured_extra_tools
"${tool_name}" _found_index)
55 if(_found_index GREATER -1)
56 include(${tool_name}/propagate_vars.cmake)
63macro(propagate_all_vars_extra_tools)
65 get_property(configured_extra_tools GLOBAL PROPERTY BUILDMASTER_PLUGINS_EXTRA_ENABLED)
66 foreach(tool_name IN LISTS configured_extra_tools)
67 include(${BUILDMASTER_TOOLS_SRCDIR}/extra/${tool_name}/propagate_vars.cmake)
79macro(configure_extra_tool tool_name)
81 get_property(configured_extra_tools GLOBAL PROPERTY BUILDMASTER_PLUGINS_EXTRA_ENABLED)
84 list(FIND configured_extra_tools
"${tool_name}" _found_index)
86 if(_found_index EQUAL -1)
88 list(APPEND configured_extra_tools
"${tool_name}")
91 set_property(GLOBAL PROPERTY BUILDMASTER_PLUGINS_EXTRA_ENABLED
92 "${configured_extra_tools}")
95 add_subdirectory(${tool_name})
96 include(${tool_name}/propagate_vars.cmake)