mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 22:31:18 -05:00
BUG: Avoid adding unused rules to special targets like ALL_BUILD. Make sure project regeneration rules go only in desired targets.
This commit is contained in:
@@ -160,7 +160,11 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
|
||||
{
|
||||
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
|
||||
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)
|
||||
&& (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0))
|
||||
&& (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0)
|
||||
&& (strcmp(l->first.c_str(), "ALL_BUILD") != 0)
|
||||
&& (strcmp(l->first.c_str(), "RUN_TESTS") != 0)
|
||||
&& (strcmp(l->first.c_str(), "INSTALL") != 0)
|
||||
&& (strcmp(l->first.c_str(), CMAKE_CHECK_BUILD_SYSTEM_TARGET) != 0))
|
||||
{
|
||||
cmTarget& target = l->second;
|
||||
bool sameAsTarget = false;
|
||||
@@ -268,6 +272,14 @@ void cmLocalVisualStudio7Generator::AddVCProjBuildRule(cmTarget& tgt)
|
||||
const char* no_comment = 0;
|
||||
m_Makefile->AddCustomCommandToOutput(dspname.c_str(), listFiles, makefileIn.c_str(),
|
||||
commandLines, no_comment, no_working_directory, true);
|
||||
if(cmSourceFile* file = m_Makefile->GetSource(makefileIn.c_str()))
|
||||
{
|
||||
tgt.GetSourceFiles().push_back(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmSystemTools::Error("Error adding rule for ", makefileIn.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user