Classes | Functions | Variables
ros_introspection.cmake Namespace Reference

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'\$\{([^\}]+)\}')
 

Function Documentation

def ros_introspection.cmake.get_ordering (   style)
Given the style, return the correct ordering.

Definition at line 56 of file cmake.py.

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)

Definition at line 64 of file cmake.py.

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.

Definition at line 88 of file cmake.py.

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)

Definition at line 23 of file cmake.py.

def ros_introspection.cmake.is_testing_group (   content)

Definition at line 255 of file cmake.py.

Variable Documentation

list ros_introspection.cmake.BASE_ORDERING
Initial value:
1 = ['cmake_minimum_required', 'project', 'set_directory_properties', 'find_package', 'pkg_check_modules',
2  'set', 'catkin_generate_virtualenv', 'catkin_python_setup', 'add_definitions',
3  'add_message_files', 'add_service_files', 'add_action_files', 'rosidl_generate_interfaces',
4  'generate_dynamic_reconfigure_options', 'generate_messages', 'catkin_package', 'catkin_metapackage',
5  BUILD_TARGET_COMMANDS + ['include_directories'],
6  'ament_target_dependencies', 'ament_export_include_directories', 'ament_export_libraries',
7  'ament_export_dependencies',
8  'ament_package']

Definition at line 13 of file cmake.py.

list ros_introspection.cmake.BUILD_TARGET_COMMANDS = ['add_library', 'add_executable', 'add_rostest', 'add_dependencies', 'target_link_libraries']

Definition at line 7 of file cmake.py.

list ros_introspection.cmake.INSTALL_COMMANDS = ['install', 'catkin_install_python']

Definition at line 11 of file cmake.py.

ros_introspection.cmake.QUOTED_PATTERN = re.compile(r'"([^"]+)"')

Definition at line 5 of file cmake.py.

list ros_introspection.cmake.TEST_COMMANDS
Initial value:
1 = ['catkin_download_test_data',
2  'roslint_cpp', 'roslint_python', 'roslint_add_test',
3  'catkin_add_nosetests', 'catkin_add_gtest', 'add_rostest_gtest']

Definition at line 8 of file cmake.py.

ros_introspection.cmake.VARIABLE_PATTERN = re.compile(r'\$\{([^\}]+)\}')

Definition at line 4 of file cmake.py.



ros_introspection
Author(s):
autogenerated on Wed Mar 3 2021 03:56:00