mirror of
https://github.com/reactos/CMake.git
synced 2025-01-31 17:12:49 +00:00
BUG: Fixed generation of cmake re-run rules.
This commit is contained in:
parent
e666b8e825
commit
1b5e3f4136
@ -85,6 +85,15 @@ void cmLocalVisualStudio6Generator::OutputDSPFile()
|
|||||||
for(cmTargets::iterator l = tgts.begin();
|
for(cmTargets::iterator l = tgts.begin();
|
||||||
l != tgts.end(); l++)
|
l != tgts.end(); l++)
|
||||||
{
|
{
|
||||||
|
// Add a rule to regenerate the build system when the target
|
||||||
|
// specification source changes.
|
||||||
|
const char* suppRegenRule =
|
||||||
|
m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
|
||||||
|
if (!cmSystemTools::IsOn(suppRegenRule))
|
||||||
|
{
|
||||||
|
this->AddDSPBuildRule(l->second);
|
||||||
|
}
|
||||||
|
|
||||||
// INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace
|
// INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace
|
||||||
// so don't build a projectfile for it
|
// so don't build a projectfile for it
|
||||||
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
|
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
|
||||||
@ -210,9 +219,9 @@ void cmLocalVisualStudio6Generator::CreateSingleDSP(const char *lname, cmTarget
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cmLocalVisualStudio6Generator::AddDSPBuildRule()
|
void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
|
||||||
{
|
{
|
||||||
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
std::string dspname = tgt.GetName();
|
||||||
dspname += ".dsp.cmake";
|
dspname += ".dsp.cmake";
|
||||||
const char* dsprule = m_Makefile->GetRequiredDefinition("CMAKE_COMMAND");
|
const char* dsprule = m_Makefile->GetRequiredDefinition("CMAKE_COMMAND");
|
||||||
cmCustomCommandLine commandLine;
|
cmCustomCommandLine commandLine;
|
||||||
@ -262,14 +271,6 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
|
|||||||
const char *libName,
|
const char *libName,
|
||||||
cmTarget &target)
|
cmTarget &target)
|
||||||
{
|
{
|
||||||
// if we should add regen rule then...
|
|
||||||
const char *suppRegenRule =
|
|
||||||
m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
|
|
||||||
if (!cmSystemTools::IsOn(suppRegenRule))
|
|
||||||
{
|
|
||||||
this->AddDSPBuildRule();
|
|
||||||
}
|
|
||||||
|
|
||||||
// For utility targets need custom command since pre- and post-
|
// For utility targets need custom command since pre- and post-
|
||||||
// build does not do anything in Visual Studio 6. In order for the
|
// build does not do anything in Visual Studio 6. In order for the
|
||||||
// rules to run in the correct order as custom commands, we need
|
// rules to run in the correct order as custom commands, we need
|
||||||
|
@ -79,7 +79,7 @@ private:
|
|||||||
cmTarget &tgt, std::vector<cmSourceGroup> &sgs);
|
cmTarget &tgt, std::vector<cmSourceGroup> &sgs);
|
||||||
|
|
||||||
void WriteDSPFooter(std::ostream& fout);
|
void WriteDSPFooter(std::ostream& fout);
|
||||||
void AddDSPBuildRule();
|
void AddDSPBuildRule(cmTarget& tgt);
|
||||||
void WriteCustomRule(std::ostream& fout,
|
void WriteCustomRule(std::ostream& fout,
|
||||||
const char* source,
|
const char* source,
|
||||||
const char* command,
|
const char* command,
|
||||||
|
@ -101,6 +101,16 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
|
|||||||
for(cmTargets::iterator l = tgts.begin();
|
for(cmTargets::iterator l = tgts.begin();
|
||||||
l != tgts.end(); l++)
|
l != tgts.end(); l++)
|
||||||
{
|
{
|
||||||
|
// Add a rule to regenerate the build system when the target
|
||||||
|
// specification source changes.
|
||||||
|
const char* suppRegenRule =
|
||||||
|
m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
|
||||||
|
if (!cmSystemTools::IsOn(suppRegenRule) &&
|
||||||
|
(strcmp(l->first.c_str(), CMAKE_CHECK_BUILD_SYSTEM_TARGET) != 0))
|
||||||
|
{
|
||||||
|
this->AddVCProjBuildRule(l->second);
|
||||||
|
}
|
||||||
|
|
||||||
// INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace
|
// INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace
|
||||||
// so don't build a projectfile for it
|
// so don't build a projectfile for it
|
||||||
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
|
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
|
||||||
@ -213,9 +223,9 @@ void cmLocalVisualStudio7Generator::CreateSingleVCProj(const char *lname, cmTarg
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cmLocalVisualStudio7Generator::AddVCProjBuildRule()
|
void cmLocalVisualStudio7Generator::AddVCProjBuildRule(cmTarget& tgt)
|
||||||
{
|
{
|
||||||
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
std::string dspname = tgt.GetName();
|
||||||
dspname += ".vcproj.cmake";
|
dspname += ".vcproj.cmake";
|
||||||
const char* dsprule = m_Makefile->GetRequiredDefinition("CMAKE_COMMAND");
|
const char* dsprule = m_Makefile->GetRequiredDefinition("CMAKE_COMMAND");
|
||||||
cmCustomCommandLine commandLine;
|
cmCustomCommandLine commandLine;
|
||||||
@ -970,15 +980,6 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
|
|||||||
static_cast<cmGlobalVisualStudio7Generator *>
|
static_cast<cmGlobalVisualStudio7Generator *>
|
||||||
(m_GlobalGenerator)->GetConfigurations();
|
(m_GlobalGenerator)->GetConfigurations();
|
||||||
|
|
||||||
// if we should add regen rule then...
|
|
||||||
const char *suppRegenRule =
|
|
||||||
m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
|
|
||||||
if (!cmSystemTools::IsOn(suppRegenRule) &&
|
|
||||||
(strcmp(libName, CMAKE_CHECK_BUILD_SYSTEM_TARGET) != 0))
|
|
||||||
{
|
|
||||||
this->AddVCProjBuildRule();
|
|
||||||
}
|
|
||||||
|
|
||||||
// trace the visual studio dependencies
|
// trace the visual studio dependencies
|
||||||
std::string name = libName;
|
std::string name = libName;
|
||||||
name += ".vcproj.cmake";
|
name += ".vcproj.cmake";
|
||||||
|
@ -76,7 +76,7 @@ private:
|
|||||||
void CreateSingleVCProj(const char *lname, cmTarget &tgt);
|
void CreateSingleVCProj(const char *lname, cmTarget &tgt);
|
||||||
void WriteVCProjFile(std::ostream& fout, const char *libName,
|
void WriteVCProjFile(std::ostream& fout, const char *libName,
|
||||||
cmTarget &tgt);
|
cmTarget &tgt);
|
||||||
void AddVCProjBuildRule();
|
void AddVCProjBuildRule(cmTarget& tgt);
|
||||||
void WriteConfigurations(std::ostream& fout,
|
void WriteConfigurations(std::ostream& fout,
|
||||||
const char *libName, cmTarget &tgt);
|
const char *libName, cmTarget &tgt);
|
||||||
void WriteConfiguration(std::ostream& fout,
|
void WriteConfiguration(std::ostream& fout,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user