Honor the CMAKE_NOT_USING_CONFIG_FLAGS settings

If this is set, then everything is lumped into CMAKE_CXX_FLAGS since
that is the only one that is going to be used when building anyway.
This commit is contained in:
Roland Kaufmann 2013-09-18 14:04:18 +02:00
parent e9d0216577
commit f83b734e3e

View File

@ -37,6 +37,11 @@ function (add_options langs builds)
else (NOT ("${build}" STREQUAL "ALL_BUILDS"))
set (_bld "")
endif (NOT ("${build}" STREQUAL "ALL_BUILDS"))
# if we want everything in the "global" flag, then simply
# ignore the build type here and go add everything to that one
if (CMAKE_NOT_USING_CONFIG_FLAGS)
set (_bld "")
endif ()
foreach (_opt IN LISTS ARGN)
set (_var "CMAKE_${lang}_FLAGS${_bld}")
#message (STATUS "Adding \"${_opt}\" to \${${_var}}")