[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-557-gb0fc765
Stephen Kelly
steveire at gmail.com
Wed Oct 14 18:34:18 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via b0fc765ebda20e896101790d38a4ba3205412549 (commit)
via 7f5ec9f109dc66bc22ac377a7fb57d9221aed56b (commit)
via 06f56d3bf5d8210d190e1bfcf05673ceb78c5594 (commit)
via c8f8f16541f3ac6af3397f3a78ee68fc963af151 (commit)
via 9f299a1225798f6485ab77c9140bf9c1d589e2fe (commit)
from 0a462a9684f3138b712dc7738f160b479ce08f84 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0fc765ebda20e896101790d38a4ba3205412549
commit b0fc765ebda20e896101790d38a4ba3205412549
Merge: 0a462a9 7f5ec9f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 14 18:34:16 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 14 18:34:16 2015 -0400
Merge topic 'GetTargetDirectory-cmGeneratorTarget' into next
7f5ec9f1 cmLocalGenerator: Port GetTargetDirectory to cmGeneratorTarget.
06f56d3b cmLocalUnixMakefileGenerator3: Port AppendCleanCommand to cmGeneratorTarget.
c8f8f165 cmLocalUnixMakefileGenerator3: Port another API to cmGeneratorTarget.
9f299a12 cmLocalUnixMakefileGenerator3: Port API to cmGenertorTarget.
diff --cc Source/cmExtraCodeBlocksGenerator.cxx
index 5775602,cdb4d8b..3bc76fa
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@@ -352,13 -352,15 +352,15 @@@ void cmExtraCodeBlocksGenerato
this->AppendTarget(fout, ti->first, 0,
make.c_str(), *lg, compiler.c_str());
break;
- case cmTarget::EXECUTABLE:
- case cmTarget::STATIC_LIBRARY:
- case cmTarget::SHARED_LIBRARY:
- case cmTarget::MODULE_LIBRARY:
- case cmTarget::OBJECT_LIBRARY:
+ case cmState::EXECUTABLE:
+ case cmState::STATIC_LIBRARY:
+ case cmState::SHARED_LIBRARY:
+ case cmState::MODULE_LIBRARY:
+ case cmState::OBJECT_LIBRARY:
{
- this->AppendTarget(fout, ti->first, &ti->second,
+ cmGeneratorTarget* gt =
+ this->GlobalGenerator->GetGeneratorTarget(&ti->second);
+ this->AppendTarget(fout, ti->first, gt,
make.c_str(), *lg, compiler.c_str());
std::string fastTarget = ti->first;
fastTarget += "/fast";
@@@ -559,9 -561,9 +561,9 @@@ void cmExtraCodeBlocksGenerator::Append
fout<<" <Target title=\"" << targetName << "\">\n";
if (target!=0)
{
- int cbTargetType = this->GetCBTargetType(target);
+ int cbTargetType = this->GetCBTargetType(target->Target);
std::string workingDir = lg->GetCurrentBinaryDirectory();
- if ( target->GetType()==cmTarget::EXECUTABLE)
+ if ( target->GetType()==cmState::EXECUTABLE)
{
// Determine the directory where the executable target is created, and
// set the working directory to this dir.
diff --cc Source/cmGlobalUnixMakefileGenerator3.cxx
index 4674fcd,a0ad72d..ee31e28
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@@ -428,14 -426,15 +426,15 @@@ void cmGlobalUnixMakefileGenerator
for (cmTargets::iterator l = lg->GetMakefile()->GetTargets().begin();
l != lg->GetMakefile()->GetTargets().end(); l++)
{
- if((l->second.GetType() == cmTarget::EXECUTABLE) ||
- (l->second.GetType() == cmTarget::STATIC_LIBRARY) ||
- (l->second.GetType() == cmTarget::SHARED_LIBRARY) ||
- (l->second.GetType() == cmTarget::MODULE_LIBRARY) ||
- (l->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
- (l->second.GetType() == cmTarget::UTILITY))
+ if((l->second.GetType() == cmState::EXECUTABLE) ||
+ (l->second.GetType() == cmState::STATIC_LIBRARY) ||
+ (l->second.GetType() == cmState::SHARED_LIBRARY) ||
+ (l->second.GetType() == cmState::MODULE_LIBRARY) ||
+ (l->second.GetType() == cmState::OBJECT_LIBRARY) ||
+ (l->second.GetType() == cmState::UTILITY))
{
- std::string tname = lg->GetRelativeTargetDirectory(l->second);
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(&l->second);
+ std::string tname = lg->GetRelativeTargetDirectory(gt);
tname += "/DependInfo.cmake";
cmSystemTools::ConvertToUnixSlashes(tname);
cmakefileStream << " \"" << tname << "\"\n";
diff --cc Source/cmLocalVisualStudio7Generator.cxx
index e891c33,65f42c2..1122919
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@@ -1109,11 -1109,11 +1109,11 @@@ void cmLocalVisualStudio7Generator::Out
}
switch(target.GetType())
{
- case cmTarget::UNKNOWN_LIBRARY:
+ case cmState::UNKNOWN_LIBRARY:
break;
- case cmTarget::OBJECT_LIBRARY:
+ case cmState::OBJECT_LIBRARY:
{
- std::string libpath = this->GetTargetDirectory(target);
+ std::string libpath = this->GetTargetDirectory(gt);
libpath += "/";
libpath += configName;
libpath += "/";
diff --cc Source/cmMakefileLibraryTargetGenerator.cxx
index 0b38656,1278dcd..a0aa10b
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@@ -441,10 -441,10 +441,10 @@@ void cmMakefileLibraryTargetGenerator::
std::vector<std::string> commands1;
// Add a command to remove any existing files for this library.
// for static libs only
- if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
+ if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY)
{
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
- *this->Target, "target");
+ this->GeneratorTarget, "target");
this->LocalGenerator->CreateCDCommand
(commands1,
this->Makefile->GetCurrentBinaryDirectory(),
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f5ec9f109dc66bc22ac377a7fb57d9221aed56b
commit 7f5ec9f109dc66bc22ac377a7fb57d9221aed56b
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 9 22:27:46 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Oct 15 00:33:12 2015 +0200
cmLocalGenerator: Port GetTargetDirectory to cmGeneratorTarget.
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index f901414..06838fd 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -403,7 +403,7 @@ cmCommonTargetGenerator::GetLinkedTargetDirectories() const
cmMakefile* mf = linkee->Target->GetMakefile();
std::string di = mf->GetCurrentBinaryDirectory();
di += "/";
- di += lg->GetTargetDirectory(*linkee->Target);
+ di += lg->GetTargetDirectory(linkee);
dirs.push_back(di);
}
}
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 0406644..cdb4d8b 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -358,11 +358,13 @@ void cmExtraCodeBlocksGenerator
case cmTarget::MODULE_LIBRARY:
case cmTarget::OBJECT_LIBRARY:
{
- this->AppendTarget(fout, ti->first, &ti->second,
+ cmGeneratorTarget* gt =
+ this->GlobalGenerator->GetGeneratorTarget(&ti->second);
+ this->AppendTarget(fout, ti->first, gt,
make.c_str(), *lg, compiler.c_str());
std::string fastTarget = ti->first;
fastTarget += "/fast";
- this->AppendTarget(fout, fastTarget, &ti->second,
+ this->AppendTarget(fout, fastTarget, gt,
make.c_str(), *lg, compiler.c_str());
}
break;
@@ -521,14 +523,14 @@ void cmExtraCodeBlocksGenerator
// Write a dummy file for OBJECT libraries, so C::B can reference some file
std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile(
cmLocalGenerator* lg,
- cmTarget* target) const
+ cmGeneratorTarget* target) const
{
// this file doesn't seem to be used by C::B in custom makefile mode,
// but we generate a unique file for each OBJECT library so in case
// C::B uses it in some way, the targets don't interfere with each other.
std::string filename = lg->GetCurrentBinaryDirectory();
filename += "/";
- filename += lg->GetTargetDirectory(*target);
+ filename += lg->GetTargetDirectory(target);
filename += "/";
filename += target->GetName();
filename += ".objlib";
@@ -547,7 +549,7 @@ std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile(
// Generate the xml code for one target.
void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
const std::string& targetName,
- cmTarget* target,
+ cmGeneratorTarget* target,
const char* make,
const cmLocalGenerator* lg,
const char* compiler)
@@ -559,7 +561,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
fout<<" <Target title=\"" << targetName << "\">\n";
if (target!=0)
{
- int cbTargetType = this->GetCBTargetType(target);
+ int cbTargetType = this->GetCBTargetType(target->Target);
std::string workingDir = lg->GetCurrentBinaryDirectory();
if ( target->GetType()==cmTarget::EXECUTABLE)
{
@@ -591,9 +593,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
}
else
{
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(target);
- location = gt->GetLocation(buildType);
+ location = target->GetLocation(buildType);
}
fout<<" <Option output=\"" << location
@@ -604,12 +604,9 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
" <Option compiler=\"" << compiler << "\" />\n"
" <Compiler>\n";
- cmGeneratorTarget *gtgt = this->GlobalGenerator
- ->GetGeneratorTarget(target);
-
// the compilerdefines for this target
std::vector<std::string> cdefs;
- gtgt->GetCompileDefinitions(cdefs, buildType, "C");
+ target->GetCompileDefinitions(cdefs, buildType, "C");
// Expand the list.
for(std::vector<std::string>::const_iterator di = cdefs.begin();
@@ -623,7 +620,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
std::set<std::string> uniqIncludeDirs;
std::vector<std::string> includes;
- lg->GetIncludeDirectories(includes, gtgt, "C", buildType);
+ lg->GetIncludeDirectories(includes, target, "C", buildType);
uniqIncludeDirs.insert(includes.begin(), includes.end());
diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h
index e5ede9a..f28809a 100644
--- a/Source/cmExtraCodeBlocksGenerator.h
+++ b/Source/cmExtraCodeBlocksGenerator.h
@@ -17,6 +17,7 @@
class cmLocalGenerator;
class cmMakefile;
+class cmGeneratorTarget;
class cmTarget;
class cmGeneratedFileStream;
@@ -49,7 +50,7 @@ private:
void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
const std::string& filename);
std::string CreateDummyTargetFile(cmLocalGenerator* lg,
- cmTarget* target) const;
+ cmGeneratorTarget* target) const;
std::string GetCBCompilerId(const cmMakefile* mf);
int GetCBTargetType(cmTarget* target);
@@ -57,7 +58,7 @@ private:
const std::string& target);
void AppendTarget(cmGeneratedFileStream& fout,
const std::string& targetName,
- cmTarget* target,
+ cmGeneratorTarget* target,
const char* make,
const cmLocalGenerator* lg,
const char* compiler);
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index b7aeb02..44efbfc 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -1100,7 +1100,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
cleanArgs += "\" \"";
cleanArgs += cmSystemTools::GetCMakeCommand();
cleanArgs += "\" -P \"";
- cleanArgs += (*it)->GetTargetDirectory(ti->second);
+ cmGeneratorTarget* gt =
+ this->GlobalGenerator->GetGeneratorTarget(&ti->second);
+ cleanArgs += (*it)->GetTargetDirectory(gt);
cleanArgs += "/cmake_clean.cmake\"";
this->AppendTarget(fout, "Clean", cmSystemTools::GetCMakeCommand(),
cleanArgs, virtDir, "", "");
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 32e6077..de640a4 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -717,13 +717,11 @@ std::string cmGlobalNinjaGenerator::GetEditCacheCommand() const
void cmGlobalNinjaGenerator
::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
{
- cmTarget* target = gt->Target;
-
// Compute full path to object file directory for this target.
std::string dir;
dir += gt->Makefile->GetCurrentBinaryDirectory();
dir += "/";
- dir += gt->LocalGenerator->GetTargetDirectory(*target);
+ dir += gt->LocalGenerator->GetTargetDirectory(gt);
dir += "/";
gt->ObjectDirectory = dir;
}
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 129dc42..a0ad72d 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -114,13 +114,11 @@ void
cmGlobalUnixMakefileGenerator3
::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
{
- cmTarget* target = gt->Target;
-
// Compute full path to object file directory for this target.
std::string dir;
dir += gt->Makefile->GetCurrentBinaryDirectory();
dir += "/";
- dir += gt->LocalGenerator->GetTargetDirectory(*target);
+ dir += gt->LocalGenerator->GetTargetDirectory(gt);
dir += "/";
gt->ObjectDirectory = dir;
}
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index fa9c606..a30a2e7 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -147,7 +147,7 @@ void cmGlobalVisualStudioGenerator
{
std::string dir = gt->Makefile->GetCurrentBinaryDirectory();
dir += "/";
- std::string tgtDir = gt->LocalGenerator->GetTargetDirectory(*gt->Target);
+ std::string tgtDir = gt->LocalGenerator->GetTargetDirectory(gt);
if(!tgtDir.empty())
{
dir += tgtDir;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3691b41..a84ce8e 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2908,7 +2908,7 @@ const char* cmLocalGenerator::GetCurrentSourceDirectory() const
//----------------------------------------------------------------------------
std::string
-cmLocalGenerator::GetTargetDirectory(cmTarget const&) const
+cmLocalGenerator::GetTargetDirectory(const cmGeneratorTarget*) const
{
cmSystemTools::Error("GetTargetDirectory"
" called on cmLocalGenerator");
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 97e3f88..ee0a618 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -247,7 +247,8 @@ public:
* Get the relative path from the generator output directory to a
* per-target support directory.
*/
- virtual std::string GetTargetDirectory(cmTarget const& target) const;
+ virtual std::string
+ GetTargetDirectory(cmGeneratorTarget const* target) const;
/**
* Get the level of backwards compatibility requested by the project
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 8d71469..71d3426 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -100,10 +100,10 @@ void cmLocalNinjaGenerator::Generate()
// TODO: Picked up from cmLocalUnixMakefileGenerator3. Refactor it.
std::string cmLocalNinjaGenerator
-::GetTargetDirectory(cmTarget const& target) const
+::GetTargetDirectory(cmGeneratorTarget const* target) const
{
std::string dir = cmake::GetCMakeFilesDirectoryPostSlash();
- dir += target.GetName();
+ dir += target->GetName();
#if defined(__VMS)
dir += "_dir";
#else
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index 1645a8d..ce5f82d 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -37,7 +37,8 @@ public:
virtual void Generate();
- virtual std::string GetTargetDirectory(cmTarget const& target) const;
+ virtual
+ std::string GetTargetDirectory(cmGeneratorTarget const* target) const;
const cmGlobalNinjaGenerator* GetGlobalNinjaGenerator() const;
cmGlobalNinjaGenerator* GetGlobalNinjaGenerator();
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 2e7a134..36602d8 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -191,7 +191,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
std::string dir;
dir += gt->Makefile->GetCurrentBinaryDirectory();
dir += "/";
- dir += this->GetTargetDirectory(*gt->Target);
+ dir += this->GetTargetDirectory(gt);
dir += "/";
// Compute the name of each object file.
for(std::vector<cmSourceFile const*>::iterator
@@ -936,7 +936,7 @@ cmLocalUnixMakefileGenerator3
::GetRelativeTargetDirectory(cmGeneratorTarget* target)
{
std::string dir = this->HomeRelativeOutputPath;
- dir += this->GetTargetDirectory(*target->Target);
+ dir += this->GetTargetDirectory(target);
return this->Convert(dir,NONE,UNCHANGED);
}
@@ -1222,7 +1222,7 @@ cmLocalUnixMakefileGenerator3
{
std::string cleanfile = this->Makefile->GetCurrentBinaryDirectory();
cleanfile += "/";
- cleanfile += this->GetTargetDirectory(target->Target);
+ cleanfile += this->GetTargetDirectory(target);
cleanfile += "/cmake_clean";
if(filename)
{
@@ -1261,7 +1261,7 @@ cmLocalUnixMakefileGenerator3
fout << "\n"
<< "# Per-language clean rules from dependency scanning.\n"
<< "foreach(lang " << cmJoin(languages, " ") << ")\n"
- << " include(" << this->GetTargetDirectory(target->Target)
+ << " include(" << this->GetTargetDirectory(target)
<< "/cmake_clean_${lang}.cmake OPTIONAL)\n"
<< "endforeach()\n";
}
@@ -2282,10 +2282,10 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
//----------------------------------------------------------------------------
std::string
cmLocalUnixMakefileGenerator3
-::GetTargetDirectory(cmTarget const& target) const
+::GetTargetDirectory(cmGeneratorTarget const* target) const
{
std::string dir = cmake::GetCMakeFilesDirectoryPostSlash();
- dir += target.GetName();
+ dir += target->GetName();
#if defined(__VMS)
dir += "_dir";
#else
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 032e501..586dda0 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -106,7 +106,8 @@ public:
/** Get whether the makefile is to have color. */
bool GetColorMakefile() const { return this->ColorMakefile; }
- virtual std::string GetTargetDirectory(cmTarget const& target) const;
+ virtual
+ std::string GetTargetDirectory(cmGeneratorTarget const* target) const;
// create a command that cds to the start dir then runs the commands
void CreateCDCommand(std::vector<std::string>& commands,
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 6ecd9a8..c7e9923 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1939,7 +1939,7 @@ void cmLocalVisualStudio6Generator
std::string
cmLocalVisualStudio6Generator
-::GetTargetDirectory(cmTarget const&) const
+::GetTargetDirectory(cmGeneratorTarget const*) const
{
// No per-target directory for this generator (yet).
return "";
diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h
index 828d252..b3b61bb 100644
--- a/Source/cmLocalVisualStudio6Generator.h
+++ b/Source/cmLocalVisualStudio6Generator.h
@@ -49,7 +49,8 @@ public:
*/
void SetBuildType(BuildType, const std::string& libName, cmTarget&);
- virtual std::string GetTargetDirectory(cmTarget const& target) const;
+ virtual
+ std::string GetTargetDirectory(cmGeneratorTarget const* target) const;
virtual std::string ComputeLongestObjectDirectory(cmTarget&) const;
private:
std::string DSPHeaderTemplate;
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 82b18c6..65f42c2 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -784,7 +784,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
// The intermediate directory name consists of a directory for the
// target and a subdirectory for the configuration name.
- std::string intermediateDir = this->GetTargetDirectory(target);
+ std::string intermediateDir = this->GetTargetDirectory(gt);
intermediateDir += "/";
intermediateDir += configName;
@@ -1113,7 +1113,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
break;
case cmTarget::OBJECT_LIBRARY:
{
- std::string libpath = this->GetTargetDirectory(target);
+ std::string libpath = this->GetTargetDirectory(gt);
libpath += "/";
libpath += configName;
libpath += "/";
@@ -1725,7 +1725,9 @@ cmLocalVisualStudio7Generator
std::string dir_max;
dir_max += this->GetCurrentBinaryDirectory();
dir_max += "/";
- dir_max += this->GetTargetDirectory(target);
+ cmGeneratorTarget* gt =
+ this->GlobalGenerator->GetGeneratorTarget(&target);
+ dir_max += this->GetTargetDirectory(gt);
dir_max += "/";
dir_max += config_max;
dir_max += "/";
@@ -2369,10 +2371,10 @@ void cmLocalVisualStudio7Generator::ReadAndStoreExternalGUID(
//----------------------------------------------------------------------------
std::string cmLocalVisualStudio7Generator
-::GetTargetDirectory(cmTarget const& target) const
+::GetTargetDirectory(cmGeneratorTarget const* target) const
{
std::string dir;
- dir += target.GetName();
+ dir += target->GetName();
dir += ".dir";
return dir;
}
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index bc05a06..ba6a72b 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -53,7 +53,8 @@ public:
*/
void SetBuildType(BuildType,const std::string& name);
- virtual std::string GetTargetDirectory(cmTarget const&) const;
+ virtual
+ std::string GetTargetDirectory(cmGeneratorTarget const* target) const;
cmSourceFile* CreateVCProjBuildRule();
void WriteStampFiles();
virtual std::string ComputeLongestObjectDirectory(cmTarget&) const;
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index 70997bf..3b430d2 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -31,7 +31,7 @@ cmLocalXCodeGenerator::~cmLocalXCodeGenerator()
//----------------------------------------------------------------------------
std::string
-cmLocalXCodeGenerator::GetTargetDirectory(cmTarget const&) const
+cmLocalXCodeGenerator::GetTargetDirectory(cmGeneratorTarget const*) const
{
// No per-target directory for this generator (yet).
return "";
diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h
index 6d0926f..4381a6d 100644
--- a/Source/cmLocalXCodeGenerator.h
+++ b/Source/cmLocalXCodeGenerator.h
@@ -28,7 +28,8 @@ public:
cmMakefile* mf);
virtual ~cmLocalXCodeGenerator();
- virtual std::string GetTargetDirectory(cmTarget const& target) const;
+ virtual
+ std::string GetTargetDirectory(cmGeneratorTarget const* target) const;
virtual void AppendFlagEscape(std::string& flags,
const std::string& rawFlag);
virtual void Generate();
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 007a997..1ed3e49 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -92,7 +92,7 @@ void cmMakefileTargetGenerator::CreateRuleFile()
{
// Create a directory for this target.
this->TargetBuildDirectory =
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->TargetBuildDirectoryFull =
this->LocalGenerator->ConvertToFullPath(this->TargetBuildDirectory);
cmSystemTools::MakeDirectory(this->TargetBuildDirectoryFull.c_str());
@@ -378,7 +378,8 @@ void cmMakefileTargetGenerator
// Get the full path name of the object file.
std::string const& objectName = this->GeneratorTarget
->GetObjectName(&source);
- std::string obj = this->LocalGenerator->GetTargetDirectory(*this->Target);
+ std::string obj =
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
obj += "/";
obj += objectName;
@@ -1024,7 +1025,8 @@ bool cmMakefileTargetGenerator::WriteMakeRule(
void cmMakefileTargetGenerator::WriteTargetDependRules()
{
// must write the targets depend info file
- std::string dir = this->LocalGenerator->GetTargetDirectory(*this->Target);
+ std::string dir =
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->InfoFileNameFull = dir;
this->InfoFileNameFull += "/DependInfo.cmake";
this->InfoFileNameFull =
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 4080d90..e26ce51 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -245,7 +245,7 @@ cmNinjaTargetGenerator
path += "/";
std::string const& objectName = this->GeneratorTarget
->GetObjectName(source);
- path += this->LocalGenerator->GetTargetDirectory(*this->Target);
+ path += this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
path += "/";
path += objectName;
return path;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a2aada6..7c65146 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -196,7 +196,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target,
this->IsMissingFiles = false;
this->DefaultArtifactDir =
this->LocalGenerator->GetCurrentBinaryDirectory() + std::string("/") +
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
}
cmVisualStudio10TargetGenerator::~cmVisualStudio10TargetGenerator()
@@ -1765,7 +1765,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
else
{
std::string intermediateDir = this->LocalGenerator->
- GetTargetDirectory(*this->Target);
+ GetTargetDirectory(this->GeneratorTarget);
intermediateDir += "/";
intermediateDir += *config;
intermediateDir += "/";
@@ -3021,7 +3021,7 @@ void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile()
{
// Move the manifest to a project directory to avoid clashes
std::string artifactDir =
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->ConvertToWindowsSlash(artifactDir);
this->WriteString("<PropertyGroup>\n", 1);
this->WriteString("<AppxPackageArtifactsDir>", 2);
@@ -3320,7 +3320,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP80()
this->LocalGenerator->GetCurrentBinaryDirectory() +
std::string("/WMAppManifest.xml");
std::string artifactDir =
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
@@ -3403,7 +3403,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP81()
std::string manifestFile =
this->DefaultArtifactDir + "/package.appxManifest";
std::string artifactDir =
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
@@ -3463,7 +3463,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS80()
std::string manifestFile =
this->DefaultArtifactDir + "/package.appxManifest";
std::string artifactDir =
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
@@ -3515,7 +3515,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS81()
std::string manifestFile =
this->DefaultArtifactDir + "/package.appxManifest";
std::string artifactDir =
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
@@ -3572,7 +3572,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS10_0()
std::string manifestFile =
this->DefaultArtifactDir + "/package.appxManifest";
std::string artifactDir =
- this->LocalGenerator->GetTargetDirectory(*this->Target);
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
this->ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06f56d3bf5d8210d190e1bfcf05673ceb78c5594
commit 06f56d3bf5d8210d190e1bfcf05673ceb78c5594
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 15 00:23:53 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Oct 15 00:23:53 2015 +0200
cmLocalUnixMakefileGenerator3: Port AppendCleanCommand to cmGeneratorTarget.
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index f0373e0..2e7a134 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1218,11 +1218,11 @@ void
cmLocalUnixMakefileGenerator3
::AppendCleanCommand(std::vector<std::string>& commands,
const std::vector<std::string>& files,
- cmTarget& target, const char* filename)
+ cmGeneratorTarget* target, const char* filename)
{
std::string cleanfile = this->Makefile->GetCurrentBinaryDirectory();
cleanfile += "/";
- cleanfile += this->GetTargetDirectory(target);
+ cleanfile += this->GetTargetDirectory(target->Target);
cleanfile += "/cmake_clean";
if(filename)
{
@@ -1256,14 +1256,12 @@ cmLocalUnixMakefileGenerator3
{
// Get the set of source languages in the target.
std::set<std::string> languages;
- cmGeneratorTarget *gtgt =
- this->GlobalGenerator->GetGeneratorTarget(&target);
- gtgt->GetLanguages(languages,
+ target->GetLanguages(languages,
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
fout << "\n"
<< "# Per-language clean rules from dependency scanning.\n"
<< "foreach(lang " << cmJoin(languages, " ") << ")\n"
- << " include(" << this->GetTargetDirectory(target)
+ << " include(" << this->GetTargetDirectory(target->Target)
<< "/cmake_clean_${lang}.cmake OPTIONAL)\n"
<< "endforeach()\n";
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index fb5ac2f..032e501 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -226,7 +226,7 @@ protected:
std::ostream* content = 0);
void AppendCleanCommand(std::vector<std::string>& commands,
const std::vector<std::string>& files,
- cmTarget& target, const char* filename =0);
+ cmGeneratorTarget* target, const char* filename =0);
// Helper methods for dependeny updates.
bool ScanDependencies(const char* targetDir,
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 8b60a23..1278dcd 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -444,7 +444,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
{
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
- *this->Target, "target");
+ this->GeneratorTarget, "target");
this->LocalGenerator->CreateCDCommand
(commands1,
this->Makefile->GetCurrentBinaryDirectory(),
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 94d583b..007a997 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -932,7 +932,7 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules()
// Construct the clean command.
this->LocalGenerator->AppendCleanCommand(commands, this->CleanFiles,
- *this->Target);
+ this->GeneratorTarget);
this->LocalGenerator->CreateCDCommand
(commands,
this->LocalGenerator->GetCurrentBinaryDirectory(),
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8f8f16541f3ac6af3397f3a78ee68fc963af151
commit c8f8f16541f3ac6af3397f3a78ee68fc963af151
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 15 00:12:53 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Oct 15 00:20:16 2015 +0200
cmLocalUnixMakefileGenerator3: Port another API to cmGeneratorTarget.
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index d6f6490..129dc42 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -435,7 +435,8 @@ void cmGlobalUnixMakefileGenerator3
(l->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
(l->second.GetType() == cmTarget::UTILITY))
{
- std::string tname = lg->GetRelativeTargetDirectory(l->second);
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(&l->second);
+ std::string tname = lg->GetRelativeTargetDirectory(gt);
tname += "/DependInfo.cmake";
cmSystemTools::ConvertToUnixSlashes(tname);
cmakefileStream << " \"" << tname << "\"\n";
@@ -484,7 +485,7 @@ cmGlobalUnixMakefileGenerator3
gtarget
->NeedRelinkBeforeInstall(lg->GetConfigName())))
{
- std::string tname = lg->GetRelativeTargetDirectory(*gtarget->Target);
+ std::string tname = lg->GetRelativeTargetDirectory(gtarget);
tname += "/";
tname += pass;
depends.push_back(tname);
@@ -673,7 +674,7 @@ cmGlobalUnixMakefileGenerator3
// Add a fast rule to build the target
std::string localName =
- lg->GetRelativeTargetDirectory(*gtarget->Target);
+ lg->GetRelativeTargetDirectory(gtarget);
std::string makefileName;
makefileName = localName;
makefileName += "/build.make";
@@ -693,7 +694,7 @@ cmGlobalUnixMakefileGenerator3
if(gtarget
->NeedRelinkBeforeInstall(lg->GetConfigName()))
{
- makeTargetName = lg->GetRelativeTargetDirectory(*gtarget->Target);
+ makeTargetName = lg->GetRelativeTargetDirectory(gtarget);
makeTargetName += "/preinstall";
localName = name;
localName += "/preinstall";
@@ -750,7 +751,7 @@ cmGlobalUnixMakefileGenerator3
{
std::string makefileName;
// Add a rule to build the target by name.
- localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
+ localName = lg->GetRelativeTargetDirectory(gtarget);
makefileName = localName;
makefileName += "/build.make";
@@ -861,7 +862,7 @@ cmGlobalUnixMakefileGenerator3
}
depends.clear();
depends.push_back("cmake_check_build_system");
- localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
+ localName = lg->GetRelativeTargetDirectory(gtarget);
localName += "/rule";
lg->WriteMakeRule(ruleFileStream,
"Build rule for subdir invocation for target.",
@@ -878,7 +879,7 @@ cmGlobalUnixMakefileGenerator3
if(gtarget
->NeedRelinkBeforeInstall(lg->GetConfigName()))
{
- localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
+ localName = lg->GetRelativeTargetDirectory(gtarget);
localName += "/preinstall";
depends.clear();
commands.clear();
@@ -899,7 +900,7 @@ cmGlobalUnixMakefileGenerator3
}
// add the clean rule
- localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
+ localName = lg->GetRelativeTargetDirectory(gtarget);
makeTargetName = localName;
makeTargetName += "/clean";
depends.clear();
@@ -1066,7 +1067,8 @@ cmGlobalUnixMakefileGenerator3
}
cmLocalUnixMakefileGenerator3* lg3 =
static_cast<cmLocalUnixMakefileGenerator3*>(dep->GetLocalGenerator());
- std::string tgtName = lg3->GetRelativeTargetDirectory(*(*dep).Target);
+ std::string tgtName =
+ lg3->GetRelativeTargetDirectory(const_cast<cmGeneratorTarget*>(dep));
tgtName += "/all";
depends.push_back(tgtName);
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index c08ea8a..f0373e0 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -389,7 +389,7 @@ cmLocalUnixMakefileGenerator3
t != info.end(); ++t)
{
std::string tgtMakefileName =
- this->GetRelativeTargetDirectory(*(t->Target->Target));
+ this->GetRelativeTargetDirectory(t->Target);
std::string targetName = tgtMakefileName;
tgtMakefileName += "/build.make";
targetName += "/";
@@ -438,7 +438,7 @@ void cmLocalUnixMakefileGenerator3
emitted.insert(t->second->GetName());
// for subdirs add a rule to build this specific target by name.
- localName = this->GetRelativeTargetDirectory(*t->second->Target);
+ localName = this->GetRelativeTargetDirectory(t->second);
localName += "/rule";
commands.clear();
depends.clear();
@@ -465,11 +465,11 @@ void cmLocalUnixMakefileGenerator3
// Add a fast rule to build the target
std::string makefileName =
- this->GetRelativeTargetDirectory(*t->second->Target);
+ this->GetRelativeTargetDirectory(t->second);
makefileName += "/build.make";
// make sure the makefile name is suitable for a makefile
std::string makeTargetName =
- this->GetRelativeTargetDirectory(*t->second->Target);
+ this->GetRelativeTargetDirectory(t->second);
makeTargetName += "/build";
localName = t->second->GetName();
localName += "/fast";
@@ -487,7 +487,7 @@ void cmLocalUnixMakefileGenerator3
// installation.
if(t->second->NeedRelinkBeforeInstall(this->ConfigName))
{
- makeTargetName = this->GetRelativeTargetDirectory(*t->second->Target);
+ makeTargetName = this->GetRelativeTargetDirectory(t->second);
makeTargetName += "/preinstall";
localName = t->second->GetName();
localName += "/preinstall";
@@ -933,10 +933,10 @@ cmLocalUnixMakefileGenerator3
//----------------------------------------------------------------------------
std::string
cmLocalUnixMakefileGenerator3
-::GetRelativeTargetDirectory(cmTarget const& target)
+::GetRelativeTargetDirectory(cmGeneratorTarget* target)
{
std::string dir = this->HomeRelativeOutputPath;
- dir += this->GetTargetDirectory(target);
+ dir += this->GetTargetDirectory(*target->Target);
return this->Convert(dir,NONE,UNCHANGED);
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 82dedbd..fb5ac2f 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -131,7 +131,7 @@ public:
void WriteSpecialTargetsTop(std::ostream& makefileStream);
void WriteSpecialTargetsBottom(std::ostream& makefileStream);
- std::string GetRelativeTargetDirectory(cmTarget const& target);
+ std::string GetRelativeTargetDirectory(cmGeneratorTarget* target);
// File pairs for implicit dependency scanning. The key of the map
// is the depender and the value is the explicit dependee.
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index abcda21..94d583b 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -870,7 +870,7 @@ cmMakefileTargetGenerator
temp += ".provides.build";
std::vector<std::string> r_commands;
std::string tgtMakefileName =
- this->LocalGenerator->GetRelativeTargetDirectory(*this->Target);
+ this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget);
tgtMakefileName += "/build.make";
r_commands.push_back
(this->LocalGenerator->GetRecursiveMakeCall(tgtMakefileName.c_str(),
@@ -898,7 +898,7 @@ void cmMakefileTargetGenerator::WriteTargetRequiresRules()
// Construct the name of the dependency generation target.
std::string depTarget =
- this->LocalGenerator->GetRelativeTargetDirectory(*this->Target);
+ this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget);
depTarget += "/requires";
// This target drives dependency generation for all object files.
@@ -927,7 +927,7 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules()
// Construct the clean target name.
std::string cleanTarget =
- this->LocalGenerator->GetRelativeTargetDirectory(*this->Target);
+ this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget);
cleanTarget += "/clean";
// Construct the clean command.
@@ -1086,7 +1086,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
// Construct the name of the dependency generation target.
std::string depTarget =
- this->LocalGenerator->GetRelativeTargetDirectory(*this->Target);
+ this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget);
depTarget += "/depend";
// Add a command to call CMake to scan dependencies. CMake will
@@ -1400,7 +1400,7 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule(
{
// Compute the name of the driver target.
std::string dir =
- this->LocalGenerator->GetRelativeTargetDirectory(*this->Target);
+ this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget);
std::string buildTargetRuleName = dir;
buildTargetRuleName += relink?"/preinstall":"/build";
buildTargetRuleName = this->Convert(buildTargetRuleName,
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f299a1225798f6485ab77c9140bf9c1d589e2fe
commit 9f299a1225798f6485ab77c9140bf9c1d589e2fe
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 15 00:11:21 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Oct 15 00:11:21 2015 +0200
cmLocalUnixMakefileGenerator3: Port API to cmGenertorTarget.
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 91c7acd..c08ea8a 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -209,7 +209,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
}
LocalObjectInfo& info = localObjectFiles[objectName];
info.HasSourceExtension = hasSourceExtension;
- info.push_back(LocalObjectEntry(gt->Target, sf->GetLanguage()));
+ info.push_back(LocalObjectEntry(gt, sf->GetLanguage()));
}
}
}
@@ -389,7 +389,7 @@ cmLocalUnixMakefileGenerator3
t != info.end(); ++t)
{
std::string tgtMakefileName =
- this->GetRelativeTargetDirectory(*(t->Target));
+ this->GetRelativeTargetDirectory(*(t->Target->Target));
std::string targetName = tgtMakefileName;
tgtMakefileName += "/build.make";
targetName += "/";
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 98f15e6..82dedbd 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -254,10 +254,10 @@ private:
struct LocalObjectEntry
{
- cmTarget* Target;
+ cmGeneratorTarget* Target;
std::string Language;
LocalObjectEntry(): Target(0), Language() {}
- LocalObjectEntry(cmTarget* t, const std::string& lang):
+ LocalObjectEntry(cmGeneratorTarget* t, const std::string& lang):
Target(t), Language(lang) {}
};
struct LocalObjectInfo: public std::vector<LocalObjectEntry>
-----------------------------------------------------------------------
Summary of changes:
Source/cmCommonTargetGenerator.cxx | 2 +-
Source/cmExtraCodeBlocksGenerator.cxx | 25 +++++++++++--------------
Source/cmExtraCodeBlocksGenerator.h | 5 +++--
Source/cmExtraEclipseCDT4Generator.cxx | 4 +++-
Source/cmGlobalNinjaGenerator.cxx | 4 +---
Source/cmGlobalUnixMakefileGenerator3.cxx | 24 ++++++++++++------------
Source/cmGlobalVisualStudioGenerator.cxx | 2 +-
Source/cmLocalGenerator.cxx | 2 +-
Source/cmLocalGenerator.h | 3 ++-
Source/cmLocalNinjaGenerator.cxx | 4 ++--
Source/cmLocalNinjaGenerator.h | 3 ++-
Source/cmLocalUnixMakefileGenerator3.cxx | 26 ++++++++++++--------------
Source/cmLocalUnixMakefileGenerator3.h | 11 ++++++-----
Source/cmLocalVisualStudio6Generator.cxx | 2 +-
Source/cmLocalVisualStudio6Generator.h | 3 ++-
Source/cmLocalVisualStudio7Generator.cxx | 12 +++++++-----
Source/cmLocalVisualStudio7Generator.h | 3 ++-
Source/cmLocalXCodeGenerator.cxx | 2 +-
Source/cmLocalXCodeGenerator.h | 3 ++-
Source/cmMakefileLibraryTargetGenerator.cxx | 2 +-
Source/cmMakefileTargetGenerator.cxx | 20 +++++++++++---------
Source/cmNinjaTargetGenerator.cxx | 2 +-
Source/cmVisualStudio10TargetGenerator.cxx | 16 ++++++++--------
23 files changed, 93 insertions(+), 87 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list