ament / ament/ament_cmake

Example of using ament_export_definitions() from ament_cmake_export_definitions

Aperta
#356 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
CMake
Stelle
125
Fork
147
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.