nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

Using environmental variable in S include #1596

Closed simtheverse closed 10 months ago

simtheverse commented 11 months ago

Hello, are environmental variables supported in paths for S includes? I haven't been able to get it to build with them.

Parsing    S_define
S_define:33:10: fatal error: ${HLA_FEDERATION_FILES_PATH}/S_modules/THLA_interface.sm: No such file or directory
 #include "${HLA_FEDERATION_FILES_PATH}/S_modules/THLA_interface.sm"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Error in S_define. Exit!
alexlin0 commented 10 months ago

Environment variables are not supported. Add the path to TRICK_SFLAGS in the S_overrides.mk. SFLAGS acts like CFLAGS for S_define files.

TRICK_SFLAGS += -I${HLA_FEDERATION_FILES_PATH}

Change your include line to

#include "S_modules/THLA_interface.sm"