summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-16 16:01:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-01-16 16:01:14 (GMT)
commit94332a3ed8398202e4d8f985bcfba31ea0fa71e6 (patch)
treee514ba00f5135db8fc229687327df839c413c2b6
parent8a8aff612c77e03358601a9c5d8941e518f82d1c (diff)
parent47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c (diff)
downloadCMake-94332a3ed8398202e4d8f985bcfba31ea0fa71e6.zip
CMake-94332a3ed8398202e4d8f985bcfba31ea0fa71e6.tar.gz
CMake-94332a3ed8398202e4d8f985bcfba31ea0fa71e6.tar.bz2
Merge topic 'ninja-no-static-lib-def-file'
47ffa0ea Ninja: Do not use module definition `.def` files for static libraries
-rw-r--r--Source/cmCommonTargetGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 7e113ab..239582f 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -63,6 +63,13 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags,
void cmCommonTargetGenerator::AddModuleDefinitionFlag(
cmLinkLineComputer* linkLineComputer, std::string& flags)
{
+ // A module definition file only makes sense on certain target types.
+ if (this->GeneratorTarget->GetType() != cmStateEnums::SHARED_LIBRARY &&
+ this->GeneratorTarget->GetType() != cmStateEnums::MODULE_LIBRARY &&
+ this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE) {
+ return;
+ }
+
if (!this->ModuleDefinitionFile) {
return;
}