Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25513

CMake keeps reconfiguring in Qt Creator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 4.14.1
    • None
    • Arch Linux
    • Linux/X11

    Description

      After a certain amount of time in Qt Creator, something causes CMake to continually reconfigure my project, and I have to quit and restart the IDE to fix it.

      I'm using CMake 3.19 installed by the maintenance tool.

      Specifically this problem has occurred when I've tried to include the cmake file from this repository: https://github.com/KDAB/android_openssl.

      But then it comes back after restarting it.

      These are the lines shown in the general tab, and this same block is repeated over and over again:

      Running /usr/bin/cmake -S /home/ben/Documents/code/keywallet -B /home/ben/Documents/code/keywallet/build-keywallet-Android_Qt_5_15_2_Clang_Multi_Abi-Debug in /home/ben/Documents/code/keywallet/build-keywallet-Android_Qt_5_15_2_Clang_Multi_Abi-Debug.
       /home/ben/Documents/code/android_openssl/no-asm
       -- Configuring done
       -- Generating done
       -- Build files have been written to: /home/ben/Documents/code/keywallet/build-keywallet-Android_Qt_5_15_2_Clang_Multi_Abi-Debug
       Elapsed time: 00:00.
      

      This is my CMakeLists.txt:

      cmake_minimum_required(VERSION 3.5)
      include(ExternalProject)
      
      project(keywallet LANGUAGES CXX)
      
      set(CMAKE_INCLUDE_CURRENT_DIR ON)
      
      set(CMAKE_AUTOUIC ON)
      set(CMAKE_AUTOMOC ON)
      set(CMAKE_AUTORCC ON)
      
      set(CMAKE_CXX_STANDARD 11)
      set(CMAKE_CXX_STANDARD_REQUIRED ON)
      
      # QtCreator supports the following variables for Android, which are identical to qmake Android variables.
      # Check https://doc.qt.io/qt/deployment-android.html for more information.
      # They need to be set before the find_package(...) calls below.
      
      if(ANDROID)
          set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
          set(ANDROID_SSL_PATH "/home/ben/Documents/code/android_openssl")
          include(${ANDROID_SSL_PATH}/CMakeLists.txt)
      endif()
      
      find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick REQUIRED)
      find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick REQUIRED)
      
      set(PROJECT_SOURCES
              main.cpp
              qml.qrc
              resources.qrc
              kwsession.cpp
      )
      
      if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
          qt_add_executable(keywallet
              ${PROJECT_SOURCES}
          )
      else()
          if(ANDROID)
              add_library(keywallet SHARED
                  ${PROJECT_SOURCES}
              )
          else()
              add_executable(keywallet
                ${PROJECT_SOURCES}
              )
          endif()
      endif()
      
      target_compile_definitions(keywallet
        PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
      target_link_libraries(keywallet PRIVATE
        Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick
        )
      
      

      I don't know what is causing CMake to reconfigure.

       

      Attachments

        Issue Links

          Activity

            People

              cadam Cristian Adam
              bgc Benjamin Cottrell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: