diff options
author | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2010-08-31 18:12:30 (GMT) |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2010-09-02 10:56:33 (GMT) |
commit | ac33c5ba3206ac7bb1d38c796139d864a637f7a4 (patch) | |
tree | 9ce506487ab4cce6b31dfb2904b54b061fab3289 /tools/configure | |
parent | a1e1103e1c3f0e47c5d075660a77d00f47e1c125 (diff) | |
download | Qt-ac33c5ba3206ac7bb1d38c796139d864a637f7a4.zip Qt-ac33c5ba3206ac7bb1d38c796139d864a637f7a4.tar.gz Qt-ac33c5ba3206ac7bb1d38c796139d864a637f7a4.tar.bz2 |
Add option to enable -MP compile option for MSVC
The option is on when building Qt, but off by default for other
projects, due to potential incompatible compile options in other
projects. (/E, /EP, /Gm, /Yc, /showIncludes, #import preprocessor
directive)
Reviewed-by: bhughes
Reviewed-by: ossi
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 09da581..89d3ef0 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -381,6 +381,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "INCREDIBUILD_XGE" ] = "auto"; dictionary[ "LTCG" ] = "no"; dictionary[ "NATIVE_GESTURES" ] = "yes"; + dictionary[ "MSVC_MP" ] = "no"; } Configure::~Configure() @@ -534,6 +535,13 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-no-ltcg") { dictionary[ "LTCG" ] = "no"; } + else if (configCmdLine.at(i) == "-mp") { + dictionary[ "MSVC_MP" ] = "yes"; + } + else if (configCmdLine.at(i) == "-no-mp") { + dictionary[ "MSVC_MP" ] = "no"; + } + #endif else if (configCmdLine.at(i) == "-platform") { @@ -1848,6 +1856,8 @@ bool Configure::displayHelp() desc("STYLE_S60" , "yes", "", " s60\n", ' '); desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7."); desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7."); + desc("MSVC_MP", "no", "-no-mp", "Do not use multiple processors for compiling with MSVC"); + desc("MSVC_MP", "yes", "-mp", "Use multiple processors for compiling with MSVC (-MP)"); /* We do not support -qconfig on Windows yet @@ -2822,7 +2832,7 @@ void Configure::generateCachefile() for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) { cacheStream << (*var) << endl; } - cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental create_prl link_prl depend_includepath QTDIR_build" << endl; + cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build" << endl; QStringList buildParts; buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations"; @@ -2885,6 +2895,8 @@ void Configure::generateCachefile() if (dictionary[ "LTCG" ] == "yes") configStream << " ltcg"; + if (dictionary[ "MSVC_MP" ] == "yes") + configStream << " msvc_mp"; if (dictionary[ "STL" ] == "yes") configStream << " stl"; if (dictionary[ "EXCEPTIONS" ] == "yes") |