diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-18 22:34:23 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-20 22:36:09 (GMT) |
commit | 83703bda7d1017e1f75ec1b92d672d5ef17194d5 (patch) | |
tree | 1dc551849f31b187c08332f71d9a596567338c6b /Source/cmGeneratorTarget.cxx | |
parent | 9afbb733ec2a55424e6c25c6afa7fdd14219d6b1 (diff) | |
download | CMake-83703bda7d1017e1f75ec1b92d672d5ef17194d5.zip CMake-83703bda7d1017e1f75ec1b92d672d5ef17194d5.tar.gz CMake-83703bda7d1017e1f75ec1b92d672d5ef17194d5.tar.bz2 |
cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b2959fe..c68b84a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4571,7 +4571,7 @@ cmGeneratorTarget::GetLinkInterface(const std::string& config, // Link interfaces are not supported for executables that do not // export symbols. if(this->GetType() == cmState::EXECUTABLE && - !this->Target->IsExecutableWithExports()) + !this->IsExecutableWithExports()) { return 0; } @@ -4720,7 +4720,7 @@ cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config, // Link interfaces are not supported for executables that do not // export symbols. if(this->GetType() == cmState::EXECUTABLE && - !this->Target->IsExecutableWithExports()) + !this->IsExecutableWithExports()) { return 0; } @@ -5031,7 +5031,7 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( explicitLibraries = this->GetProperty(linkIfaceProp); } else if(this->GetType() == cmState::SHARED_LIBRARY || - this->Target->IsExecutableWithExports()) + this->IsExecutableWithExports()) { // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a // shared lib or executable. @@ -5350,7 +5350,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, info.ImportLibrary = imp; } else if(this->GetType() == cmState::SHARED_LIBRARY || - this->Target->IsExecutableWithExports()) + this->IsExecutableWithExports()) { std::string impProp = "IMPORTED_IMPLIB"; impProp += suffix; @@ -5858,7 +5858,7 @@ cmGeneratorTarget::FindTargetToLink(std::string const& name) const // name conflict between an external library and an executable // within the project. if(tgt && tgt->GetType() == cmState::EXECUTABLE && - !tgt->Target->IsExecutableWithExports()) + !tgt->IsExecutableWithExports()) { tgt = 0; } @@ -5914,11 +5914,18 @@ bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName, } //---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsExecutableWithExports() const +{ + return (this->GetType() == cmState::EXECUTABLE && + this->GetPropertyAsBool("ENABLE_EXPORTS")); +} + +//---------------------------------------------------------------------------- bool cmGeneratorTarget::HasImportLibrary() const { return (this->Target->IsDLLPlatform() && (this->GetType() == cmState::SHARED_LIBRARY || - this->Target->IsExecutableWithExports())); + this->IsExecutableWithExports())); } //---------------------------------------------------------------------------- @@ -5944,7 +5951,7 @@ bool cmGeneratorTarget::IsLinkable() const this->GetType() == cmState::MODULE_LIBRARY || this->GetType() == cmState::UNKNOWN_LIBRARY || this->GetType() == cmState::INTERFACE_LIBRARY || - this->Target->IsExecutableWithExports()); + this->IsExecutableWithExports()); } //---------------------------------------------------------------------------- |