Re:My Favorite C++ Pattern: X Macros (2023)
by rcxdude on Tuesday March 25, 2025 @04:22PM
(#43475509)
That only works if it's mostly the same compiler, unfortunately. They could be completely different executables, calling conventions, etc. I don't know why CMake still has such a huge hole in its feature set, but it's quite unfortunate.
I think one solution might be to use target_compile_options() which lets you specify flags per target (instead of globally), assuming you're passing flags to specify the target architecture.