Merge topic 'vs10-order-dependencies'

973df7c VS10: Order .vcxproj dependencies deterministically (#10502)
This commit is contained in:
David Cole 2010-10-12 11:05:57 -04:00 committed by CMake Topic Stage
commit 1b98d04e1a
2 changed files with 13 additions and 10 deletions

View File

@ -69,14 +69,6 @@ public:
i.e. "Can I build Debug and Release in the same tree?" */
virtual bool IsMultiConfig() { return true; }
protected:
// Does this VS version link targets to each other if there are
// dependencies in the SLN file? This was done for VS versions
// below 8.
virtual bool VSLinksDependencies() const { return true; }
virtual const char* GetIDEVersion() = 0;
struct TargetCompare
{
bool operator()(cmTarget const* l, cmTarget const* r) const;
@ -87,6 +79,14 @@ protected:
OrderedTargetDependSet(cmGlobalGenerator::TargetDependSet const&);
};
protected:
// Does this VS version link targets to each other if there are
// dependencies in the SLN file? This was done for VS versions
// below 8.
virtual bool VSLinksDependencies() const { return true; }
virtual const char* GetIDEVersion() = 0;
virtual bool ComputeTargetDepends();
class VSDependSet: public std::set<cmStdString> {};
class VSDependMap: public std::map<cmTarget*, VSDependSet> {};

View File

@ -1479,10 +1479,13 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
void cmVisualStudio10TargetGenerator::WriteProjectReferences()
{
cmGlobalGenerator::TargetDependSet const& depends
cmGlobalGenerator::TargetDependSet const& unordered
= this->GlobalGenerator->GetTargetDirectDepends(*this->Target);
typedef cmGlobalVisualStudioGenerator::OrderedTargetDependSet
OrderedTargetDependSet;
OrderedTargetDependSet depends(unordered);
this->WriteString("<ItemGroup>\n", 1);
for( cmGlobalGenerator::TargetDependSet::const_iterator i = depends.begin();
for( OrderedTargetDependSet::const_iterator i = depends.begin();
i != depends.end(); ++i)
{
cmTarget* dt = *i;