COMP: Fix Borland 5.5 build

- Its <iosfwd> header includes windows.h which
    defines GetCurrentDirectory
  - It defines 'interface' so we cannot use it as
    a variable name.
This commit is contained in:
Brad King 2008-02-24 14:05:11 -05:00
parent daaaf7fdcc
commit dab5ea859a
4 changed files with 18 additions and 17 deletions

View File

@ -308,14 +308,14 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
if(entry.Target) if(entry.Target)
{ {
// Follow the target dependencies. // Follow the target dependencies.
if(cmTargetLinkInterface const* interface = if(cmTargetLinkInterface const* iface =
entry.Target->GetLinkInterface(this->Config)) entry.Target->GetLinkInterface(this->Config))
{ {
// This target provides its own link interface information. // This target provides its own link interface information.
this->AddLinkEntries(depender_index, interface->Libraries); this->AddLinkEntries(depender_index, iface->Libraries);
// Handle dependent shared libraries. // Handle dependent shared libraries.
this->QueueSharedDependencies(depender_index, interface->SharedDeps); this->QueueSharedDependencies(depender_index, iface->SharedDeps);
} }
else if(!entry.Target->IsImported() && else if(!entry.Target->IsImported() &&
entry.Target->GetType() != cmTarget::EXECUTABLE) entry.Target->GetType() != cmTarget::EXECUTABLE)
@ -381,11 +381,11 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
// Target items may have their own dependencies. // Target items may have their own dependencies.
if(entry.Target) if(entry.Target)
{ {
if(cmTargetLinkInterface const* interface = if(cmTargetLinkInterface const* iface =
entry.Target->GetLinkInterface(this->Config)) entry.Target->GetLinkInterface(this->Config))
{ {
// We use just the shared dependencies, not the interface. // We use just the shared dependencies, not the interface.
this->QueueSharedDependencies(index, interface->SharedDeps); this->QueueSharedDependencies(index, iface->SharedDeps);
} }
} }
} }

View File

@ -135,16 +135,16 @@ cmExportFileGenerator
} }
// Add the transitive link dependencies for this configuration. // Add the transitive link dependencies for this configuration.
if(cmTargetLinkInterface const* interface = if(cmTargetLinkInterface const* iface =
target->GetLinkInterface(config)) target->GetLinkInterface(config))
{ {
// This target provides a link interface, so use it. // This target provides a link interface, so use it.
this->SetImportLinkProperty(suffix, target, this->SetImportLinkProperty(suffix, target,
"IMPORTED_LINK_INTERFACE_LIBRARIES", "IMPORTED_LINK_INTERFACE_LIBRARIES",
interface->Libraries, properties); iface->Libraries, properties);
this->SetImportLinkProperty(suffix, target, this->SetImportLinkProperty(suffix, target,
"IMPORTED_LINK_DEPENDENT_LIBRARIES", "IMPORTED_LINK_DEPENDENT_LIBRARIES",
interface->SharedDeps, properties); iface->SharedDeps, properties);
} }
else if(target->GetType() == cmTarget::STATIC_LIBRARY || else if(target->GetType() == cmTarget::STATIC_LIBRARY ||
target->GetType() == cmTarget::SHARED_LIBRARY) target->GetType() == cmTarget::SHARED_LIBRARY)

View File

@ -83,6 +83,7 @@ public:
// support the large integer types. // support the large integer types.
#if defined(CMAKE_BUILD_WITH_CMAKE) #if defined(CMAKE_BUILD_WITH_CMAKE)
# include <cmsys/IOStream.hxx> # include <cmsys/IOStream.hxx>
# undef GetCurrentDirectory // Borland <iosfwd> includes windows.h
#endif #endif
// Avoid warnings in system headers. // Avoid warnings in system headers.

View File

@ -3282,11 +3282,11 @@ cmTargetLinkInterface const* cmTarget::GetLinkInterface(const char* config)
if(i == this->LinkInterface.end()) if(i == this->LinkInterface.end())
{ {
// Compute the link interface for this configuration. // Compute the link interface for this configuration.
cmTargetLinkInterface* interface = this->ComputeLinkInterface(config); cmTargetLinkInterface* iface = this->ComputeLinkInterface(config);
// Store the information for this configuration. // Store the information for this configuration.
std::map<cmStdString, cmTargetLinkInterface*>::value_type std::map<cmStdString, cmTargetLinkInterface*>::value_type
entry(config?config:"", interface); entry(config?config:"", iface);
i = this->LinkInterface.insert(entry).first; i = this->LinkInterface.insert(entry).first;
} }
@ -3329,14 +3329,14 @@ cmTargetLinkInterface* cmTarget::ComputeLinkInterface(const char* config)
} }
// Allocate the interface. // Allocate the interface.
cmTargetLinkInterface* interface = new cmTargetLinkInterface; cmTargetLinkInterface* iface = new cmTargetLinkInterface;
if(!interface) if(!iface)
{ {
return 0; return 0;
} }
// Expand the list of libraries in the interface. // Expand the list of libraries in the interface.
cmSystemTools::ExpandListArgument(libs, interface->Libraries); cmSystemTools::ExpandListArgument(libs, iface->Libraries);
// Now we need to construct a list of shared library dependencies // Now we need to construct a list of shared library dependencies
// not included in the interface. // not included in the interface.
@ -3346,8 +3346,8 @@ cmTargetLinkInterface* cmTarget::ComputeLinkInterface(const char* config)
// either list. // either list.
std::set<cmStdString> emitted; std::set<cmStdString> emitted;
for(std::vector<std::string>::const_iterator for(std::vector<std::string>::const_iterator
li = interface->Libraries.begin(); li = iface->Libraries.begin();
li != interface->Libraries.end(); ++li) li != iface->Libraries.end(); ++li)
{ {
emitted.insert(*li); emitted.insert(*li);
} }
@ -3384,7 +3384,7 @@ cmTargetLinkInterface* cmTarget::ComputeLinkInterface(const char* config)
{ {
if(tgt->GetType() == cmTarget::SHARED_LIBRARY) if(tgt->GetType() == cmTarget::SHARED_LIBRARY)
{ {
interface->SharedDeps.push_back(li->first); iface->SharedDeps.push_back(li->first);
} }
} }
else else
@ -3398,7 +3398,7 @@ cmTargetLinkInterface* cmTarget::ComputeLinkInterface(const char* config)
} }
// Return the completed interface. // Return the completed interface.
return interface; return iface;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------