From f83b734e3e1a3d64cce7b0ce5cd9866409c7dde9 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 18 Sep 2013 14:04:18 +0200 Subject: [PATCH] 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. --- cmake/Modules/AddOptions.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/Modules/AddOptions.cmake b/cmake/Modules/AddOptions.cmake index 19f02966..3255d90c 100644 --- a/cmake/Modules/AddOptions.cmake +++ b/cmake/Modules/AddOptions.cmake @@ -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}}")