Nim: Use remote device when searching compilers there

Change-Id: Iab1cb1dbaaf789d2ad328ab70c3dec8839d4ffcc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-07-05 16:17:53 +02:00
parent 10ca1c711e
commit 7a6c099c08
2 changed files with 5 additions and 3 deletions

View File

@@ -28,6 +28,8 @@
#include "nimconstants.h"
#include "nimtoolchain.h"
#include <projectexplorer/devicesupport/devicemanager.h>
#include <utils/algorithm.h>
#include <utils/environment.h>
#include <utils/pathchooser.h>
@@ -52,11 +54,10 @@ NimToolChainFactory::NimToolChainFactory()
QList<ToolChain *> NimToolChainFactory::autoDetect(const QList<ToolChain *> &alreadyKnown,
const IDevice::Ptr &device)
{
Q_UNUSED(device);
QList<ToolChain *> result;
Environment systemEnvironment = Environment::systemEnvironment();
const FilePath compilerPath = systemEnvironment.searchInPath("nim");
IDevice::ConstPtr dev = device ? device : DeviceManager::defaultDesktopDevice();
const FilePath compilerPath = dev->searchInPath(FilePath::fromString("nim"));
if (compilerPath.isEmpty())
return result;

View File

@@ -18,5 +18,6 @@ RUN apt-get update \
g++ \
gdb \
ninja-build \
nim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*