Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62211

allow C++14 compiler flags for Qt builds using ICC

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.9.1
    • Build System
    •  * Windows 10 x64,
       * IPSXE 2017 Update 4,
       * MSVC 2015 Update 3,
       * Windows SDK 10.0.14393.33.

    Description

      Hello everyone,

      While testing Qt build using ICC with -cppstd cpp14 key got error:

      Checking for C++14 support... 
      + cd /d C:\libQT-5.9.1\build\config.tests\common\c++14 && C:\libQT-5.9.1\build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console single_arch" "QMAKE_LIBDIR += c:\\libQT-5.9.1\\build\\..\\..\\libICU-59.1\\ICC64RH\\lib" "INCLUDEPATH += c:\\libQT-5.9.1\\build\\..\\..\\libICU-59.1\\ICC64RH\\include" C:/libQT-5.9.1/build/qtbase/config.tests/common/c++14
      + cd /d C:\libQT-5.9.1\build\config.tests\common\c++14 && set MAKEFLAGS=& jom
      > jom 1.1.2 - empower your cores
      >     icl -c -nologo -Zm200 /Qprec /Qwd1744,1738,809,3373 /Zc:forScope -O2 -MD -W3 /Qwd673 -EHsc -DUNICODE -DWIN32 -DWIN64 -DNDEBUG -IC:\libQT-5.9.1\build\qtbase\config.tests\common\c++14 -I. -IC:\libICU-59.1\ICC64RH\include -IC:\libQT-5.9.1\build\qtbase\mkspecs\win32-icc -Fo @C:\Users\test\AppData\Local\Temp\c++14.obj.3460.16.jom
      > c++14.cpp
      > C:\libQT-5.9.1\build\qtbase\config.tests\common\c++14\c++14.cpp(43): catastrophic error: #error directive: "__cplusplus must be > 201103L (the value of C++11)"
      >   #  error "__cplusplus must be > 201103L (the value of C++11)"
      >      ^
      > compilation aborted for C:\libQT-5.9.1\build\qtbase\config.tests\common\c++14\c++14.cpp (code 4)
      > jom: C:\libQT-5.9.1\build\config.tests\common\c++14\Makefile [c++14.obj] Error 4
      test config.qtbase.tests.c++14 FAILED
      
      <snip>
      
      ERROR: Feature 'c++14' was enabled, but the pre-condition 'features.c++11 && tests.c++14' failed.

       which relate to ICC and already reported on ICC Forums.

      After commenting #  error... condition in file qtbase/config.tests/common/cpp14/cpp14.cpp , test passed, but compiler didn't receive -Qstd=cpp14 key during Qt build.

      After uncommenting QMAKE_CXXFLAGS_CXX14 variable definition in file qtbase/mkspecs/win32-icc/qmake.conf , build of all Qt modules and examples using ICC with -cppstd cpp14 key finished successfully. Similar to mingw-w64.

      Taking into account the above, it could make sense to uncomment mentioned  QMAKE_CXXFLAGS_CXX14 variable in recent Qt sources.

       

      Alexander

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            sav sav
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes