[QBS] Patch suggestions
Vincent Gouvernelle
vincent.gouvernelle at sescoi.fr
Mon Oct 1 16:00:51 CEST 2012
Hi,
I don't known where to give these possible patches to compile with
MSVC-2012 and 64bits... So I give you my modification here... Maybe you
can add it to your sources...
To compile in 64bit (for example by calling: qbs.exe release
qbs.platform:MSVC2010 qbs.architecture:x86_64)
Modify : share/qbs/modules/cpp/msvc.js by inserting on line 150 (after
"var is64bit = (architecture == "x86_64")")
the lines:
if (is64bit)
args.push('/MACHINE:X64')
To compile with msvc2012 (for example by calling qbs.exe release
qbs.platform:MSVC2012 qbs.architecture:x86_64)
We need to add the detection of this compiler.
Modify: src/app/platforms/msvcprobe.cpp (lines marked by + are added)
150 case 10:
151 msvc.version = QLatin1String("2010");
152 break;
153 + case 11:
154 + msvc.version = QLatin1String("2012");
155 + break;
156 }
157
158 if (msvc.version.isEmpty()) {
159 qstdout << " Unknown MSVC version " << nVersion << "
found." << endl;
160 continue;
161 }
162
163 // Check existence of various install scripts
164 const QString vcvars32bat = msvc.installPath +
QLatin1String("/VC/bin/vcvars32.bat");
165 if (!QFileInfo(vcvars32bat).isFile())
166 continue;
167
168 + // Check existence of various install scripts
169 + const QString vcvarsallbat = msvc.installPath +
QLatin1String("/VC/vcvarsall.bat");
170 + if (!QFileInfo(vcvarsallbat).isFile())
171 + continue;
172 +
173 msvcs += msvc;
174 }
One more thing... I'd like to add some other flags to the compiler like
/fp:precise and maybe others, what is the best way to do it ?
Cheers,
Vincent G.
More information about the Qbs
mailing list