Copy different files when using SIMULATION=native #419
Replies: 2 comments 1 reply
-
TBH I think it would be really good if we could implement a standard cmake function to do matching/overrides from within *_defs to bring in the desired element. There's a few different matching patterns used now based on what it's matching... sounds like the file pattern match has something unique. |
Beta Was this translation helpful? Give feedback.
-
The "FILELIST" is a little too simplistic for a lot of use cases. Recommendation is to use the |
Beta Was this translation helpful? Give feedback.
-
Our cFS project has configuration files that we copy using the FILELIST in targets.cmake. This works fine when we have one target as the native build and another target for the actual hardware (i.e. cpu1 is our native build, cpu2 is for the target hardware). But this breaks when we try to use
SIMULATION=native
for native builds. I was hoping that the build system would pickup on files with "native" as a prefix (similar tonative_osconfig.cmake
), but this isn't the case.For example, in targets.cmake we set:
SET(cpu1_FILELIST our_file.txt)
In our mission defs, we have "cpu1_our_file.txt" and "native_our_file.txt". If we run
make prep
, the correct file is selected (cpu1_our_file.txt). If we runmake SIMULATION=native prep
then the wrong file is selected (expected native_our_file.txt, selected cpu1_our_file.txt).This is somewhat related to #403... and I think we could hack something together that would work, but I wanted to see if there is an easy fix or a better way to handle this.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions