<div dir="ltr">I'm looking at the way the various XXX_FLAGS_INIT variables are handled across the different compilers and platforms. These are set in many files in the Modules/Compilers, Modules/Platforms and Modules directories. There seems to be a couple of problems with what I'm seeing:<div><br></div><div><ul><li>In most cases, the various files are appending rather than prepending to the existing contents of the XXX_FLAGS_INIT variables. This means any values developers provide cannot override the default ones because later flags usually take precedence over earlier ones.</li><li>Some platforms and compilers (e.g. IRIX, Windows-df, Generic-SDCC-C, OSF1, CSharp flags) unilaterally set XXX_FLAGS_INIT variables. This would discard any values a developer might set in a toolchain file, for example.</li></ul><div>Since I don't know much about the history of all these, I was wondering if there was any technical reason why the logic works this way? As things stand, it can be difficult for developers to provide their own XXX_FLAGS_INIT variables to customise things if they are overridden by the defaults CMake provides.</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div></div>