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:


   - 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.
   - 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.

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.

-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to