[Cmake-commits] CMake branch, next, updated. v2.8.8-3104-g61c3225

Brad King brad.king at kitware.com
Mon Jun 11 08:41:25 EDT 2012


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  61c32257bf1fd4b8611e61f68ed75e3dec9194fe (commit)
       via  9a9b3e45e3da8347abb00c79c8f9e2e94a530820 (commit)
      from  b4d5bbcffa4fe63123ff78a45e199ad1d95dcb51 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61c32257bf1fd4b8611e61f68ed75e3dec9194fe
commit 61c32257bf1fd4b8611e61f68ed75e3dec9194fe
Merge: b4d5bbc 9a9b3e4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 11 08:41:23 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 11 08:41:23 2012 -0400

    Merge topic 'object-library-is-not-shared' into next
    
    9a9b3e4 add_library: Allow OBJECT library without dynamic linking (#13289)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a9b3e45e3da8347abb00c79c8f9e2e94a530820
commit 9a9b3e45e3da8347abb00c79c8f9e2e94a530820
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 11 08:37:11 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jun 11 08:40:11 2012 -0400

    add_library: Allow OBJECT library without dynamic linking (#13289)
    
    When global property TARGET_SUPPORTS_SHARED_LIBS is FALSE we should
    still allow OBJECT libraries.  This was an oversight in commit b87d7a60
    (Add OBJECT_LIBRARY target type, 2012-03-12).  While at it, fix the
    warning message to report context.

diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index c1d0e9d..fd39eec 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -102,16 +102,17 @@ bool cmAddLibraryCommand
     STATIC. But at this point we know only the name of the target, but not
     yet its linker language. */
   if ((type != cmTarget::STATIC_LIBRARY) &&
+      (type != cmTarget::OBJECT_LIBRARY) &&
        (this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
                                       "TARGET_SUPPORTS_SHARED_LIBS") == false))
     {
-    std::string msg = "ADD_LIBRARY for library ";
-    msg += args[0];
-    msg += " is used with the ";
-    msg += type==cmTarget::SHARED_LIBRARY ? "SHARED" : "MODULE";
-    msg += " option, but the target platform supports only STATIC libraries. "
-           "Building it STATIC instead. This may lead to problems.";
-    cmSystemTools::Message(msg.c_str() ,"Warning");
+    cmOStringStream w;
+    w <<
+      "ADD_LIBRARY called with " <<
+      (type==cmTarget::SHARED_LIBRARY ? "SHARED" : "MODULE") <<
+      " option but the target platform does not support dynamic linking. "
+      "Building a STATIC library instead. This may lead to problems.";
+    this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
     type = cmTarget::STATIC_LIBRARY;
     }
 

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

Summary of changes:
 Source/cmAddLibraryCommand.cxx |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list