|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged autoware_cmake at Robotics Stack Exchange
|
autoware_cmake package from autoware_cmake repoautoware_cmake autoware_lint_common |
ROS Distro
|
Package Summary
| Version | 1.4.0 |
| License | Apache License 2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/autowarefoundation/autoware_cmake.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-18 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Ryohsuke Mitsudome
- Esteve Fernandez
- Yutaka Kondo
Authors
autoware_cmake
This package provides CMake scripts for Autoware.
Usage
autoware_package.cmake
Call autoware_package() before defining build targets, which will set common options for Autoware.
cmake_minimum_required(VERSION 3.5)
project(package_name)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(...)
autoware_ament_auto_package.cmake
Use autoware_ament_auto_package() as a replacement for ament_auto_package() to maintain Autoware’s include structure across ROS 2 Humble, Jazzy, and Kilted.
This macro addresses a naming convention conflict between Autoware packages (which use autoware_<module> as package names) and Autoware include paths (which use autoware/<module>/). Starting with ROS 2 Kilted, ament_auto_package() will install headers to include/${PROJECT_NAME}/, which would create incorrect paths like include/autoware_interpolation/autoware/interpolation/.
Why use this?
- Eliminates deprecation warnings on ROS 2 Humble and Jazzy
- Future-proof: Works with ROS 2 Kilted+ without breaking changes
-
Maintains conventions: Preserves
autoware/<module>/include structure -
Drop-in replacement: Zero behavior change from
ament_auto_package()
Example
cmake_minimum_required(VERSION 3.14)
project(autoware_interpolation)
find_package(autoware_cmake REQUIRED)
autoware_package()
ament_auto_add_library(autoware_interpolation SHARED
src/linear_interpolation.cpp
src/spline_interpolation.cpp
)
if(BUILD_TESTING)
# ... tests ...
endif()
# Use autoware_ament_auto_package() instead of ament_auto_package()
autoware_ament_auto_package()
Migration from ament_auto_package()
Simply replace ament_auto_package() with autoware_ament_auto_package() at the end of your CMakeLists.txt. All parameters supported by ament_auto_package() are also supported:
-
INSTALL_TO_PATH: Install executables tobin/instead oflib/${PROJECT_NAME}/ -
INSTALL_TO_SHARE: Install additional directories toshare/${PROJECT_NAME}/
The wrapper also takes USE_SCOPED_HEADER_INSTALL_DIR. With it, the headers go to include/${PROJECT_NAME}/ instead of include/.
Export the libraries as CMake targets
Add EXPORT_LIBRARY_TARGETS to export each library of the package as a CMake target, <package>::<library>:
autoware_ament_auto_package(EXPORT_LIBRARY_TARGETS)
A package that depends on it can link the targets with target_link_libraries(<target> ${<package>_TARGETS}). On all distributions, ament_auto_add_library() and ament_auto_add_executable() use the targets without a change. On Humble and Jazzy, ament_target_dependencies() uses them too. The headers of the package reach these packages as system headers. For ament_auto_add_library() and ament_auto_add_executable(), this is as before. An ament_target_dependencies() call without SYSTEM gave them as normal headers before.
The package also keeps exporting its own <package>_LIBRARIES and <package>_INCLUDE_DIRS. But the classic variables one level downstream change. When package B depends on package A, and A uses the flag, B_LIBRARIES still holds the library file of A, and it also holds the targets of the dependencies of A. B_INCLUDE_DIRS and B_RECURSIVE_DEPENDENCIES no longer hold the entries of the dependencies of A.
The flag takes its name from the open upstream proposal ament/ament_cmake#455. It differs from that proposal in these points:
- It keeps the classic export.
- It exports the targets in
${PROJECT_NAME}_TARGETSonly with the flag. - The installed include folder follows
USE_SCOPED_HEADER_INSTALL_DIR. - It marks the installed include folder as a system folder for the packages that use the library.
- It stops when an exported library links a dependency that is only a build dependency.
Problems that the flag shows
With the flag, CMake checks each exported library when it configures the package, before anything compiles. Fix these cases in the package:
- An include folder inside the source or build folder stops the configure step. The macro handles the
includefolder thatament_auto_add_library()adds. Wrap other folders in$<BUILD_INTERFACE:...>. If the package installs such a folder, also add$<INSTALL_INTERFACE:...>with the install path. - A local target that an exported library links stops the configure step, for example the target of
generate_parameter_library(). Add it to the export before the macro call:list(APPEND ${PROJECT_NAME}_TARGETS <target>). - A dependency of an exported library must reach each package that uses the library, or that package stops with “the target was not found”. The macro passes on a dependency only when
package.xmllists it as<depend>,<build_export_depend>or<exec_depend>. If the dependency is only a<build_depend>, the macro stops and asks you to change it to<depend>. If the CMake package name differs from thepackage.xmlkey, as foreigenandEigen3, addament_export_dependencies(Eigen3)before the macro call.
Two more effects do not stop the build:
- The
PUBLICcompile options and definitions of an exported library now reach every package that links it. Make themPRIVATEwhen only the library needs them. - With
colcon build --symlink-install, the exported libraries are copied to the install folder, not linked. After a rebuild outside colcon, runcolcon buildagain to update the install folder.
Changelog for package autoware_cmake
1.4.0 (2026-06-23)
- fix(autoware_cmake): remove workaround, fixed in https://github.com/ros2/tinyxml2_vendor/pull/23 (#30)
- Contributors: Esteve Fernandez
1.3.0 (2026-06-11)
-
fix: disable Eigen OpenMP parallelism to prevent callback starvation (#42)
- fix: disable Eigen OpenMP parallelism to prevent callback starvation
* add cspell ignore for EIGEN_DONT_PARALLELIZE ---------
-
Contributors: iwatake
1.2.0 (2026-04-09)
-
feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package (#40)
- feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package
* Removed the FILES_MATCHING patterns from both install calls Removed unnecessary FILES_MATCHING patterns from install commands. ---------Co-authored-by: github-actions <<github-actions@github.com>>
-
Contributors: Vishal Chauhan
1.1.0 (2025-11-10)
- feat: add autoware_ament_auto_package() macro (#37)
- feat: jazzy-porting, add jazzy distro condition for jazzy related compiling (#35) cmake env::jazzy-porting::add jazzy distro condition for jazzy related compiling
- fix: when using CMake >= 3.24 use CMAKE_COMPILE_WARNING_AS_ERROR variable instead of setting -Werror directly (#33)
- Contributors: Silvio Traversaro, Yutaka Kondo, 心刚
1.0.2 (2025-04-08)
- fix(autoware_package.cmake): workaround to avoid [missing
tinyxml2::tinyxml2]{.title-ref}
(#24)
- add tinyxml2 workaround
* move
- Contributors: Yutaka Kondo
1.0.1 (2025-03-17)
- fix(autoware_cmake): fix links to issues in CHANGELOG.rst files (#13)
- Contributors: Esteve Fernandez
1.0.0 (2024-05-02)
- Merge pull request #1 from youtalk/import-from-autoware-common feat: import from autoware_common
- add maintainer
- move to autoware_cmake
- Contributors: Yutaka Kondo