summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJunghyun Kim <jh0822.kim@samsung.com>2016-09-30 00:25:02 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-30 14:30:15 (GMT)
commit50b27de4219e2afa665f31a505439e6b9526bb02 (patch)
tree6046e3946e5142567facdeb2a718bc57e3bd6b40 /Source
parent5d29506811c5b75ae48e12de6c317f6440874215 (diff)
downloadCMake-50b27de4219e2afa665f31a505439e6b9526bb02.zip
CMake-50b27de4219e2afa665f31a505439e6b9526bb02.tar.gz
CMake-50b27de4219e2afa665f31a505439e6b9526bb02.tar.bz2
aux_source_directory: Sort results to make it deterministic
The change in commit v3.6.0-rc1~54^2 (file: Sort GLOB results to make it deterministic, 2016-05-14) makes sense for `aux_source_directory` too. Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index fed4d5b..6655911 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -32,6 +32,8 @@ bool cmAuxSourceDirectoryCommand::InitialPass(
sourceListValue = def;
}
+ std::vector<std::string> files;
+
// Load all the files in the directory
cmsys::Directory dir;
if (dir.Load(tdir.c_str())) {
@@ -55,14 +57,16 @@ bool cmAuxSourceDirectoryCommand::InitialPass(
// depends can be done
cmSourceFile* sf = this->Makefile->GetOrCreateSource(fullname);
sf->SetProperty("ABSTRACT", "0");
- if (!sourceListValue.empty()) {
- sourceListValue += ";";
- }
- sourceListValue += fullname;
+ files.push_back(fullname);
}
}
}
}
+ std::sort(files.begin(), files.end());
+ if (!sourceListValue.empty()) {
+ sourceListValue += ";";
+ }
+ sourceListValue += cmJoin(files, ";");
this->Makefile->AddDefinition(args[1], sourceListValue.c_str());
return true;
}