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
 
list INSTALL_COMMANDS = ['install', 'catkin_install_python']
 
 QUOTED_PATTERN = re.compile(r'"([^"]+)"')
 
list TEST_COMMANDS
 
 VARIABLE_PATTERN = re.compile(r'\$\{([^\}]+)\}')
 

Function Documentation

◆ get_ordering()

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

Definition at line 58 of file cmake.py.

◆ get_ordering_index()

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 66 of file cmake.py.

◆ get_sort_key()

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 90 of file cmake.py.

◆ get_style()

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 25 of file cmake.py.

◆ is_testing_group()

def ros_introspection.cmake.is_testing_group (   content)

Definition at line 260 of file cmake.py.

Variable Documentation

◆ BASE_ORDERING

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 15 of file cmake.py.

◆ BUILD_TARGET_COMMANDS

list ros_introspection.cmake.BUILD_TARGET_COMMANDS
Initial value:
1 = ['add_library', 'add_executable', 'add_rostest',
2  'target_include_directories', 'add_dependencies', 'target_link_libraries',
3  'set_target_properties', 'ament_target_dependencies']

Definition at line 7 of file cmake.py.

◆ INSTALL_COMMANDS

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

Definition at line 13 of file cmake.py.

◆ QUOTED_PATTERN

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

Definition at line 5 of file cmake.py.

◆ TEST_COMMANDS

list ros_introspection.cmake.TEST_COMMANDS
Initial value:
1 = [('group', 'CATKIN_ENABLE_TESTING'), '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 10 of file cmake.py.

◆ VARIABLE_PATTERN

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

Definition at line 4 of file cmake.py.



ros_introspection
Author(s):
autogenerated on Tue Jun 21 2022 03:01:38