diff options
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 14 |
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 |