summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-17 14:00:43 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-17 14:00:43 (GMT)
commitb16f26f5f9cd033e24bbf398faf32369d7305bd7 (patch)
tree8502bd90002024b356d85ce8d3920c0fd65db118 /Source/cmNinjaTargetGenerator.cxx
parent41b82db6855a26d01e1000b59da1792b954b326a (diff)
parent6c9dd0ec7b1e000b0bedd567fa52074671d639c9 (diff)
downloadCMake-b16f26f5f9cd033e24bbf398faf32369d7305bd7.zip
CMake-b16f26f5f9cd033e24bbf398faf32369d7305bd7.tar.gz
CMake-b16f26f5f9cd033e24bbf398faf32369d7305bd7.tar.bz2
Merge topic 'target-objects-refactor'
6c9dd0ec cmGlobalGenerator: Make ComputeTargetObjects non-virtual c481fadc cmGeneratorTarget: Don't store ObjectSources for object libraries. f6da0440 cmLocalGenerator: Add ComputeObjectFilenames interface. 9ad804ac cmGeneratorTarget: Constify cmSourceFile* in containers. c725bb3c Constify some APIs in generators. dcfcd23e cmGeneratorTarget: Make GetSourceDepends const. 04cf50ff cmOSXBundleGenerator: Make MacOSXContentGeneratorType arg const. 6132d979 cmGeneratorTarget: Constify the AddExplicitObjectName API. bc512211 cmGeneratorTarget: Constify the AddObject API. cd43433d cmGlobalGenerator: Extract a ComputeTargetObjectDirectory interface. d5b2e33b Makefiles: Compute local object files on demand.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index ed3782c..4319f3c 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -126,7 +126,7 @@ void cmNinjaTargetGenerator::AddFeatureFlags(std::string& flags,
// void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
// Refactor it.
std::string
-cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source,
+cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile const* source,
const std::string& language)
{
// TODO: Fortran support.
@@ -211,7 +211,7 @@ bool cmNinjaTargetGenerator::needsDepFile(const std::string& lang)
// void cmMakefileTargetGenerator::WriteTargetLanguageFlags().
std::string
cmNinjaTargetGenerator::
-ComputeDefines(cmSourceFile *source, const std::string& language)
+ComputeDefines(cmSourceFile const* source, const std::string& language)
{
std::set<std::string> defines;
@@ -269,14 +269,14 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
std::string
cmNinjaTargetGenerator
-::GetSourceFilePath(cmSourceFile* source) const
+::GetSourceFilePath(cmSourceFile const* source) const
{
return ConvertToNinjaPath(source->GetFullPath().c_str());
}
std::string
cmNinjaTargetGenerator
-::GetObjectFilePath(cmSourceFile* source) const
+::GetObjectFilePath(cmSourceFile const* source) const
{
std::string path = this->LocalGenerator->GetHomeRelativeOutputPath();
if(!path.empty())
@@ -480,36 +480,36 @@ cmNinjaTargetGenerator
<< this->GetTargetName()
<< "\n\n";
- std::vector<cmSourceFile*> customCommands;
+ std::vector<cmSourceFile const*> customCommands;
this->GeneratorTarget->GetCustomCommands(customCommands);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = customCommands.begin();
si != customCommands.end(); ++si)
{
cmCustomCommand const* cc = (*si)->GetCustomCommand();
this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
}
- std::vector<cmSourceFile*> headerSources;
+ std::vector<cmSourceFile const*> headerSources;
this->GeneratorTarget->GetHeaderSources(headerSources);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
headerSources,
this->MacOSXContentGenerator);
- std::vector<cmSourceFile*> extraSources;
+ std::vector<cmSourceFile const*> extraSources;
this->GeneratorTarget->GetExtraSources(extraSources);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
extraSources,
this->MacOSXContentGenerator);
- std::vector<cmSourceFile*> externalObjects;
+ std::vector<cmSourceFile const*> externalObjects;
this->GeneratorTarget->GetExternalObjects(externalObjects);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = externalObjects.begin();
si != externalObjects.end(); ++si)
{
this->Objects.push_back(this->GetSourceFilePath(*si));
}
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
this->GeneratorTarget->GetObjectSources(objectSources);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin(); si != objectSources.end(); ++si)
{
this->WriteObjectBuildStatement(*si);
@@ -536,7 +536,7 @@ cmNinjaTargetGenerator
void
cmNinjaTargetGenerator
-::WriteObjectBuildStatement(cmSourceFile* source)
+::WriteObjectBuildStatement(cmSourceFile const* source)
{
std::string comment;
const std::string language = source->GetLanguage();
@@ -570,9 +570,9 @@ cmNinjaTargetGenerator
}
// Add order-only dependencies on custom command outputs.
- std::vector<cmSourceFile*> customCommands;
+ std::vector<cmSourceFile const*> customCommands;
this->GeneratorTarget->GetCustomCommands(customCommands);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = customCommands.begin();
si != customCommands.end(); ++si)
{
@@ -733,7 +733,7 @@ cmNinjaTargetGenerator
//----------------------------------------------------------------------------
void
cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()(
- cmSourceFile& source, const char* pkgloc)
+ cmSourceFile const& source, const char* pkgloc)
{
// Skip OS X content when not building a Framework or Bundle.
if(!this->Generator->GetTarget()->IsBundleOnApple())