Merge topic 'aux_source_directory-sort'
50b27de4
aux_source_directory: Sort results to make it deterministic
This commit is contained in:
commit
de486a6895
|
@ -32,6 +32,8 @@ bool cmAuxSourceDirectoryCommand::InitialPass(
|
||||||
sourceListValue = def;
|
sourceListValue = def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> files;
|
||||||
|
|
||||||
// Load all the files in the directory
|
// Load all the files in the directory
|
||||||
cmsys::Directory dir;
|
cmsys::Directory dir;
|
||||||
if (dir.Load(tdir.c_str())) {
|
if (dir.Load(tdir.c_str())) {
|
||||||
|
@ -55,14 +57,16 @@ bool cmAuxSourceDirectoryCommand::InitialPass(
|
||||||
// depends can be done
|
// depends can be done
|
||||||
cmSourceFile* sf = this->Makefile->GetOrCreateSource(fullname);
|
cmSourceFile* sf = this->Makefile->GetOrCreateSource(fullname);
|
||||||
sf->SetProperty("ABSTRACT", "0");
|
sf->SetProperty("ABSTRACT", "0");
|
||||||
if (!sourceListValue.empty()) {
|
files.push_back(fullname);
|
||||||
sourceListValue += ";";
|
|
||||||
}
|
|
||||||
sourceListValue += fullname;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::sort(files.begin(), files.end());
|
||||||
|
if (!sourceListValue.empty()) {
|
||||||
|
sourceListValue += ";";
|
||||||
|
}
|
||||||
|
sourceListValue += cmJoin(files, ";");
|
||||||
this->Makefile->AddDefinition(args[1], sourceListValue.c_str());
|
this->Makefile->AddDefinition(args[1], sourceListValue.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue