question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

config: Package-specific make/cmake arguments

See original GitHub issue

It would be great to be able to specify make and cmake arguments on a per-package basis. For example, I always build bullet with cmake arguments -DBUILD_SHARED_LIBS=ON and -DUSE_DOUBLE_PRECISION=ON. I currently just send those variables to all packages in my workspace, which has worked so far, but it’s not a robust solution.

It would also be great if these arguments could be remembered in the configuration file, so I don’t have to specify them all the time when I do catkin build.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
jbohrencommented, Jun 11, 2015

The CLI interface could be:

catkin config --package my_pkg --cmake-args -DFoo=1 -DBar=2
catkin config --package my_otherpkg --cmake-args -DFoo=2 -DBar=1

It could look like this when you view the config summary:

-----------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/hydro
Workspace:                   /home/user/ws/foobar
Source Space:       [exists] /home/user/ws/foobar/src
Build Space:        [exists] /home/user/ws/foobar/build
Devel Space:        [exists] /home/user/ws/foobar/devel
Install Space:     [missing] /home/user/ws/foobar/install
DESTDIR:                     None
-----------------------------------------------------------
Isolate Develspaces:         False
Install Packages:            False
Isolate Installs:            False
-----------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------
Internal Job Server:         True
CMake Args:                  No Global Args
 - my_pkg: -DFoo=1 -DBar=2
 - my_otherpkg: -DFoo=2 -DBar=1
Make Args:                   None
Make Args (Catkin):          None
-----------------------------------------------------------
Workspace configuration appears valid.
-----------------------------------------------------------
0reactions
Timplecommented, Mar 22, 2021

already supports that use case

Would you mind sharing the syntax for this in colcon? I can’t seem to find it here

Read more comments on GitHub >

github_iconTop Results From Across the Web

cmake28(1) - Linux man page
The "cmake" executable is the CMake command-line interface. It may be used to configure projects in scripts. Project configuration settings may be specified ......
Read more >
build - Build Packages — colcon documentation
CMake specific arguments​​ Pass arbitrary arguments to CMake projects. Arguments matching other options must be prefixed by a space, e.g. --cmake-args " --help" ......
Read more >
Cross Platform Make - CMake
CMake is a cross-platform, open-source build system. CMake is part of a family of tools designed to build, test and package software.
Read more >
A universal build tool - ROS 2 Design
Just enough in order to know how to setup the environment for it, ... Examples are Make , CMake , Python setuptools ,...
Read more >
Ubuntu Manpage: cpack - Packaging driver provided by CMake.
When loading a find module or package configuration file find_package defines variables to provide information about the call arguments (and restores their ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found