summaryrefslogtreecommitdiffstats
path: root/Source/cmExportLibraryDependencies.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmExportLibraryDependencies.cxx')
-rw-r--r--Source/cmExportLibraryDependencies.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx
index f07b783..4624e92 100644
--- a/Source/cmExportLibraryDependencies.cxx
+++ b/Source/cmExportLibraryDependencies.cxx
@@ -21,6 +21,10 @@
bool cmExportLibraryDependenciesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0033,
+ "The export_library_dependencies command should not be called; "
+ "see CMP0033."))
+ { return true; }
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
@@ -51,11 +55,11 @@ void cmExportLibraryDependenciesCommand::FinalPass()
void cmExportLibraryDependenciesCommand::ConstFinalPass() const
{
// Use copy-if-different if not appending.
- cmsys::auto_ptr<std::ofstream> foutPtr;
+ cmsys::auto_ptr<cmsys::ofstream> foutPtr;
if(this->Append)
{
- cmsys::auto_ptr<std::ofstream> ap(
- new std::ofstream(this->Filename.c_str(), std::ios::app));
+ cmsys::auto_ptr<cmsys::ofstream> ap(
+ new cmsys::ofstream(this->Filename.c_str(), std::ios::app));
foutPtr = ap;
}
else
@@ -169,7 +173,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
const char* vertest =
"\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4";
fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n";
- fout << "IF(" << vertest << ")\n";
+ fout << "if(" << vertest << ")\n";
fout << " # Information for CMake 2.6 and above.\n";
for(std::map<cmStdString, cmStdString>::const_iterator
i = libDepsNew.begin();
@@ -177,10 +181,10 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
{
if(!i->second.empty())
{
- fout << " SET(\"" << i->first << "\" \"" << i->second << "\")\n";
+ fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n";
}
}
- fout << "ELSE(" << vertest << ")\n";
+ fout << "else()\n";
fout << " # Information for CMake 2.4 and lower.\n";
for(std::map<cmStdString, cmStdString>::const_iterator
i = libDepsOld.begin();
@@ -188,7 +192,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
{
if(!i->second.empty())
{
- fout << " SET(\"" << i->first << "\" \"" << i->second << "\")\n";
+ fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n";
}
}
for(std::map<cmStdString, cmStdString>::const_iterator i = libTypes.begin();
@@ -196,9 +200,9 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
{
if(i->second != "general")
{
- fout << " SET(\"" << i->first << "\" \"" << i->second << "\")\n";
+ fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n";
}
}
- fout << "ENDIF(" << vertest << ")\n";
+ fout << "endif()\n";
return;
}