Revert "moc: remove _MSC_EXTENSIONS #define"

It seems this change is preventing us to integrate qt5.git in '5.9'

This reverts commit c3030d7163.

Task-number: QTBUG-61204
Change-Id: Id98afaa23be0a8dd6f2c54a899f46542c65436aa
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Jani Heikkinen 2017-06-05 04:23:53 +00:00
parent d56c6cf7a4
commit 934235e967
2 changed files with 2 additions and 5 deletions

View File

@ -31,10 +31,10 @@ if(gcc|intel_icl|msvc):!rim_qcc:!uikit:!no_moc_predefs:if(!macos|count(QMAKE_APP
moc_predefs.name = "Generate moc_predefs.h"
moc_predefs.CONFIG = no_link
gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Za -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
else:msvc {
moc_predefs.commands += $$QMAKE_CXX -Bx$$shell_quote($$shell_path($$QMAKE_QMAKE)) $$QMAKE_CXXFLAGS \
-E ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
-E -Za ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
} else: error("Oops, I messed up")
moc_predefs.output = $$MOC_DIR/moc_predefs.h
moc_predefs.input = MOC_PREDEF_FILE

View File

@ -380,9 +380,6 @@ int runMoc(int argc, char **argv)
error("Missing macro name");
parser.showHelp(1);
}
// Prevent parse errors on MSVC extensions.
if (name == "_MSC_EXTENSIONS")
continue;
Macro macro;
macro.symbols = Preprocessor::tokenize(value, 1, Preprocessor::TokenizeDefine);
macro.symbols.removeLast(); // remove the EOF symbol