summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-11 12:47:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-08-11 12:47:10 (GMT)
commit9e5114764637236849f62f4a82b525d5931b256e (patch)
treecda6f50f00c527a4b6156a2cd4dffae2f2d879ae /Source/cmGeneratorTarget.cxx
parent6e5953e9a441068f753e79f68af176ac34486234 (diff)
parent6d8a125e4988d5cb269b3d1e29a6114ecd0c47a4 (diff)
downloadCMake-9e5114764637236849f62f4a82b525d5931b256e.zip
CMake-9e5114764637236849f62f4a82b525d5931b256e.tar.gz
CMake-9e5114764637236849f62f4a82b525d5931b256e.tar.bz2
Merge topic 'global-generator-makefiles'
6d8a125e cmQtAutoGenerators: Prefer a generator to access global generator. 5f66900e cmGlobalGenerator: Port Find API to cmMakefile. c5b8841f cmGlobalGenerator: Create global targets from cmMakefiles. 8f75ea3b cmGlobalGenerator: Port global target creation to cmMakefile. 56f0540b cmGlobalGenerator: Port Configure-time check to cmMakefile. 19b546ef cmGlobalGenerator: Base final target property computation on Makefiles. f8be9ba9 cmGlobalGenerator: Base progress on Makefiles, not LocalGenerators. bc1097e3 cmExportLibraryDependenciesCommand: Port to cmMakefile. 204aecdf cmGlobalGenerator: Port configure-time code to cmMakefile. 3dd6f0a5 cmake: Port configure-time code to cmMakefile. 73e4df99 cmGlobalGenerator: Store a container of cmMakefiles. 19369937 cmGeneratorTarget: Port internal type to cmGeneratorTarget. 32f131b0 cmGeneratorTarget: Prefer the local generator to access the global.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 76bc426..299c112 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -36,7 +36,7 @@
//----------------------------------------------------------------------------
void reportBadObjLib(std::vector<cmSourceFile*> const& badObjLib,
- cmTarget *target, cmake *cm)
+ cmGeneratorTarget const* target, cmake *cm)
{
if(!badObjLib.empty())
{
@@ -50,7 +50,7 @@ void reportBadObjLib(std::vector<cmSourceFile*> const& badObjLib,
e << "but may contain only sources that compile, header files, and "
"other files that would not affect linking of a normal library.";
cm->IssueMessage(cmake::FATAL_ERROR, e.str(),
- target->GetBacktrace());
+ target->Target->GetBacktrace());
}
}
@@ -133,14 +133,14 @@ struct TagVisitor
{
DataType& Data;
std::vector<cmSourceFile*> BadObjLibFiles;
- cmTarget *Target;
+ cmGeneratorTarget const* Target;
cmGlobalGenerator *GlobalGenerator;
cmsys::RegularExpression Header;
bool IsObjLib;
- TagVisitor(cmTarget *target, DataType& data)
+ TagVisitor(cmGeneratorTarget const* target, DataType& data)
: Data(data), Target(target),
- GlobalGenerator(target->GetMakefile()->GetGlobalGenerator()),
+ GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()),
Header(CM_HEADER_REGEX),
IsObjLib(target->GetType() == cmTarget::OBJECT_LIBRARY)
{
@@ -234,7 +234,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
{
this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = lg;
- this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
+ this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
}
cmGeneratorTarget::~cmGeneratorTarget()
@@ -362,7 +362,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget const* depTgt,
{ \
std::vector<cmSourceFile*> sourceFiles; \
this->Target->GetSourceFiles(sourceFiles, config); \
- TagVisitor<DATA ## Tag DATATYPE> visitor(this->Target, data); \
+ TagVisitor<DATA ## Tag DATATYPE> visitor(this, data); \
for(std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \
si != sourceFiles.end(); ++si) \
{ \
@@ -1557,7 +1557,7 @@ cmTargetTraceDependencies
{
// Convenience.
this->Makefile = this->Target->GetMakefile();
- this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
+ this->GlobalGenerator = target->GetLocalGenerator()->GetGlobalGenerator();
this->CurrentEntry = 0;
// Queue all the source files already specified for the target.
@@ -1945,8 +1945,7 @@ void cmGeneratorTarget::GenerateTargetManifest(
{
return;
}
- cmMakefile* mf = this->Target->GetMakefile();
- cmGlobalGenerator* gg = mf->GetGlobalGenerator();
+ cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
// Get the names.
std::string name;