fix icpc version detection

the regex didn't match the actual output ("icpc (ICC) 17.0.0 20160721"),
and the code failed to concatenate the lines (broken in 492d7d14fc, as
for clang).

but using -dumpversion (as we do for g++) is more elegant anyway, so do
it instead.

Change-Id: I328bbfab9c08d6e660c3f1ec51554d9f877b8f66
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2016-11-02 13:24:43 +01:00
parent 6172ebaf30
commit eda3184a67
1 changed files with 3 additions and 3 deletions

View File

@ -243,10 +243,10 @@ defineTest(qtConfTest_checkCompiler) {
$${1}.compilerId = "gcc"
$${1}.compilerVersion = $$version
} else: contains(QMAKE_CXX, ".*icpc") {
qtRunLoggedCommand("$$QMAKE_CXX -v", version)|return(false)
qtRunLoggedCommand("$$QMAKE_CXX -dumpversion", version)|return(false)
$${1}.compilerDescription = "ICC"
$${1}.compilerId = "icc"
$${1}.compilerVersion = $$replace(version, "icpc version ([0-9.]+).*", "\\1")
$${1}.compilerVersion = $$version
} else: msvc {
command = $$QMAKE_CXX /EP /nologo $$source $$system_quote($$QMAKE_CONFIG_TESTS_DIR/win/msvc_version.cpp)
qtRunLoggedCommand("$$command", version)|return(false)