diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 99e33ea5c7..a5c67976f2 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1312,23 +1312,30 @@ bool HandleTargetsMode(std::vector const& args, } auto ctx = std::make_shared(); - ctx->GenericArgs = cm::make_unique(genericArgs); - ctx->ArchiveArgs = cm::make_unique(archiveArgs); - ctx->LibraryArgs = cm::make_unique(libraryArgs); - ctx->RuntimeArgs = cm::make_unique(runtimeArgs); - ctx->ObjectArgs = cm::make_unique(objectArgs); + ctx->GenericArgs = + cm::make_unique(std::move(genericArgs)); + ctx->ArchiveArgs = + cm::make_unique(std::move(archiveArgs)); + ctx->LibraryArgs = + cm::make_unique(std::move(libraryArgs)); + ctx->RuntimeArgs = + cm::make_unique(std::move(runtimeArgs)); + ctx->ObjectArgs = + cm::make_unique(std::move(objectArgs)); ctx->FrameworkArgs = - cm::make_unique(frameworkArgs); - ctx->BundleArgs = cm::make_unique(bundleArgs); + cm::make_unique(std::move(frameworkArgs)); + ctx->BundleArgs = + cm::make_unique(std::move(bundleArgs)); ctx->PrivateHeaderArgs = - cm::make_unique(privateHeaderArgs); + cm::make_unique(std::move(privateHeaderArgs)); ctx->PublicHeaderArgs = - cm::make_unique(publicHeaderArgs); - ctx->ResourceArgs = cm::make_unique(resourceArgs); + cm::make_unique(std::move(publicHeaderArgs)); + ctx->ResourceArgs = + cm::make_unique(std::move(resourceArgs)); ctx->CxxModuleBmiArgs = - cm::make_unique(cxxModuleBmiArgs); - ctx->IncludesArgs = includesArgs; - ctx->FileSetArgs = fileSetArgs; + cm::make_unique(std::move(cxxModuleBmiArgs)); + ctx->IncludesArgs = std::move(includesArgs); + ctx->FileSetArgs = std::move(fileSetArgs); ctx->NamelinkMode = namelinkMode; ctx->ImportlinkMode = importlinkMode; ctx->Exports = exports;