From 9286d99a3e0c6418eaaf92b7726b40307d933da0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 5 May 2019 17:46:13 +0300 Subject: [PATCH] Improve compiler detection. --HG-- branch : develop --- Valentina.pro | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 066e2f509..81ed324c7 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -16,27 +16,33 @@ count(LIST, 1, >): error("The build will fail. Path '$${OUT_PWD}' contains space unix { *g++* { GCC_VERSION = $$system("g++ -dumpversion") - contains(GCC_VERSION, ^8.*$) { - message( "g++ version 8.x found" ) - CONFIG += g++8 + contains(GCC_VERSION, ^9.*$) { + message( "g++ version 9.x found" ) + CONFIG += g++9 } else { - contains(GCC_VERSION, ^7.*$) { - message( "g++ version 7.x found" ) - CONFIG += g++7 + GCC_VERSION = $$system("g++ -dumpversion") + contains(GCC_VERSION, ^8.*$) { + message( "g++ version 8.x found" ) + CONFIG += g++8 } else { - contains(GCC_VERSION, ^6.*$) { - message( "g++ version 6.x found" ) - CONFIG += g++6 + contains(GCC_VERSION, ^7.*$) { + message( "g++ version 7.x found" ) + CONFIG += g++7 } else { - contains(GCC_VERSION, ^5.*$) { - message( "g++ version 5.x found" ) - CONFIG += g++5 + contains(GCC_VERSION, ^6.*$) { + message( "g++ version 6.x found" ) + CONFIG += g++6 } else { - contains(GCC_VERSION, ^4.*$) { - message( "g++ version 4.x found" ) - CONFIG += g++4 + contains(GCC_VERSION, ^5.*$) { + message( "g++ version 5.x found" ) + CONFIG += g++5 } else { - message( "Unknown GCC configuration" ) + contains(GCC_VERSION, ^4.*$) { + message( "g++ version 4.x found" ) + CONFIG += g++4 + } else { + message( "Unknown GCC configuration" ) + } } } }