Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for catkin_make_isolated, catkin build #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juhannc
Copy link

@juhannc juhannc commented Mar 27, 2020

Add support for catkin_make_isolated, catkin build

Description

Only catkin_make does export the the compiler info as required for the pre-checks.
While catkin_make_isolated and especially catkin build do use the same compilers as catkin_make it is not visible to cmake.
The reason is, that both catkin_make_isolated and catkin build build the code in an isolated environment to suppress cross-talk while building.
Therefore, the top-level compiler variables are not available.
Thus, only check for the required controllers, if the code is not build using ROS.

Proof

On a vanilla Ubuntu 16.04 with ROS Kinetic, the following variables are exported:

catkin_make:

  • CMAKE_CXX_COMPILER: /usr/bin/c++
  • NEWER_GNU_CXX_COMPILER:
  • CMAKE_CXX_COMPILER_ID: GNU
  • CMAKE_CXX_COMPILER_VERSION: 5.4.0

catkin_make_isolated:

  • CMAKE_CXX_COMPILER: /usr/bin/c++
  • NEWER_GNU_CXX_COMPILER: NEWER_GNU_CXX_COMPILER-NOTFOUND
  • CMAKE_CXX_COMPILER_ID:
  • CMAKE_CXX_COMPILER_VERSION:

catkin build:

  • CMAKE_CXX_COMPILER: NEWER_GNU_CXX_COMPILER-NOTFOUND
  • NEWER_GNU_CXX_COMPILER: NEWER_GNU_CXX_COMPILER-NOTFOUND
  • CMAKE_CXX_COMPILER_ID:
  • CMAKE_CXX_COMPILER_VERSION:

# Add support for `catkin_make_isolated`, `catkin build`

## Description

Only `catkin_make` does export the the compiler info as required for the pre-checks.
While `catkin_make_isolated` and especially `catkin build` do use the same compilers as `catkin_make` it is not visible to cmake.
The reason is, that both `catkin_make_isolated` and `catkin build` build the code in an isolated  environment to suppress cross-talk while building.
Therefore, the top-level compiler variables are not available.
Thus, only check for the required controllers, if the code is not build using ROS.

## Proof

On a vanilla Ubuntu 16.04 with ROS Kinetic, the following variables are exported:

`catkin_make`:

- `CMAKE_CXX_COMPILER`: /usr/bin/c++
- `NEWER_GNU_CXX_COMPILER`:
- `CMAKE_CXX_COMPILER_ID`: GNU
- `CMAKE_CXX_COMPILER_VERSION`: 5.4.0

`catkin_make_isolated`:

- `CMAKE_CXX_COMPILER`: /usr/bin/c++
- `NEWER_GNU_CXX_COMPILER`: NEWER_GNU_CXX_COMPILER-NOTFOUND
- `CMAKE_CXX_COMPILER_ID`:
- `CMAKE_CXX_COMPILER_VERSION`:

`catkin build`:

- `CMAKE_CXX_COMPILER`: NEWER_GNU_CXX_COMPILER-NOTFOUND
- `NEWER_GNU_CXX_COMPILER`: NEWER_GNU_CXX_COMPILER-NOTFOUND
- `CMAKE_CXX_COMPILER_ID`:
- `CMAKE_CXX_COMPILER_VERSION`:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant