ament / ament/ament_cmake

Example of using ament_export_definitions() from ament_cmake_export_definitions

Offen
#356 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
CMake
Sterne
125
Forks
147
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello,

I'm trying to create a meta package for ament to build the same packages with different preprocessor definitions for different code functionalities.
Is there any example of using this and gathering the definition in the downstream package.

While this is not an issue, I am struggling to find example usage between an upstream and downstram package. I thought since this is a newish module that it would be best to go here.

For example:

In metapackage1/CMakeLists.txt I have:

```

ament_export_defintiion(PLAT1=1)``
ament_package()

```

In downstream package/CMakeLists.txt, I have

```
if(${PLAT1})
message('got definition")
endif()

```

But I don't get any indication that the variable was defiined. Am I using this wrong? I would really appreciate an example if possible. Thanks so much!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.