BUG: fix circular depends on libraries and remove depends for static libraries

This commit is contained in:
Bill Hoffman 2001-02-28 17:50:15 -05:00
parent d0a8794746
commit af30fe6745
6 changed files with 34 additions and 14 deletions

View File

@ -261,6 +261,7 @@ void cmDSPMakefile::WriteDSPEndGroup(std::ostream& fout)
void cmDSPMakefile::SetBuildType(BuildType b) void cmDSPMakefile::SetBuildType(BuildType b)
{ {
m_BuildType = b;
switch(b) switch(b)
{ {
case STATIC_LIBRARY: case STATIC_LIBRARY:

View File

@ -39,6 +39,12 @@ public:
*/ */
void SetBuildType(BuildType); void SetBuildType(BuildType);
BuildType GetBuildType()
{
return m_BuildType;
}
/** /**
* Return array of created DSP names in a STL vector. * Return array of created DSP names in a STL vector.
* Each executable must have its own dsp. * Each executable must have its own dsp.
@ -86,7 +92,7 @@ private:
std::string m_DebugDLLLibraryOptions; std::string m_DebugDLLLibraryOptions;
std::string m_ReleaseDLLLibraryOptions; std::string m_ReleaseDLLLibraryOptions;
cmMakefile* m_Makefile; cmMakefile* m_Makefile;
BuildType m_BuildType;
std::vector<std::string> m_Configurations; std::vector<std::string> m_Configurations;
}; };

View File

@ -261,6 +261,7 @@ void cmDSPMakefile::WriteDSPEndGroup(std::ostream& fout)
void cmDSPMakefile::SetBuildType(BuildType b) void cmDSPMakefile::SetBuildType(BuildType b)
{ {
m_BuildType = b;
switch(b) switch(b)
{ {
case STATIC_LIBRARY: case STATIC_LIBRARY:

View File

@ -39,6 +39,12 @@ public:
*/ */
void SetBuildType(BuildType); void SetBuildType(BuildType);
BuildType GetBuildType()
{
return m_BuildType;
}
/** /**
* Return array of created DSP names in a STL vector. * Return array of created DSP names in a STL vector.
* Each executable must have its own dsp. * Each executable must have its own dsp.
@ -86,7 +92,7 @@ private:
std::string m_DebugDLLLibraryOptions; std::string m_DebugDLLLibraryOptions;
std::string m_ReleaseDLLLibraryOptions; std::string m_ReleaseDLLLibraryOptions;
cmMakefile* m_Makefile; cmMakefile* m_Makefile;
BuildType m_BuildType;
std::vector<std::string> m_Configurations; std::vector<std::string> m_Configurations;
}; };

View File

@ -18,7 +18,7 @@
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cmDSPMakefile.h" #include "cmDSPMakefile.h"
#include "cmMSProjectGenerator.h" #include "cmMSProjectGenerator.h"
#include <windows.h> //#include <windows.h>
cmDSWMakefile::cmDSWMakefile(cmMakefile* m) cmDSWMakefile::cmDSWMakefile(cmMakefile* m)
@ -126,13 +126,16 @@ void cmDSWMakefile::WriteProject(std::ostream& fout,
std::vector<std::string>::iterator i, end; std::vector<std::string>::iterator i, end;
i = project->GetMakefile()->GetLinkLibraries().begin(); i = project->GetMakefile()->GetLinkLibraries().begin();
end = project->GetMakefile()->GetLinkLibraries().end(); end = project->GetMakefile()->GetLinkLibraries().end();
for(;i!= end; ++i) if(project->GetBuildType() != cmDSPMakefile::STATIC_LIBRARY)
{ {
if (strcmp(i->c_str(),dspname)) for(;i!= end; ++i)
{ {
fout << "Begin Project Dependency\n"; if (strcmp(i->c_str(),dspname))
fout << "Project_Dep_Name " << *i << "\n"; {
fout << "End Project Dependency\n"; fout << "Begin Project Dependency\n";
fout << "Project_Dep_Name " << *i << "\n";
fout << "End Project Dependency\n";
}
} }
} }
fout << "}}}\n\n"; fout << "}}}\n\n";

View File

@ -18,7 +18,7 @@
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cmDSPMakefile.h" #include "cmDSPMakefile.h"
#include "cmMSProjectGenerator.h" #include "cmMSProjectGenerator.h"
#include <windows.h> //#include <windows.h>
cmDSWMakefile::cmDSWMakefile(cmMakefile* m) cmDSWMakefile::cmDSWMakefile(cmMakefile* m)
@ -126,13 +126,16 @@ void cmDSWMakefile::WriteProject(std::ostream& fout,
std::vector<std::string>::iterator i, end; std::vector<std::string>::iterator i, end;
i = project->GetMakefile()->GetLinkLibraries().begin(); i = project->GetMakefile()->GetLinkLibraries().begin();
end = project->GetMakefile()->GetLinkLibraries().end(); end = project->GetMakefile()->GetLinkLibraries().end();
for(;i!= end; ++i) if(project->GetBuildType() != cmDSPMakefile::STATIC_LIBRARY)
{ {
if (strcmp(i->c_str(),dspname)) for(;i!= end; ++i)
{ {
fout << "Begin Project Dependency\n"; if (strcmp(i->c_str(),dspname))
fout << "Project_Dep_Name " << *i << "\n"; {
fout << "End Project Dependency\n"; fout << "Begin Project Dependency\n";
fout << "Project_Dep_Name " << *i << "\n";
fout << "End Project Dependency\n";
}
} }
} }
fout << "}}}\n\n"; fout << "}}}\n\n";