2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2008-12-02 14:09:21 +01:00
|
|
|
|
2016-01-27 10:14:00 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace CMakeProjectManager {
|
|
|
|
|
namespace Constants {
|
|
|
|
|
|
2020-04-07 14:44:22 +02:00
|
|
|
const char CMAKE_MIMETYPE[] = "text/x-cmake";
|
|
|
|
|
const char CMAKE_PROJECT_MIMETYPE[] = "text/x-cmake-project";
|
2011-11-02 16:45:13 +01:00
|
|
|
const char CMAKE_EDITOR_ID[] = "CMakeProject.CMakeEditor";
|
2020-04-07 14:44:22 +02:00
|
|
|
const char RUN_CMAKE[] = "CMakeProject.RunCMake";
|
|
|
|
|
const char CLEAR_CMAKE_CACHE[] = "CMakeProject.ClearCache";
|
|
|
|
|
const char RESCAN_PROJECT[] = "CMakeProject.RescanProject";
|
|
|
|
|
const char RUN_CMAKE_CONTEXT_MENU[] = "CMakeProject.RunCMakeContextMenu";
|
|
|
|
|
const char BUILD_FILE_CONTEXT_MENU[] = "CMakeProject.BuildFileContextMenu";
|
|
|
|
|
const char BUILD_FILE[] = "CMakeProject.BuildFile";
|
2020-12-02 19:16:40 +01:00
|
|
|
const char CMAKE_HOME_DIR[] = "CMakeProject.HomeDirectory";
|
CMake: Add 'Profile' configuration
Get rid of the hardcoded QML Debugging for Debug & RelWithDebInfo from
the project template, because RelWithDebInfo is actually a good
configuration for doing releases (we use it for Qt Creator), and
enabling QML debugging for releases is a bad idea.
Instead enable QML Debugging in Qt Creator for the Debug configuration,
and add a 'Profile' configuration that is 'RelWithDebInfo + QML
Debugging'.
When importing a build, we only set the "QML debugging" option of the
build configuration, if it is enabled in the imported build, even if it
uses CMAKE_BUILD_TYPE=Debug .
One drawback: When not importing a build, but just setting the build
directory of a "Profile" or "Debug" configuration to an existing build,
Qt Creator asks if it should apply "-DCMAKE_CXX_FLAGS=-DQT_QML_DEBUG".
The user can choose not to, but then is asked the next time again, and
it is not obvious that the "QML debugging" option is responsible for
this.
That is somewhat orthogonal to this change though: Even without this
change, if the user changes the QML debugging option from "Leave at
Default" to "Enable", the same happens, and it is also not clear to the
user how to get rid of it. The user might not even have realized that
they changed the option (e.g. on platforms where the mouse wheel cycles
combo box values).
I think the correct solution is to 1. make clearer where the CMake flags
came from in that dialog, 2. allow the user to cancel a build from that
dialog, 3. allow the user to discard these changes (by changing the
setting) from that dialog. But that is for another patch.
Amends 3300182d405bffe062a0f2be900f35822a9e20b0
Amends 77fed0b0fdce2a93f465c20cd87c41900117dcda
Change-Id: I95de59473b67c5afd6a53ea7f49838dbaef770d4
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-18 10:40:31 +02:00
|
|
|
const char QML_DEBUG_SETTING[] = "CMakeProject.EnableQmlDebugging";
|
2023-05-09 18:22:47 +02:00
|
|
|
const char RELOAD_CMAKE_PRESETS[] = "CMakeProject.ReloadCMakePresets";
|
2010-07-16 14:00:41 +02:00
|
|
|
|
2022-11-21 00:10:25 +01:00
|
|
|
const char CMAKEFORMATTER_SETTINGS_GROUP[] = "CMakeFormatter";
|
|
|
|
|
const char CMAKEFORMATTER_GENERAL_GROUP[] = "General";
|
|
|
|
|
const char CMAKEFORMATTER_ACTION_ID[] = "CMakeFormatter.Action";
|
|
|
|
|
const char CMAKEFORMATTER_MENU_ID[] = "CMakeFormatter.Menu";
|
|
|
|
|
|
2023-02-07 18:15:58 +01:00
|
|
|
const char PACKAGE_MANAGER_DIR[] = ".qtc/package-manager";
|
|
|
|
|
|
2010-07-16 14:00:41 +02:00
|
|
|
// Project
|
2020-04-07 14:44:22 +02:00
|
|
|
const char CMAKE_PROJECT_ID[] = "CMakeProjectManager.CMakeProject";
|
2010-07-16 14:00:41 +02:00
|
|
|
|
2021-02-04 14:53:42 +01:00
|
|
|
const char CMAKE_BUILDCONFIGURATION_ID[] = "CMakeProjectManager.CMakeBuildConfiguration";
|
|
|
|
|
|
2012-02-19 18:58:39 +04:00
|
|
|
// Menu
|
|
|
|
|
const char M_CONTEXT[] = "CMakeEditor.ContextMenu";
|
|
|
|
|
|
2022-07-07 20:44:24 +02:00
|
|
|
namespace Settings {
|
|
|
|
|
const char GENERAL_ID[] = "CMakeSpecifcSettings";
|
|
|
|
|
const char TOOLS_ID[] = "K.CMake.Tools";
|
2022-11-21 00:10:25 +01:00
|
|
|
const char FORMATTER_ID[] = "K.CMake.Formatter";
|
2022-07-07 20:44:24 +02:00
|
|
|
const char CATEGORY[] = "K.CMake";
|
|
|
|
|
} // namespace Settings
|
2015-02-24 21:57:00 +01:00
|
|
|
|
2016-08-18 13:22:06 +02:00
|
|
|
// Snippets
|
|
|
|
|
const char CMAKE_SNIPPETS_GROUP_ID[] = "CMake";
|
|
|
|
|
|
2022-07-07 20:44:24 +02:00
|
|
|
namespace Icons {
|
|
|
|
|
const char FILE_OVERLAY[] = ":/cmakeproject/images/fileoverlay_cmake.png";
|
2022-07-20 14:46:27 +02:00
|
|
|
const char SETTINGS_CATEGORY[] = ":/cmakeproject/images/settingscategory_cmakeprojectmanager.png";
|
2022-07-07 20:44:24 +02:00
|
|
|
} // namespace Icons
|
2016-11-09 14:25:30 +01:00
|
|
|
|
2016-11-14 15:18:25 +01:00
|
|
|
// Actions
|
2020-04-07 14:44:22 +02:00
|
|
|
const char BUILD_TARGET_CONTEXT_MENU[] = "CMake.BuildTargetContextMenu";
|
2016-11-14 15:18:25 +01:00
|
|
|
|
|
|
|
|
// Build Step
|
|
|
|
|
const char CMAKE_BUILD_STEP_ID[] = "CMakeProjectManager.MakeStep";
|
|
|
|
|
|
2022-12-09 18:44:42 +01:00
|
|
|
// Install Step
|
|
|
|
|
const char CMAKE_INSTALL_STEP_ID[] = "CMakeProjectManager.InstallStep";
|
|
|
|
|
|
|
|
|
|
|
2017-04-03 14:31:32 +02:00
|
|
|
// Features
|
|
|
|
|
const char CMAKE_FEATURE_ID[] = "CMakeProjectManager.Wizard.FeatureCMake";
|
|
|
|
|
|
2022-04-07 14:04:20 +02:00
|
|
|
// Tool
|
|
|
|
|
const char TOOL_ID[] = "CMakeProjectManager.CMakeKitInformation";
|
|
|
|
|
|
2023-01-19 10:17:21 +02:00
|
|
|
// Data
|
|
|
|
|
const char BUILD_FOLDER_ROLE[] = "CMakeProjectManager.data.buildFolder";
|
2022-04-07 14:04:20 +02:00
|
|
|
|
2008-12-02 14:09:21 +01:00
|
|
|
} // namespace Constants
|
|
|
|
|
} // namespace CMakeProjectManager
|