On 07/01/2016 04:06 AM, Hendrik Sattler wrote: > So each and every toolchain file shall also take care of the > environment variable? > How about CMAKE_CXX_FLAGS_INIT set by other module files?
Currently the only way to get CMake's default flags for the platform and also add one's own flags from a toolchain file is to set the environment variable. I've now made changes (for CMake 3.7) to enable use of CMAKE_CXX_FLAGS_INIT for this: Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a66004be Also, CMake 3.7 will add a new policy to allow the per-config flags to be used in try_compile too: try_compile: Add policy CMP0066 to honor CMAKE_<LANG>_FLAGS_<CONFIG> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d582c23a -Brad -- 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: http://public.kitware.com/mailman/listinfo/cmake
