[Qt-creator] CMake configuration loop when using vcpkg
I recently stated observing extremely annoying thing when I use QtCreator with projects that also happen to use vcpkg as my package manager. Namely, after initial, successful CMake configuration, any call to CMake configure causes infinite 'configuration loop'. This happens when QtCreator detects new changes in CMakeLists.txt or even if I just call it manually. This looks like this: ** logs -> ** Running /usr/bin/cmake -S /home/izowiuz/Git/concordia -B /home/izowiuz/Git/concordia/build in /home/izowiuz/Git/concordia/build. -- Running vcpkg install Detecting compiler hash for triplet x64-linux... All requested packages are currently installed. Total elapsed time: 2.04 us The package openssl is compatible with built-in CMake targets: find_package(OpenSSL REQUIRED) target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) The package libpq provides CMake integration: find_package(PostgreSQL REQUIRED) target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL) The package libpqxx:x64-linux provides CMake targets: find_package(libpqxx CONFIG REQUIRED) target_link_libraries(main PRIVATE libpqxx::pqxx) The package nlohmann-json:x64-linux provides CMake targets: find_package(nlohmann_json CONFIG REQUIRED) target_link_libraries(main PRIVATE nlohmann_json nlohmann_json::nlohmann_json) The package spdlog:x64-linux provides CMake targets: find_package(spdlog CONFIG REQUIRED) target_link_libraries(main PRIVATE spdlog::spdlog spdlog::spdlog_header_only) -- Running vcpkg install - done -- Configuring done -- Generating done -- Build files have been written to: /home/izowiuz/Git/concordia/build Elapsed time: 00:02. Running /usr/bin/cmake -S /home/izowiuz/Git/concordia -B /home/izowiuz/Git/concordia/build in /home/izowiuz/Git/concordia/build. -- Running vcpkg install Detecting compiler hash for triplet x64-linux... All requested packages are currently installed. Total elapsed time: 1.68 us ... [ ... gazilion more configuration steps skipped ... ] ** logs <- ** I somewhat suspecting this being a fault of a vcpkg because I believe QtC 4.15.2 worked fine earlier in that configuration. This is with pretty mundane CMakeLists.txt without any esoteric stuff done in it. I'm attaching a complete CMakeLists.txt where I see this at the end of my message. I see this with QtCreator 4.15.2, 5.0 RC / Beta and 5.0 release. I'm using Kubuntu 21.04 x86_64 and vcpkg on version 2021-08-12-unknownhash Any help here would be greatly appreciated. I much prefer QtC to the vscode on Linux :] ** CMakeLists.txt -> ** # minimum required CMake version cmake_minimum_required(VERSION 3.15) # force verbose makefiles set(CMAKE_VERBOSE_MAKEFILE ON) # vcpkg's toolchain_file if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) set(VCPKG_ROOT $ENV{VCPKG_ROOT}) set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "") endif() set(VCPKG_FEATURE_FLAGS ${VCPKG_FEATURE_FLAGS} "registries" CACHE STRING "") project("concordia") find_package(OpenSSL REQUIRED) find_package(spdlog CONFIG REQUIRED) find_package(PostgreSQL REQUIRED) find_package(libpqxx CONFIG REQUIRED) find_package(nlohmann_json CONFIG REQUIRED) set(Boost_USE_STATIC_LIBS ON) find_package(Boost REQUIRED) add_executable( concordia "" ) target_compile_features( concordia PRIVATE cxx_std_17 ) target_sources( concordia PRIVATE "src/Concordia.cpp" "src/Listener.cpp" "src/Listener.h" "src/Service.cpp" "src/Service.h" "src/Connection.cpp" "src/Connection.h" "src/DatabaseConnection.cpp" "src/DatabaseConnection.h" "src/RequestProcessor.cpp" "src/RequestProcessor.h" "src/Endpoint.cpp" "src/Endpoint.h" ) target_include_directories( concordia PRIVATE ${Boost_INCLUDE_DIR} ) target_link_libraries( concordia PRIVATE libpqxx::pqxx PostgreSQL::PostgreSQL OpenSSL::SSL OpenSSL::Crypto spdlog::spdlog nlohmann_json::nlohmann_json ) ** CMakeLists.txt <- ** -- Best regards / Pozdrawiam serdecznie Narolewski Jakub Software Developer ___ Qt-creator mailing list Qt-creator@qt-project.org https://lists.qt-project.org/listinfo/qt-creator
[Qt-creator] Generating .qmltypes files
Hello, I recently wanted to generate .qmltypes files for my QML plugins to get syntax suggestions for them but got stuck on Creator's error. I have a plugin named IzLibrary. It resides in its import folder - "IzLibrary". In it I have: 1. qmldir file 2. IzLibraryPlugin.dll file 3. [hopefully] properly generated izlibrary.qmltypes file Contents of the qmldir are: // file start module IzLibrary plugin IzLibraryPlugin typeinfo izlibrary.qmltypes classname IzQMLComponents IzToast 1.0 qrc:///src/JS/IzToast.js IzMark 1.0 qrc:///src/JS/IzMark.js IzBusy 1.0 qrc:///src/JS/IzBusy.js // file end To generate izlibrary.qmltypes file I used: qmlplugindump IzLibrary 1.0 ./ > ./IzLibrary/izlibrary.qmltypes // file start This command generates, what I think is, a proper .qmltypes file: import QtQuick.tooling 1.2 // This file describes the plugin-supplied types contained in the library. // It is used for QML tooling purposes only. // // This file was auto-generated by: // 'qmlplugindump IzLibrary 1.0 ./' Module { dependencies: [] Component { name: "QDoubleValidator" prototype: "QValidator" exports: ["IzDoubleValidator 1.0"] exportMetaObjectRevisions: [0] [~here be 4000 more lines of similar stuff~] } } // file end But under QtCreator 4.6, in General Messages tab, I get: Warnings while parsing QML type information of C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary: Failed to parse "C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary/izlibrary.qmltypes". Error: 1:1: Expected token "numeric literal". QML module does not contain information about components contained in plugins. Is there something I did wrong? I have a feeling I missed something really trivial. Jakub Narolewski ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
[Qt-creator] QtCreator 4.6 - constant, high CPU usage
Thank you for the link to the Jira task, Alessandro. I now believe I can reproduce this 100% of the time. I have added a comment in the Jira. From: Alessandro Portale Sent: 13 April 2018 16:15 To: Jakub Narolewski; qt-creator@qt-project.org Subject: AW: QtCreator 4.6 - constant, high CPU usage Hi Jakub, there were reports about Qt Creator occupying one CPU core for no obvious reason. Here is the Jira task: https://bugreports.qt.io/browse/QTCREATORBUG-19458 It would be great to gather more information about it. Thank You, Alessandro Von: Qt-creator im Auftrag von Jakub Narolewski Gesendet: Freitag, 13. April 2018 15:37:26 An: qt-creator@qt-project.org Betreff: [Qt-creator] QtCreator 4.6 - constant, high CPU usage Hello :] I'm having a weird problem with newest Creator update. QtC seems to spin some heavy-duty thread on one of CPU cores on all my machines. On my six cored AMD CPU I see it taking 16% of total processing power [as reported by Windows' Task Manager]. I notice it every time due to my not-so-quiet fans :P This starts at seemingly random times; sometimes during cpp/QML code editing, sometimes when QtC is minimized. When it starts there is 50/50 chance it won't stop on its own and only closing the application helps. I remember seeing something very similar in versions 4.5.x when I had clang refactoring plugin enabled in Plugins menu. In version 4.6 I can't seem to find this plugin in the list. This happens in QtCreator installed with MaintenanceTool. It reports itself as: Based on Qt 5.10.1 (MSVC 2015, 32 bit) Built on Mar 27 2018 15:05:08 >From revision 3ac2aa7bb5 I have this problem on up-to-date versions of Windows 7 x64 and Windows 10 x64 on two different workstations. Have someone seen something like this lately? Maybe it has an already opened issue? Jakub Narolewski ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
[Qt-creator] QtCreator 4.6 - constant, high CPU usage
Hello :] I'm having a weird problem with newest Creator update. QtC seems to spin some heavy-duty thread on one of CPU cores on all my machines. On my six cored AMD CPU I see it taking 16% of total processing power [as reported by Windows' Task Manager]. I notice it every time due to my not-so-quiet fans :P This starts at seemingly random times; sometimes during cpp/QML code editing, sometimes when QtC is minimized. When it starts there is 50/50 chance it won't stop on its own and only closing the application helps. I remember seeing something very similar in versions 4.5.x when I had clang refactoring plugin enabled in Plugins menu. In version 4.6 I can't seem to find this plugin in the list. This happens in QtCreator installed with MaintenanceTool. It reports itself as: Based on Qt 5.10.1 (MSVC 2015, 32 bit) Built on Mar 27 2018 15:05:08 >From revision 3ac2aa7bb5 I have this problem on up-to-date versions of Windows 7 x64 and Windows 10 x64 on two different workstations. Have someone seen something like this lately? Maybe it has an already opened issue? Jakub Narolewski ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator