summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-09-27 12:47:05 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-09-28 22:07:32 (GMT)
commit820962edc9dd7481c440068dd894c1026abf671d (patch)
tree73c3dfdcb2e9e39d0394f7733e471afdfe5a310b /Source/cmcmd.cxx
parent9cd47ff3c8e9e5b2706075445b4eba5c332dc1d8 (diff)
downloadCMake-820962edc9dd7481c440068dd894c1026abf671d.zip
CMake-820962edc9dd7481c440068dd894c1026abf671d.tar.gz
CMake-820962edc9dd7481c440068dd894c1026abf671d.tar.bz2
Autogen: Refactor json info file reading interface
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index bf856d7..b6076db 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -48,6 +48,8 @@
#include <sstream>
#include <utility>
+#include <cm/string_view>
+
class cmConnection;
int cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg,
@@ -1058,17 +1060,15 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args)
#ifndef CMAKE_BOOTSTRAP
if ((args[1] == "cmake_autogen") && (args.size() >= 4)) {
cmQtAutoMocUic autoGen;
- std::string const& infoFile = args[2];
- std::string const& config = args[3];
+ cm::string_view const infoFile = args[2];
+ cm::string_view const config = args[3];
return autoGen.Run(infoFile, config) ? 0 : 1;
}
if ((args[1] == "cmake_autorcc") && (args.size() >= 3)) {
cmQtAutoRcc autoRcc;
- std::string const& infoFile = args[2];
- std::string config;
- if (args.size() > 3) {
- config = args[3];
- }
+ cm::string_view const infoFile = args[2];
+ cm::string_view const config =
+ (args.size() > 3) ? cm::string_view(args[3]) : cm::string_view();
return autoRcc.Run(infoFile, config) ? 0 : 1;
}
#endif