summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index d669ed7..ac57bc2 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -8,11 +8,10 @@
#include <utility>
#include <cm/memory>
+#include <cmext/string_view>
#include "cmsys/Glob.hxx"
-#include "cm_static_string_view.hxx"
-
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
#include "cmExportSet.h"
@@ -661,7 +660,6 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
// Nothing to do. An INTERFACE_LIBRARY can be installed, but the
// only effect of that is to make it exportable. It installs no
// other files itself.
- break;
default:
// This should never happen due to the above type check.
// Ignore the case.
@@ -680,9 +678,9 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
}
if (createInstallGeneratorsForTargetFileSets && !namelinkOnly) {
- const char* files = target.GetProperty("PRIVATE_HEADER");
- if ((files) && (*files)) {
- std::vector<std::string> relFiles = cmExpandedList(files);
+ cmProp files = target.GetProperty("PRIVATE_HEADER");
+ if (files && !files->empty()) {
+ std::vector<std::string> relFiles = cmExpandedList(*files);
std::vector<std::string> absFiles;
if (!helper.MakeFilesFullPath("PRIVATE_HEADER", relFiles, absFiles)) {
return false;
@@ -703,8 +701,8 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
}
files = target.GetProperty("PUBLIC_HEADER");
- if ((files) && (*files)) {
- std::vector<std::string> relFiles = cmExpandedList(files);
+ if (files && !files->empty()) {
+ std::vector<std::string> relFiles = cmExpandedList(*files);
std::vector<std::string> absFiles;
if (!helper.MakeFilesFullPath("PUBLIC_HEADER", relFiles, absFiles)) {
return false;
@@ -725,8 +723,8 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
}
files = target.GetProperty("RESOURCE");
- if ((files) && (*files)) {
- std::vector<std::string> relFiles = cmExpandedList(files);
+ if (files && !files->empty()) {
+ std::vector<std::string> relFiles = cmExpandedList(*files);
std::vector<std::string> absFiles;
if (!helper.MakeFilesFullPath("RESOURCE", relFiles, absFiles)) {
return false;