Ask Your Question

How do determine default C++ compiler?

asked 2016-07-19 13:43:11 -0500

Cerin gravatar image

When you compile a package using catkin_make, what's the default C++ compiler used? I assumed it was g++, but I can't confirm this.

This is probably documented somewhere, but I can't find it.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-07-20 06:06:50 -0500

gvdhoorn gravatar image

updated 2016-07-20 06:09:44 -0500

Detecting the compiler (as it's not so much configured, as it is detected (or at least verified)) is actually not something catkin does, but is a CMake affair. As such, you can use any of the traditional ways (setting CC and/or CXX env flags before invoking catkin_make, etc) to influence it.

I don't have a direct link to anything that completely explains how CMake does it, but some related pages:

After the compiler has been detected, CMake sets a nr of (internal) variables that store the bits and pieces of information it needs to work with that compiler. Some of those are documented on the CMake Useful Variables page.

Note that much (if not all) CMake documentation has migrated from the wiki to the generated docs at

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-07-19 13:43:11 -0500

Seen: 291 times

Last updated: Jul 20 '16