summaryrefslogtreecommitdiff
path: root/Source/cmAuxSourceDirectoryCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAuxSourceDirectoryCommand.cxx')
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index 847a41660..1f9f5802a 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -26,7 +26,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass(
std::string sourceListValue;
std::string const& templateDirectory = args[0];
std::string tdir;
- if (!cmSystemTools::FileIsFullPath(templateDirectory.c_str())) {
+ if (!cmSystemTools::FileIsFullPath(templateDirectory)) {
tdir = this->Makefile->GetCurrentSourceDirectory();
tdir += "/";
tdir += templateDirectory;
@@ -54,10 +54,8 @@ bool cmAuxSourceDirectoryCommand::InitialPass(
std::string ext = file.substr(dotpos + 1);
std::string base = file.substr(0, dotpos);
// Process only source files
- std::vector<std::string> const& srcExts =
- this->Makefile->GetCMakeInstance()->GetSourceExtensions();
- if (!base.empty() &&
- std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end()) {
+ auto cm = this->Makefile->GetCMakeInstance();
+ if (!base.empty() && cm->IsSourceExtension(ext)) {
std::string fullname = templateDirectory;
fullname += "/";
fullname += file;
@@ -65,7 +63,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass(
// depends can be done
cmSourceFile* sf = this->Makefile->GetOrCreateSource(fullname);
sf->SetProperty("ABSTRACT", "0");
- files.push_back(fullname);
+ files.push_back(std::move(fullname));
}
}
}