310031188c
Reported by David Faure. In KDE a DEPRECATED macro gets defined in a header file created by cmake. The define is not guarded with #if Q_CC_GNU or similar because at cmake time the compiler is determined. Therefore moc suddenly sees this gcc specific token and stumbles over it. This patch simply defines an empty __attribute__ macro that will expand to nothing and thus become invisible to moc's "C++ parser" after the pre-processing. Change-Id: I4448b9ac3f72b6334e32b27484401fb0fca23a0c Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
39 lines
1.3 KiB
Prolog
39 lines
1.3 KiB
Prolog
CONFIG += testcase
|
|
CONFIG += parallel_test
|
|
TARGET = tst_moc
|
|
|
|
#exists(/usr/include/boost/spirit.hpp) {
|
|
# message("including boost headers in test")
|
|
# DEFINES += PARSE_BOOST
|
|
# # need to add explicitly so that it ends up in moc's search path
|
|
# INCLUDEPATH += /usr/include
|
|
#}
|
|
|
|
INCLUDEPATH += testproject/include testproject
|
|
|
|
DEFINES += SRCDIR=\\\"$$PWD\\\"
|
|
cross_compile: DEFINES += MOC_CROSS_COMPILED
|
|
|
|
HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-newlines.h oldstyle-casts.h \
|
|
slots-with-void-template.h qinvokable.h namespaced-flags.h trigraphs.h \
|
|
escapes-in-string-literals.h cstyle-enums.h qprivateslots.h gadgetwithnoenums.h \
|
|
dir-in-include-path.h single_function_keyword.h task192552.h task189996.h \
|
|
task234909.h task240368.h pure-virtual-signals.h cxx11-enums.h \
|
|
cxx11-final-classes.h \
|
|
cxx11-explicit-override-control.h \
|
|
forward-declared-param.h \
|
|
parse-defines.h \
|
|
function-with-attributes.h
|
|
|
|
|
|
if(*-g++*|*-icc*|*-clang*|*-llvm):!irix-*:!win32-*: HEADERS += os9-newlines.h win-newlines.h
|
|
SOURCES += tst_moc.cpp
|
|
|
|
QT -= gui
|
|
QT += sql network testlib
|
|
contains(QT_CONFIG, dbus){
|
|
DEFINES += WITH_DBUS
|
|
QT += dbus
|
|
}
|
|
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|