diff options
author | Brad King <brad.king@kitware.com> | 2017-01-16 16:01:14 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-16 16:01:14 (GMT) |
commit | 94332a3ed8398202e4d8f985bcfba31ea0fa71e6 (patch) | |
tree | e514ba00f5135db8fc229687327df839c413c2b6 | |
parent | 8a8aff612c77e03358601a9c5d8941e518f82d1c (diff) | |
parent | 47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c (diff) | |
download | CMake-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.cxx | 7 |
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; } |