summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-07 22:21:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-14 22:41:39 (GMT)
commiteac15298a80b814e9d5fd0077a8c5bbcbd05a8c6 (patch)
tree459a8a5cdf05e1ea7a2e767699df59b9218ff5ca /Source/cmVisualStudio10TargetGenerator.cxx
parent482b3811e4e6043c71632b560f2e773289eeb320 (diff)
downloadCMake-eac15298a80b814e9d5fd0077a8c5bbcbd05a8c6.zip
CMake-eac15298a80b814e9d5fd0077a8c5bbcbd05a8c6.tar.gz
CMake-eac15298a80b814e9d5fd0077a8c5bbcbd05a8c6.tar.bz2
cmState: Move TargetType enum from cmTarget.
Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx104
1 files changed, 52 insertions, 52 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index bfab4b9..1b62821 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -269,7 +269,7 @@ void cmVisualStudio10TargetGenerator::WriteString(const char* line,
void cmVisualStudio10TargetGenerator::Generate()
{
// do not generate external ms projects
- if(this->GeneratorTarget->GetType() == cmTarget::INTERFACE_LIBRARY
+ if(this->GeneratorTarget->GetType() == cmState::INTERFACE_LIBRARY
|| this->Target->GetProperty("EXTERNAL_MSPROJECT"))
{
return;
@@ -278,7 +278,7 @@ void cmVisualStudio10TargetGenerator::Generate()
this->Target->SetProperty("GENERATOR_FILE_NAME",this->Name.c_str());
this->Target->SetProperty("GENERATOR_FILE_NAME_EXT",
".vcxproj");
- if(this->GeneratorTarget->GetType() <= cmTarget::OBJECT_LIBRARY)
+ if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
{
if(!this->ComputeClOptions())
{
@@ -361,7 +361,7 @@ void cmVisualStudio10TargetGenerator::Generate()
(*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGUID>\n";
if(this->MSTools
- && this->GeneratorTarget->GetType() <= cmTarget::GLOBAL_TARGET)
+ && this->GeneratorTarget->GetType() <= cmState::GLOBAL_TARGET)
{
this->WriteApplicationTypeSettings();
this->VerifyNecessaryFiles();
@@ -669,15 +669,15 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
std::string configType = "<ConfigurationType>";
switch(this->GeneratorTarget->GetType())
{
- case cmTarget::SHARED_LIBRARY:
- case cmTarget::MODULE_LIBRARY:
+ case cmState::SHARED_LIBRARY:
+ case cmState::MODULE_LIBRARY:
configType += "DynamicLibrary";
break;
- case cmTarget::OBJECT_LIBRARY:
- case cmTarget::STATIC_LIBRARY:
+ case cmState::OBJECT_LIBRARY:
+ case cmState::STATIC_LIBRARY:
configType += "StaticLibrary";
break;
- case cmTarget::EXECUTABLE:
+ case cmState::EXECUTABLE:
if(this->NsightTegra &&
!this->Target->GetPropertyAsBool("ANDROID_GUI"))
{
@@ -689,8 +689,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
configType += "Application";
}
break;
- case cmTarget::UTILITY:
- case cmTarget::GLOBAL_TARGET:
+ case cmState::UTILITY:
+ case cmState::GLOBAL_TARGET:
if(this->NsightTegra)
{
// Tegra-Android platform does not understand "Utility".
@@ -701,8 +701,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
configType += "Utility";
}
break;
- case cmTarget::UNKNOWN_LIBRARY:
- case cmTarget::INTERFACE_LIBRARY:
+ case cmState::UNKNOWN_LIBRARY:
+ case cmState::INTERFACE_LIBRARY:
break;
}
configType += "</ConfigurationType>\n";
@@ -744,7 +744,7 @@ void cmVisualStudio10TargetGenerator
mfcLine += useOfMfcValue + "</UseOfMfc>\n";
this->WriteString(mfcLine.c_str(), 2);
- if((this->GeneratorTarget->GetType() <= cmTarget::OBJECT_LIBRARY &&
+ if((this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY &&
this->ClOptions[config]->UsingUnicode()) ||
this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
this->GlobalGenerator->TargetsWindowsPhone() ||
@@ -753,7 +753,7 @@ void cmVisualStudio10TargetGenerator
{
this->WriteString("<CharacterSet>Unicode</CharacterSet>\n", 2);
}
- else if (this->GeneratorTarget->GetType() <= cmTarget::MODULE_LIBRARY &&
+ else if (this->GeneratorTarget->GetType() <= cmState::MODULE_LIBRARY &&
this->ClOptions[config]->UsingSBCS())
{
this->WriteString("<CharacterSet>NotSet</CharacterSet>\n", 2);
@@ -1481,7 +1481,7 @@ void cmVisualStudio10TargetGenerator::WriteSources(
void cmVisualStudio10TargetGenerator::WriteAllSources()
{
- if(this->GeneratorTarget->GetType() > cmTarget::UTILITY)
+ if(this->GeneratorTarget->GetType() > cmState::UTILITY)
{
return;
}
@@ -1743,9 +1743,9 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
{
- cmTarget::TargetType ttype =
- (cmTarget::TargetType)this->GeneratorTarget->GetType();
- if(ttype > cmTarget::GLOBAL_TARGET)
+ cmState::TargetType ttype =
+ (cmState::TargetType)this->GeneratorTarget->GetType();
+ if(ttype > cmState::GLOBAL_TARGET)
{
return;
}
@@ -1757,7 +1757,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
config = this->Configurations.begin();
config != this->Configurations.end(); ++config)
{
- if(ttype >= cmTarget::UTILITY)
+ if(ttype >= cmState::UTILITY)
{
this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
*this->BuildFileStream
@@ -1773,7 +1773,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
intermediateDir += "/";
std::string outDir;
std::string targetNameFull;
- if(ttype == cmTarget::OBJECT_LIBRARY)
+ if(ttype == cmState::OBJECT_LIBRARY)
{
outDir = intermediateDir;
targetNameFull = this->Target->GetName();
@@ -1829,8 +1829,8 @@ OutputLinkIncremental(std::string const& configName)
}
// static libraries and things greater than modules do not need
// to set this option
- if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY
- || this->GeneratorTarget->GetType() > cmTarget::MODULE_LIBRARY)
+ if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY
+ || this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY)
{
return;
}
@@ -1968,8 +1968,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
{
clOptions.AddFlag("CompileAsWinRT", "true");
// For WinRT components, add the _WINRT_DLL define to produce a lib
- if (this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY ||
- this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY )
+ if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
+ this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY )
{
clOptions.AddDefine("_WINRT_DLL");
}
@@ -2177,8 +2177,8 @@ WriteMasmOptions(std::string const& configName,
void
cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
{
- if(this->GeneratorTarget->GetType() != cmTarget::STATIC_LIBRARY &&
- this->GeneratorTarget->GetType() != cmTarget::OBJECT_LIBRARY)
+ if(this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY &&
+ this->GeneratorTarget->GetType() != cmState::OBJECT_LIBRARY)
{
return;
}
@@ -2214,9 +2214,9 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
void cmVisualStudio10TargetGenerator::WriteManifestOptions(
std::string const& config)
{
- if (this->GeneratorTarget->GetType() != cmTarget::EXECUTABLE &&
- this->GeneratorTarget->GetType() != cmTarget::SHARED_LIBRARY &&
- this->GeneratorTarget->GetType() != cmTarget::MODULE_LIBRARY)
+ if (this->GeneratorTarget->GetType() != cmState::EXECUTABLE &&
+ this->GeneratorTarget->GetType() != cmState::SHARED_LIBRARY &&
+ this->GeneratorTarget->GetType() != cmState::MODULE_LIBRARY)
{
return;
}
@@ -2382,9 +2382,9 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
//----------------------------------------------------------------------------
bool cmVisualStudio10TargetGenerator::ComputeLinkOptions()
{
- if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE ||
- this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY ||
- this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY)
+ if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE ||
+ this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
+ this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
{
for(std::vector<std::string>::const_iterator
i = this->Configurations.begin();
@@ -2421,11 +2421,11 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
std::string CONFIG = cmSystemTools::UpperCase(config);
const char* linkType = "SHARED";
- if(this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY)
+ if(this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
{
linkType = "MODULE";
}
- if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
+ if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
{
linkType = "EXE";
}
@@ -2508,7 +2508,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
std::string targetNameFull;
std::string targetNameImport;
std::string targetNamePDB;
- if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
+ if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
{
this->GeneratorTarget->GetExecutableNames(targetName, targetNameFull,
targetNameImport, targetNamePDB,
@@ -2531,7 +2531,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
if (this->GlobalGenerator->TargetsWindowsCE())
{
linkOptions.AddFlag("SubSystem", "WindowsCE");
- if (this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
+ if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
{
if (this->ClOptions[config]->UsingUnicode())
{
@@ -2553,7 +2553,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
if (this->GlobalGenerator->TargetsWindowsCE())
{
linkOptions.AddFlag("SubSystem", "WindowsCE");
- if (this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
+ if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
{
if (this->ClOptions[config]->UsingUnicode())
{
@@ -2599,7 +2599,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
// A Windows Runtime component uses internal .NET metadata,
// so does not have an import library.
if(this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") &&
- this->GeneratorTarget->GetType() != cmTarget::EXECUTABLE)
+ this->GeneratorTarget->GetType() != cmState::EXECUTABLE)
{
linkOptions.AddFlag("GenerateWindowsMetadata", "true");
}
@@ -2637,7 +2637,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
"%(IgnoreSpecificDefaultLibraries)");
}
- if (this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY &&
+ if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY &&
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
@@ -2654,8 +2654,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
void
cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& config)
{
- if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY
- || this->GeneratorTarget->GetType() > cmTarget::MODULE_LIBRARY)
+ if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY
+ || this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY)
{
return;
}
@@ -2693,7 +2693,7 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
libVec.push_back(path);
}
else if (!l->Target
- || l->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
+ || l->Target->GetType() != cmState::INTERFACE_LIBRARY)
{
libVec.push_back(l->Value);
}
@@ -2765,7 +2765,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
this->WritePlatformConfigTag("ItemDefinitionGroup", i->c_str(), 1);
*this->BuildFileStream << "\n";
// output cl compile flags <ClCompile></ClCompile>
- if(this->GeneratorTarget->GetType() <= cmTarget::OBJECT_LIBRARY)
+ if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
{
this->WriteClOptions(*i, includes);
// output rc compile flags <ResourceCompile></ResourceCompile>
@@ -2783,7 +2783,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
// output manifest flags <Manifest></Manifest>
this->WriteManifestOptions(*i);
if(this->NsightTegra &&
- this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE &&
+ this->GeneratorTarget->GetType() == cmState::EXECUTABLE &&
this->Target->GetPropertyAsBool("ANDROID_GUI"))
{
this->WriteAntBuildOptions(*i);
@@ -2796,7 +2796,7 @@ void
cmVisualStudio10TargetGenerator::WriteEvents(std::string const& configName)
{
bool addedPrelink = false;
- if (this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY &&
+ if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY &&
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
@@ -2868,7 +2868,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
i != depends.end(); ++i)
{
cmTarget const* dt = (*i)->Target;
- if(dt->GetType() == cmTarget::INTERFACE_LIBRARY)
+ if(dt->GetType() == cmState::INTERFACE_LIBRARY)
{
continue;
}
@@ -3004,7 +3004,7 @@ void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile()
{
if((this->GlobalGenerator->TargetsWindowsStore() ||
this->GlobalGenerator->TargetsWindowsPhone())
- && (cmTarget::EXECUTABLE == this->GeneratorTarget->GetType()))
+ && (cmState::EXECUTABLE == this->GeneratorTarget->GetType()))
{
std::string pfxFile;
std::vector<cmSourceFile const*> certificates;
@@ -3133,7 +3133,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
this->WriteString("<MinimumVisualStudioVersion>14.0"
"</MinimumVisualStudioVersion>\n", 2);
- if(this->GeneratorTarget->GetType() < cmTarget::UTILITY)
+ if(this->GeneratorTarget->GetType() < cmState::UTILITY)
{
isAppContainer = true;
}
@@ -3147,7 +3147,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
this->WriteString("<MinimumVisualStudioVersion>12.0"
"</MinimumVisualStudioVersion>\n", 2);
- if (this->GeneratorTarget->GetType() < cmTarget::UTILITY)
+ if (this->GeneratorTarget->GetType() < cmState::UTILITY)
{
isAppContainer = true;
}
@@ -3162,12 +3162,12 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
"</MinimumVisualStudioVersion>\n", 2);
if (isWindowsStore
- && this->GeneratorTarget->GetType() < cmTarget::UTILITY)
+ && this->GeneratorTarget->GetType() < cmState::UTILITY)
{
isAppContainer = true;
}
else if (isWindowsPhone &&
- this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
+ this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
{
this->WriteString("<XapOutputs>true</XapOutputs>\n", 2);
this->WriteString("<XapFilename>", 2);
@@ -3224,7 +3224,7 @@ void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles()
{
// For Windows and Windows Phone executables, we will assume that if a
// manifest is not present that we need to add all the necessary files
- if (this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
+ if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
{
std::vector<cmSourceFile const*> manifestSources;
this->GeneratorTarget->GetAppManifest(manifestSources, "");