summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2023-12-11 22:30:03 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-13 15:20:41 (GMT)
commit478a5f4e044d253971e71a41ad6fc6b8aa4e1c07 (patch)
treea20da67142a7a14076f8aeed145c780963650450 /Source
parentb44e38a39736318aaf21a6865fdbee28a0e26700 (diff)
downloadCMake-478a5f4e044d253971e71a41ad6fc6b8aa4e1c07.zip
CMake-478a5f4e044d253971e71a41ad6fc6b8aa4e1c07.tar.gz
CMake-478a5f4e044d253971e71a41ad6fc6b8aa4e1c07.tar.bz2
fileapi: Make launcher attribute 'arguments' optional
This was missed in commit 80a64c9ce5 (fileapi: Add cross-compiling emulator to codemodel-v2, 2023-11-11).
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileAPICodemodel.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index c0c9b75..e67d91f 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -2102,7 +2102,9 @@ Json::Value Target::DumpLauncher(const char* name, const char* type)
for (std::string const& arg : cmMakeRange(commandWithArgs).advance(1)) {
args.append(arg);
}
- launcher["arguments"] = std::move(args);
+ if (!args.empty()) {
+ launcher["arguments"] = std::move(args);
+ }
}
return launcher;
}