summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-19 22:44:15 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-20 22:52:22 (GMT)
commit6d94078e623d5f1316f1972ffda06ac1d66b6f2f (patch)
treed1d5d0ec8710fdae937cfbd9627015376bc3c12a /Source
parent3ebc62850c7461dca4723b063b5e5f019409db84 (diff)
downloadCMake-6d94078e623d5f1316f1972ffda06ac1d66b6f2f.zip
CMake-6d94078e623d5f1316f1972ffda06ac1d66b6f2f.tar.gz
CMake-6d94078e623d5f1316f1972ffda06ac1d66b6f2f.tar.bz2
cmGeneratorTarget: Move IsDLLPlatform from cmTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx2
-rw-r--r--Source/cmGeneratorTarget.cxx13
-rw-r--r--Source/cmGeneratorTarget.h4
-rw-r--r--Source/cmTarget.h3
4 files changed, 16 insertions, 6 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 1a878e2..7a7e4ff 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1579,7 +1579,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactSonameTag>
const GeneratorExpressionContent *content)
{
// The target soname file (.so.1).
- if(target->Target->IsDLLPlatform())
+ if(target->IsDLLPlatform())
{
::reportError(context, content->GetOriginalExpression(),
"TARGET_SONAME_FILE is not allowed "
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 1483af7..6e312ce 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -304,6 +304,10 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
t->GetSourceEntries(),
t->GetSourceBacktraces(),
this->SourceEntries, true);
+
+ this->DLLPlatform = (this->Makefile->IsOn("WIN32") ||
+ this->Makefile->IsOn("CYGWIN") ||
+ this->Makefile->IsOn("MINGW"));
}
cmGeneratorTarget::~cmGeneratorTarget()
@@ -366,7 +370,7 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const
switch(this->GetType())
{
case cmState::SHARED_LIBRARY:
- if(this->Target->IsDLLPlatform())
+ if(this->IsDLLPlatform())
{
if(implib)
{
@@ -2058,6 +2062,11 @@ cmGeneratorTarget::GetModuleDefinitionFile(const std::string& config) const
return data;
}
+bool cmGeneratorTarget::IsDLLPlatform() const
+{
+ return this->DLLPlatform;
+}
+
//----------------------------------------------------------------------------
void
cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs,
@@ -5964,7 +5973,7 @@ bool cmGeneratorTarget::IsExecutableWithExports() const
//----------------------------------------------------------------------------
bool cmGeneratorTarget::HasImportLibrary() const
{
- return (this->Target->IsDLLPlatform() &&
+ return (this->IsDLLPlatform() &&
(this->GetType() == cmState::SHARED_LIBRARY ||
this->IsExecutableWithExports()));
}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 26b229d..eaec83b 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -196,6 +196,9 @@ public:
std::string GetModuleDefinitionFile(const std::string& config) const;
+ /** Return whether or not the target is for a DLL platform. */
+ bool IsDLLPlatform() const;
+
/** @return whether this target have a well defined output file name. */
bool HaveWellDefinedOutputFiles() const;
@@ -646,6 +649,7 @@ private:
mutable bool DebugSourcesDone;
mutable bool LinkImplementationLanguageIsContextDependent;
mutable bool UtilityItemsDone;
+ bool DLLPlatform;
bool ComputePDBOutputDir(const std::string& kind, const std::string& config,
std::string& out) const;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 26f0d63..33631e7 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -224,9 +224,6 @@ public:
enabled. */
bool IsExecutableWithExports() const;
- /** Return whether or not the target is for a DLL platform. */
- bool IsDLLPlatform() const { return this->DLLPlatform; }
-
/** Return whether this target is a shared library Framework on
Apple. */
bool IsFrameworkOnApple() const;