Classes | |
class | CMake |
class | Command |
class | CommandGroup |
class | Section |
class | SectionStyle |
Functions | |
def | get_ordering (style) |
def | get_ordering_index (command_name, ordering) |
def | get_sort_key (content, anchors, ordering) |
def | get_style (cmake) |
def | is_testing_group (content) |
Variables | |
list | BASE_ORDERING |
list | BUILD_TARGET_COMMANDS = ['add_library', 'add_executable', 'add_rostest', 'add_dependencies', 'target_link_libraries'] |
list | INSTALL_COMMANDS = ['install', 'catkin_install_python'] |
QUOTED_PATTERN = re.compile(r'"([^"]+)"') | |
list | TEST_COMMANDS |
VARIABLE_PATTERN = re.compile(r'\$\{([^\}]+)\}') | |
def ros_introspection.cmake.get_ordering | ( | style | ) |
def ros_introspection.cmake.get_ordering_index | ( | command_name, | |
ordering | |||
) |
Given a command name, determine the integer index into the ordering. The ordering is a list of strings and arrays of strings. If the command name matches one of the strings in the inner arrays, the index of the inner array is returned. If the command name matches one of the other strings, its index is returned. Otherwise, the length of the ordering is returned (putting non-matches at the end)
def ros_introspection.cmake.get_sort_key | ( | content, | |
anchors, | |||
ordering | |||
) |
Given a piece of cmake content, return a tuple representing its sort_key. The first element of the tuple is the ordering_index of the content. The second element is an additional variable used for sorting among elements with the same ordering_index Most notably, we want all build commands with a particular library/executable to be grouped together. In that case, we use the anchors parameter, which is an ordered list of all the library/executables in the file. Then, the second variable is a tuple itself, with the first element being the index of library/executable in the anchors list, and the second is an integer representing the canonical order of the build commands.
def ros_introspection.cmake.get_style | ( | cmake | ) |
Examine the contents of the cmake parameter and determine the style. There are four possible styles: 1) test_first (where test commands come strictly before install commands) 2) install_first (where test commands come strictly after install commands) 3) mixed (where test and install commands are not clearly delineated) 4) None (where there are only install commands, or only test commands, or neither)
list ros_introspection.cmake.BASE_ORDERING |
list ros_introspection.cmake.BUILD_TARGET_COMMANDS = ['add_library', 'add_executable', 'add_rostest', 'add_dependencies', 'target_link_libraries'] |
list ros_introspection.cmake.INSTALL_COMMANDS = ['install', 'catkin_install_python'] |
ros_introspection.cmake.QUOTED_PATTERN = re.compile(r'"([^"]+)"') |
list ros_introspection.cmake.TEST_COMMANDS |