summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-02-24 21:20:44 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-02-24 21:20:44 (GMT)
commit07d0e776ad97d715b7ffa8484fc1da2deb9694dc (patch)
tree1fe319813f7a39799a93a3ac13a5f42d1906f93a /Source
parent586a9427d3dd8b4a99f7a3d545814f8b9bf42453 (diff)
downloadCMake-07d0e776ad97d715b7ffa8484fc1da2deb9694dc.zip
CMake-07d0e776ad97d715b7ffa8484fc1da2deb9694dc.tar.gz
CMake-07d0e776ad97d715b7ffa8484fc1da2deb9694dc.tar.bz2
BUG: More fixing of support for global target son visual studio
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx53
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx19
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx10
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx13
5 files changed, 53 insertions, 45 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 8ddd654..f720b1f 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -169,23 +169,6 @@ void cmGlobalVisualStudio6Generator::Generate()
gen[0]->GetMakefile()->
AddUtilityCommand("ALL_BUILD", false, no_output, no_depends, no_working_dir,
"echo", "Build all projects");
- std::string cmake_command =
- m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
- gen[0]->GetMakefile()->
- AddUtilityCommand("INSTALL", false, no_output, no_depends, no_working_dir,
- cmake_command.c_str(),
- "-DBUILD_TYPE=$(IntDir)", "-P", "cmake_install.cmake");
-
- // Make the INSTALL target depend on ALL_BUILD unless the
- // project says to not do so.
- const char* noall =
- gen[0]->GetMakefile()
- ->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
- if(!noall || cmSystemTools::IsOff(noall))
- {
- cmTarget* install = gen[0]->GetMakefile()->FindTarget("INSTALL");
- install->AddUtility("ALL_BUILD");
- }
}
}
@@ -215,6 +198,9 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
bool doneAllBuild = false;
bool doneRunTests = false;
bool doneInstall = false;
+ bool doneEditCache = false;
+ bool doneRebuildCache = false;
+ bool donePackage = false;
for(i = 0; i < generators.size(); ++i)
{
@@ -322,6 +308,39 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
doneRunTests = true;
}
}
+ if(l->first == "EDIT_CACHE")
+ {
+ if(doneEditCache)
+ {
+ skip = true;
+ }
+ else
+ {
+ doneEditCache = true;
+ }
+ }
+ if(l->first == "REBUILD_CACHE")
+ {
+ if(doneRebuildCache)
+ {
+ skip = true;
+ }
+ else
+ {
+ doneRebuildCache = true;
+ }
+ }
+ if(l->first == "PACKAGE")
+ {
+ if(donePackage)
+ {
+ skip = true;
+ }
+ else
+ {
+ donePackage = true;
+ }
+ }
if(!skip)
{
this->WriteProject(fout, si->c_str(), dir.c_str(),l->second);
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index ad31d5a..72ce42d 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -107,7 +107,8 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout,
{
if (al->second.IsInAll())
{
- if (al->second.GetType() == cmTarget::UTILITY)
+ if (al->second.GetType() == cmTarget::UTILITY &&
+ al->second.GetType() == cmTarget::GLOBAL_TARGET)
{
l->second.AddUtility(al->first.c_str());
}
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 9fcedac..6d689f6 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -205,22 +205,6 @@ void cmGlobalVisualStudio7Generator::Generate()
"echo", "Build all projects");
std::string cmake_command =
m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
- gen[0]->GetMakefile()->
- AddUtilityCommand("INSTALL", false, no_output, no_depends,
- no_working_dir,
- cmake_command.c_str(),
- "-DBUILD_TYPE=$(OutDir)", "-P", "cmake_install.cmake");
-
- // Make the INSTALL target depend on ALL_BUILD unless the
- // project says to not do so.
- const char* noall =
- gen[0]->GetMakefile()
- ->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
- if(!noall || cmSystemTools::IsOff(noall))
- {
- cmTarget* install = gen[0]->GetMakefile()->FindTarget("INSTALL");
- install->AddUtility("ALL_BUILD");
- }
}
}
@@ -331,7 +315,8 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
{
if (al->second.IsInAll())
{
- if (al->second.GetType() == cmTarget::UTILITY)
+ if (al->second.GetType() == cmTarget::UTILITY &&
+ al->second.GetType() == cmTarget::GLOBAL_TARGET)
{
l->second.AddUtility(al->first.c_str());
}
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 804a87c..d7533b9 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -183,6 +183,7 @@ void cmLocalVisualStudio6Generator::OutputDSPFile()
this->SetBuildType(EXECUTABLE,l->first.c_str(), l->second);
break;
case cmTarget::UTILITY:
+ case cmTarget::GLOBAL_TARGET:
this->SetBuildType(UTILITY, l->first.c_str(), l->second);
break;
case cmTarget::INSTALL_FILES:
@@ -309,7 +310,8 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
// special care for dependencies. The first rule must depend on all
// the dependencies of all the rules. The later rules must each
// depend only on the previous rule.
- if (target.GetType() == cmTarget::UTILITY &&
+ if ((target.GetType() == cmTarget::UTILITY ||
+ target.GetType() == cmTarget::GLOBAL_TARGET) &&
(!target.GetPreBuildCommands().empty() ||
!target.GetPostBuildCommands().empty()))
{
@@ -453,7 +455,8 @@ void cmLocalVisualStudio6Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
{
cmSystemTools::ExpandListArgument(dependsValue, depends);
}
- if (source != libName || target.GetType() == cmTarget::UTILITY)
+ if (source != libName || target.GetType() == cmTarget::UTILITY
+ || target.GetType() == cmTarget::GLOBAL_TARGET)
{
fout << "# Begin Source File\n\n";
@@ -718,7 +721,8 @@ cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target,
{
std::string customRuleCode = "";
- if (target.GetType() >= cmTarget::UTILITY)
+ if (target.GetType() >= cmTarget::UTILITY ||
+ target.GetType() >= cmTarget::GLOBAL_TARGET)
{
return customRuleCode;
}
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 7d76391..ac55eac 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -162,11 +162,6 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)
&& (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(), "EDIT_CACHE") != 0)
- && (strcmp(l->first.c_str(), "REBUILD_CACHE") != 0)
- && (strcmp(l->first.c_str(), "PACKAGE") != 0)
- && (strcmp(l->first.c_str(), "INSTALL") != 0)
&& (strcmp(l->first.c_str(), CMAKE_CHECK_BUILD_SYSTEM_TARGET) != 0))
{
cmTarget& target = l->second;
@@ -435,6 +430,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
configType = "1";
break;
case cmTarget::UTILITY:
+ case cmTarget::GLOBAL_TARGET:
configType = "10";
default:
break;
@@ -859,6 +855,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
break;
}
case cmTarget::UTILITY:
+ case cmTarget::GLOBAL_TARGET:
break;
}
}
@@ -1070,7 +1067,8 @@ void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
}
}
}
- if (source != libName || target.GetType() == cmTarget::UTILITY)
+ if (source != libName || target.GetType() == cmTarget::UTILITY ||
+ target.GetType() == cmTarget::GLOBAL_TARGET )
{
fout << "\t\t\t<File\n";
std::string d = this->ConvertToXMLOutputPathSingle(source.c_str());
@@ -1222,7 +1220,8 @@ void cmLocalVisualStudio7Generator::OutputTargetRules(std::ostream& fout,
cmTarget &target,
const char * /*libName*/)
{
- if (target.GetType() > cmTarget::UTILITY)
+ if (target.GetType() > cmTarget::UTILITY ||
+ target.GetType() > cmTarget::GLOBAL_TARGET)
{
return;
}