forked from qt-creator/qt-creator
CMake: Use simpler and more correct code for running custom targets
Amends 5537a102e6
The arguments for the CMake call that runs custom targets with the
`qtc_runnable` feature must be split with the rules for the platform
that they will be run on. The conceptually correct thing is to use the
OS type from the CMake executable (which is the build target info's
targetFilePath).
Using CommandLine with an empty executable is confusing and conceptually
wrong. Use ProcessArgs::joinArgs with the right OS type directly
instead.
Change-Id: Ibc0aa087d07922e8720b4304b9d3ba17d774cc7d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -145,7 +145,8 @@ void DesktopRunConfiguration::updateTargetInformation()
|
||||
|
||||
const QStringList argumentsList = bti.additionalData.toMap()["arguments"].toStringList();
|
||||
if (!argumentsList.isEmpty())
|
||||
aspect<ArgumentsAspect>()->setArguments(CommandLine{"", argumentsList}.arguments());
|
||||
aspect<ArgumentsAspect>()->setArguments(
|
||||
ProcessArgs::joinArgs(argumentsList, bti.targetFilePath.osType()));
|
||||
|
||||
emit aspect<EnvironmentAspect>()->environmentChanged();
|
||||
}
|
||||
|
Reference in New Issue
Block a user