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  7508f58de59e532dd011edc3c0281ff60aaad7b8 (commit)
       via  47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c (commit)
      from  040148125575371543ea890762da9f4467b9529e (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=7508f58de59e532dd011edc3c0281ff60aaad7b8
commit 7508f58de59e532dd011edc3c0281ff60aaad7b8
Merge: 0401481 47ffa0e
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Jan 12 15:11:45 2017 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Jan 12 15:11:45 2017 -0500

    Merge topic 'ninja-no-static-lib-def-file' into next
    
    47ffa0ea Ninja: Do not use module definition `.def` files for static 
libraries


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c
commit 47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Jan 11 15:56:21 2017 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Jan 12 13:35:48 2017 -0500

    Ninja: Do not use module definition `.def` files for static libraries
    
    A module definition (`.def`) file specifies symbols to export from
    a linked binary.  The librarian tool is not a linker and so should
    not be given a `/DEF:...` flag with the `.def` file.  The other
    generators already do not do this, so fix Ninja to be consistent.
    
    Closes: #16537

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;
   }

-----------------------------------------------------------------------

Summary of changes:
 Source/cmCommonTargetGenerator.cxx |    7 +++++++
 1 file changed, 7 insertions(+)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to