This page was auto-generated from cmake source files using generate_cmake_rst.py
Contents
- catkin_add_env_hooks()
- catkin_add_gtest()
- catkin_add_nosetests()
- catkin_download_test_data()
- catkin_filter_libraries_for_build_configuration()
- catkin_install_python()
- catkin_metapackage()
- catkin_pack_libraries_with_build_configuration()
- catkin_package()
- catkin_package_xml()
- catkin_python_setup()
- catkin_replace_imported_library_targets()
- catkin_unpack_libraries_with_build_configuration()
[function defined in catkin_add_env_hooks.cmake]
Register environment hooks which are executed by the setup script.
For each shell in SHELLS, the macro searches for one of the following files in the directory DIRECTORY: <file_prefix>.<shell>, <file_prefix>.<shell>.<develspace|installspace>.em, <file_prefix>.<shell>.em, <file_prefix>.<shell>.<develspace|installspace>.in or <file_prefix>.<shell>.in.
Plain shells, will be copied to, templates are expanded to etc/catkin/profile.d/, where it will be read by global generated setup.<shell>.
The templates can also distinguish between devel- and installspace using the boolean variables DEVELSPACE and INSTALLSPACE which are either true or false. E.g. @[if DEVELSPACE]@ ... @[end if]@ for .em
Note
Note that the extra extensions must appear in the filename but must not appear in the argument.
Note
These files will share a single directory with other packages that choose to install env hooks. Be careful to give the file a unique name. Typically NN.name.<shell> is used, where NN can define when something should be run (the files are read in alphanumeric order) and the name serves to disambiguate in the event of collisions.
Example:
catkin_add_env_hooks(my_prefix SHELLS bash tcsh zsh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
looks for files env-hooks/my_prefix.[bash|tcsh|zsh]((.(devel|install)space)?.[em|in])?
Parameters: |
|
---|
[function defined in test/gtest.cmake]
Add a GTest based test target.
An executable target is created with the source files, it is linked against GTest and added to the set of unit tests.
Note
The test can be executed by calling the binary directly or using: make run_tests_${PROJECT_NAME}_gtest_${target}
Parameters: |
|
---|
[function defined in test/nosetests.cmake]
Add Python nose tests.
Nose collects tests from the directory dir automatically.
Note
The test can be executed by calling nosetests directly or using: `` make run_tests_${PROJECT_NAME}_nosetests_${dir}`` (where slashes in the dir are replaced with underscores)
Parameters: |
|
---|
[function defined in test/catkin_download_test_data.cmake]
Parameters: |
|
---|
[macro defined in catkin_libraries.cmake]
Filter libraries based on optional build configuration keywords.
Parameters: |
|
---|
[function defined in catkin_install_python.cmake]
Install Python files and update their shebang lines to use a different Python executable.
The signature:
catkin_install_python(PROGRAMS files... DESTINATION <dir> [OPTIONAL])
See the documentation for CMake install() function for more information.
[function defined in catkin_metapackage.cmake]
It installs the package.xml file of a metapackage.
Note
It must be called once for each metapackage. Best practice is to call this macro early in your root CMakeLists.txt, immediately after calling project() and find_package(catkin REQUIRED).
Parameters: | DIRECTORY (string) – the path to the package.xml file if not in the same location as the CMakeLists.txt file |
---|
[macro defined in catkin_libraries.cmake]
Pack a list of libraries with optional build configuration keywords. Each keyword is joined with its library using a separator. A packed library list can be deduplicated correctly.
Parameters: |
|
---|
[macro defined in catkin_package.cmake]
It installs the package.xml file, and it generates code for find_package and pkg-config so that other packages can get information about this package. For this purpose the information about include directories, libraries, further dependencies and CMake variables are used.
Note
It must be called once for each package. It is indirectly calling``catkin_destinations()`` which will provide additional output variables. Please make sure to call catkin_package() before using those variables.
Parameters: |
|
---|
Example:
catkin_package(
INCLUDE_DIRS include
LIBRARIES projlib1 projlib2
CATKIN_DEPENDS roscpp
DEPENDS Eigen
CFG_EXTRAS proj-extras[.cmake|.cmake.in|.cmake(.develspace|.installspace)?.em]
)
[macro defined in catkin_package_xml.cmake]
Parse package.xml from CMAKE_CURRENT_SOURCE_DIR and make several information available to CMake.
Note
It is called automatically by catkin_package() if not called manually before. It must be called once in each package, after calling project() where the project name must match the package name. The macro should only be called manually if the variables are use to parameterize catkin_package().
Parameters: | DIRECTORY (string) – the directory of the package.xml (default ${CMAKE_CURRENT_SOURCE_DIR}). |
---|---|
Output Variables: | |
|
Note
It is calling catkin_destinations() which will provide additional output variables.
[function defined in catkin_python_setup.cmake]
This macro will interrogate the Python setup.py file in ${${PROJECT_NAME}_SOURCE_DIR}, and then creates forwarding Python pkgutil infrastructure in devel space accordingly for the scripts and packages declared in setup.py.
Doing so enables mixing generated code in devel space with static code from sourcespace within a single Python package.
In addition, it adds the install command of distutils/setuputils to the install target.
Note
If the project also uses genmsg message generation via generate_messages() this function must be called before.
[macro defined in catkin_libraries.cmake]
Replace imported library target names with the library name.
Parameters: |
|
---|
[macro defined in catkin_libraries.cmake]
Unpack a list of libraries with optional build configuration keyword prefixes. Libraries prefixed with a keyword are split into the keyword and the library.
Parameters: |
|
---|
[macro defined in test/tests.cmake]
creates a dummy function in case testing has been explicitly disabled (and not only skipping) which outputs an error message when being invoked
[macro defined in all.cmake]
enable all new policies (if available)
[macro defined in test/tests.cmake]
checks if a function has been called while testing is skipped and outputs a warning message
[macro defined in catkin_destinations.cmake]
Set several path suffixes for install destinations.
[function defined in test/tests.cmake]
Create a test target, integrate it with the run_tests infrastructure and post-process the junit result.
All test results go under ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}/..
This function is only used internally by the various catkin_add_*test() functions.
[function defined in catkin_workspace.cmake]
Search all subfolders in the workspace for package.xml files. Based on the dependencies specified in the build_depends and buildtool_depends tags it performs a topological sort and calls add_subdirectory() for each directory.
The functions is only called in catkin’s toplevel.cmake, which is usually symlinked to the workspace root directory (which contains multiple packages).
[macro defined in list_append_deduplicate.cmake]
Append elements to a list and remove existing duplicates from the list.
Note
Using CMake’s list(APPEND ..) and list(REMOVE_DUPLICATES ..) is not sufficient since its implementation uses a set internally which makes the operation unstable.
[macro defined in list_append_unique.cmake]
Append elements to a list if they are not already in the list.
Note
Using CMake’s list(APPEND ..) and list(REMOVE_DUPLICATES ..) is not sufficient since its implementation uses a set internally which makes the operation unstable.
[macro defined in parse_arguments.cmake]
parse_arguments() taken from http://www.itk.org/Wiki/CMakeMacroParseArguments
@deprecated use CMakeParseArguments instead
[function defined in stamp.cmake]
param path: file name Uses configure_file to generate a file filepath.stamp hidden somewhere in the build tree. This will cause cmake to rebuild its cache when filepath is modified.
[function defined in string_starts_with.cmake]
Check if a string starts with a prefix.
Parameters: |
|
---|
[function defined in catkin_package.cmake]
[macro defined in catkin_package_xml.cmake]
[macro defined in test/nosetests.cmake]
[function defined in test/nosetests.cmake]
[function defined in assert.cmake]
[function defined in assert.cmake]
[function defined in atomic_configure_file.cmake]
[macro defined in tools/doxygen.cmake]
[function defined in catkin_generate_environment.cmake]
[function defined in legacy.cmake]
[macro defined in debug_message.cmake]
[macro defined in em_expand.cmake]
[function defined in find_program_required.cmake]
[function defined in empy.cmake]
[macro defined in list_insert_in_workspace_order.cmake]