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

CMake build takes 5x as long to build as qmake build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.8
    • Build System: CMake
    • None
    • macOS
    • 69254dfc9 (dev), 8d93ef622 (6.8)

    Description

      Ninja

      qmake

      ❯ time make
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++1z  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=12.0 -Wall -Wextra -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_QMLMETA_LIB -I/Users/torarne/dev/qt/qtdeclarative/examples/quick/animation -I. -I../../qtbase/lib/QtQuick.framework/Headers -I../../qtbase/lib/QtOpenGL.framework/Headers -I../../qtbase/lib/QtGui.framework/Headers -I../../qtbase/lib/QtQmlModels.framework/Headers -I../../qtbase/lib/QtQml.framework/Headers -I../../qtbase/include -I../../qtbase/include/QtQmlIntegration -I../../qtbase/lib/QtNetwork.framework/Headers -I../../qtbase/lib/QtCore.framework/Headers -I../../qtbase/lib/QtQmlMeta.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../qtbase/mkspecs/macx-clang -F/Users/torarne/build/qt/6.x/qtbase/lib -o main.o /Users/torarne/dev/qt/qtdeclarative/examples/quick/animation/main.cpp
      /Users/torarne/build/qt/6.x/qtbase/libexec/rcc -name shared --no-zstd /Users/torarne/dev/qt/qtdeclarative/examples/quick/shared/shared.qrc -o qrc_shared.cpp
      /Users/torarne/build/qt/6.x/qtbase/libexec/rcc -name animation --no-zstd /Users/torarne/dev/qt/qtdeclarative/examples/quick/animation/animation.qrc -o qrc_animation.cpp
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++1z  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=12.0 -Wall -Wextra -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_QMLMETA_LIB -I/Users/torarne/dev/qt/qtdeclarative/examples/quick/animation -I. -I../../qtbase/lib/QtQuick.framework/Headers -I../../qtbase/lib/QtOpenGL.framework/Headers -I../../qtbase/lib/QtGui.framework/Headers -I../../qtbase/lib/QtQmlModels.framework/Headers -I../../qtbase/lib/QtQml.framework/Headers -I../../qtbase/include -I../../qtbase/include/QtQmlIntegration -I../../qtbase/lib/QtNetwork.framework/Headers -I../../qtbase/lib/QtCore.framework/Headers -I../../qtbase/lib/QtQmlMeta.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../qtbase/mkspecs/macx-clang -F/Users/torarne/build/qt/6.x/qtbase/lib -o qrc_shared.o qrc_shared.cpp
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++1z  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=12.0 -Wall -Wextra -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_QMLMETA_LIB -I/Users/torarne/dev/qt/qtdeclarative/examples/quick/animation -I. -I../../qtbase/lib/QtQuick.framework/Headers -I../../qtbase/lib/QtOpenGL.framework/Headers -I../../qtbase/lib/QtGui.framework/Headers -I../../qtbase/lib/QtQmlModels.framework/Headers -I../../qtbase/lib/QtQml.framework/Headers -I../../qtbase/include -I../../qtbase/include/QtQmlIntegration -I../../qtbase/lib/QtNetwork.framework/Headers -I../../qtbase/lib/QtCore.framework/Headers -I../../qtbase/lib/QtQmlMeta.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../qtbase/mkspecs/macx-clang -F/Users/torarne/build/qt/6.x/qtbase/lib -o qrc_animation.o qrc_animation.cpp
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=12.0 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Users/torarne/build/qt/6.x/qtbase/lib -o animation.app/Contents/MacOS/animation  main.o qrc_shared.o qrc_animation.o   -F/Users/torarne/build/qt/6.x/qtbase/lib -framework QtQuick -framework QtOpenGL -framework QtGui -framework AppKit -framework ImageIO -framework Metal -framework QtQmlModels -framework QtQml -framework QtNetwork -framework QtCore -framework IOKit -framework DiskArbitration -framework UniformTypeIdentifiers -framework QtQmlMeta -framework AGL -framework OpenGL
      make  0.93s user 0.15s system 123% cpu 0.882 total
       

      CMake

      ❯ time ninja
      [110/110] Linking CXX executable animationexample.app/Contents/MacOS/animationexample
      -- Running macOS bundle QML support POST_BUILD routine.
      -- Installing: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQuick/qmldir
      -- Symlinking: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQuick/libqtquick2plugin.dylib
      -- Installing: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQml/qmldir
      -- Symlinking: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQml/libqmlplugin.dylib
      -- Installing: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQml/Models/qmldir
      -- Symlinking: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQml/Models/libmodelsplugin.dylib
      -- Installing: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQml/WorkerScript/qmldir
      -- Symlinking: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQml/WorkerScript/libworkerscriptplugin.dylib
      -- Installing: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/shared/qmldir
      -- Symlinking: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/shared/libanimation_shared.dylib
      -- Installing: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQuick/Window/qmldir
      -- Symlinking: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQuick/Window/libquickwindowplugin.dylib
      -- Installing: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQuick/Particles/qmldir
      -- Symlinking: /Users/torarne/build/qt/6.x/examples/animations-cmake-ninja/animationexample.app/Contents/Resources/qml/QtQuick/Particles/libparticlesplugin.dylib
      ninja  26.25s user 3.37s system 672% cpu 4.405 total 

      Xcode

      qmake

      ❯../../qtbase/bin/qmake ~/dev/qt/qtdeclarative/examples/quick/animation/ -spec macx-xcode

      CMake

      ❯ time ../../qtbase/bin/qt-cmake ~/dev/qt/qtdeclarative/examples/quick/animation/ -GXcode

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-126205
          # Subject Branch Project Status CR V

          Activity

            People

              qtbuildsystem Qt Build System Team
              vestbo Tor Arne Vestbø
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change