[CMake] Platform dSPACE
Michael Ellery
mellery451 at gmail.com
Fri Jun 23 16:16:58 EDT 2017
> On Jun 23, 2017, at 1:11 PM, Robin Verschueren <robin.verschueren at gmail.com> wrote:
>
> Thank you, that makes sense.
>
> If I do that, how can I set specific settings for this Platform only? It seems that e.g.
>
> set(CMAKE_INCLUDE_FLAG_C "-J")
>
> in the Toolchain file is overwritten by CMake after processing the Toolchain file
> (more specifically, in CMakeGenericSystem.cmake).
>
> Or should I set this variable somewhere else?
>
> Best,
> Robin
I think you use the toolchain file to declare the basics (what compiler to use) and then you can add specific flags and other settings in your other CMAKE files *after* the project() declaration (which usually clobbers a bunch of settings…). If you want to have your compiler flags/settings in a reusable file, you can just use the basic include() support to import a separate file, but it still needs to come after project() most likely.
More information about the CMake
mailing list