ENH: Define QT_NO_DEBUG when building with release Qt libs.

Fixes #6104.
This commit is contained in:
Clinton Stimpson 2007-11-30 19:11:18 -05:00
parent 8537c55988
commit 96d8460b4e
1 changed files with 11 additions and 0 deletions

View File

@ -6,6 +6,17 @@
ADD_DEFINITIONS(${QT_DEFINITIONS})
# check that QT_NO_DEBUG is defined for release configurations
MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
IF(NOT ${VAR} MATCHES "${FLAG}")
SET(${VAR} "${${VAR}} ${FLAG}"
CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
ENDIF(NOT ${VAR} MATCHES "${FLAG}")
ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info")
QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
SET(QT_LIBRARIES "")