[cmake-developers] Extend CMAKE_<LANG>_FLAGS(_<CONFIG>) from a CMake Toolchain
Brad King
brad.king at kitware.com
Wed Aug 23 10:18:57 EDT 2017
On 08/23/2017 09:56 AM, maikel van den Hurk wrote:
> I was wondering why there is no ability to define CMAKE_<LANG>_FLAGS(_<CONFIG>) within a CMake Toolchain file, but still benefit from the CMAKE_<LANG>_INIT_FLAGS(_<CONFIG>) detected from CMake internals.
This has been possible since commit v3.7.0-rc1~392^2 (Honor
CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files,
2016-07-05). See the CMake 3.7 release notes:
https://cmake.org/cmake/help/v3.9/release/3.7.html#variables
"Toolchain files may now set a CMAKE_<LANG>_FLAGS_INIT variable
to initialize the CMAKE_<LANG>_FLAGS cache entry the first time
a language is enabled in a build tree."
See documentation here:
https://cmake.org/cmake/help/v3.9/variable/CMAKE_LANG_FLAGS_INIT.html
-Brad
More information about the cmake-developers
mailing list