forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/8.0'
Change-Id: I552d201d09d62d21655176467088c6e48b8a2fe2
This commit is contained in:
@@ -1074,11 +1074,6 @@ static bool isQnx(const Kit *k)
|
||||
return DeviceTypeKitAspect::deviceTypeId(k) == Qnx::Constants::QNX_QNX_OS_TYPE;
|
||||
}
|
||||
|
||||
static bool isDocker(const Kit *k)
|
||||
{
|
||||
return DeviceTypeKitAspect::deviceTypeId(k) == Docker::Constants::DOCKER_DEVICE_TYPE;
|
||||
}
|
||||
|
||||
static bool isWindowsARM64(const Kit *k)
|
||||
{
|
||||
ToolChain *toolchain = ToolChainKitAspect::cxxToolChain(k);
|
||||
@@ -1105,8 +1100,9 @@ static CommandLine defaultInitialCMakeCommand(const Kit *k, const QString buildT
|
||||
Internal::CMakeSpecificSettings *settings
|
||||
= Internal::CMakeProjectPlugin::projectTypeSpecificSettings();
|
||||
|
||||
// Package manager
|
||||
if (!isDocker(k) && settings->packageManagerAutoSetup.value()) {
|
||||
// Package manager auto setup. The file auto-setup.cmake resides on the host,
|
||||
// so it's not accessible for remotely running cmakes. We need to exclude that case.
|
||||
if (!cmd.executable().needsDevice() && settings->packageManagerAutoSetup.value()) {
|
||||
cmd.addArg("-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH="
|
||||
"%{IDE:ResourcePath}/package-manager/auto-setup.cmake");
|
||||
}
|
||||
|
||||
@@ -377,16 +377,17 @@ void CMakeBuildSystem::setParametersAndRequestParse(const BuildDirParameters &pa
|
||||
return; // ignore request, this build configuration is not active!
|
||||
}
|
||||
|
||||
if (!parameters.cmakeTool()) {
|
||||
const CMakeTool *tool = parameters.cmakeTool();
|
||||
if (!tool || !tool->isValid()) {
|
||||
TaskHub::addTask(
|
||||
BuildSystemTask(Task::Error,
|
||||
tr("The kit needs to define a CMake tool to parse this project.")));
|
||||
return;
|
||||
}
|
||||
if (!parameters.cmakeTool()->hasFileApi()) {
|
||||
TaskHub::addTask(BuildSystemTask(Task::Error,
|
||||
CMakeKitAspect::msgUnsupportedVersion(
|
||||
parameters.cmakeTool()->version().fullVersion)));
|
||||
if (!tool->hasFileApi()) {
|
||||
TaskHub::addTask(
|
||||
BuildSystemTask(Task::Error,
|
||||
CMakeKitAspect::msgUnsupportedVersion(tool->version().fullVersion)));
|
||||
return;
|
||||
}
|
||||
QTC_ASSERT(parameters.isValid(), return );
|
||||
|
||||
@@ -261,7 +261,7 @@ Tasks CMakeKitAspect::validate(const Kit *k) const
|
||||
{
|
||||
Tasks result;
|
||||
CMakeTool *tool = CMakeKitAspect::cmakeTool(k);
|
||||
if (tool) {
|
||||
if (tool && tool->isValid()) {
|
||||
CMakeTool::Version version = tool->version();
|
||||
if (version.major < 3 || (version.major == 3 && version.minor < 14)) {
|
||||
result << BuildSystemTask(Task::Warning, msgUnsupportedVersion(version.fullVersion));
|
||||
|
||||
@@ -91,6 +91,9 @@ static QStringList scanDirectory(const FilePath &path, const QString &prefix)
|
||||
|
||||
static QString baseCMakeToolDisplayName(CMakeTool &tool)
|
||||
{
|
||||
if (!tool.isValid())
|
||||
return QString("CMake");
|
||||
|
||||
CMakeTool::Version version = tool.version();
|
||||
return QString("CMake %1.%2.%3").arg(version.major).arg(version.minor).arg(version.patch);
|
||||
}
|
||||
|
||||
@@ -310,12 +310,12 @@ bool CMakeTool::hasFileApi() const
|
||||
|
||||
CMakeTool::Version CMakeTool::version() const
|
||||
{
|
||||
return m_introspection ? m_introspection->m_version : CMakeTool::Version();
|
||||
return isValid() ? m_introspection->m_version : CMakeTool::Version();
|
||||
}
|
||||
|
||||
QString CMakeTool::versionDisplay() const
|
||||
{
|
||||
if (!m_introspection)
|
||||
if (!isValid())
|
||||
return CMakeToolManager::tr("Version not parseable");
|
||||
|
||||
const Version &version = m_introspection->m_version;
|
||||
|
||||
Reference in New Issue
Block a user