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  d497b25dcc2d84a7222b32182586ecc4995221ec (commit)
       via  cda9a904b5ef76d923a072a45c0c15fd1d87d6be (commit)
      from  6681122a8fd8d93bb49c79d8ba448fc870fd6747 (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=d497b25dcc2d84a7222b32182586ecc4995221ec
commit d497b25dcc2d84a7222b32182586ecc4995221ec
Merge: 6681122 cda9a90
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Jan 9 15:55:02 2017 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Jan 9 15:55:02 2017 -0500

    Merge topic 'sparc-libatomic' into next
    
    cda9a904 Explicitly link against libatomic on Linux/sparc for 
`__atomic_fetch_add_4`


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cda9a904b5ef76d923a072a45c0c15fd1d87d6be
commit cda9a904b5ef76d923a072a45c0c15fd1d87d6be
Author:     Rolf Eike Beer <e...@sf-mail.de>
AuthorDate: Mon Dec 19 14:47:01 2016 +0100
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Jan 9 15:51:35 2017 -0500

    Explicitly link against libatomic on Linux/sparc for `__atomic_fetch_add_4`
    
    On this platform atomic instructions are implemented using `libatomic`
    so we need to link it to use them.

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index d15fdbe..388bf89 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -785,6 +785,15 @@ target_link_libraries(CMakeLib cmsys
   ${CMake_KWIML_LIBRARIES}
   )
 
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES 
"sparc")
+  # the atomic instructions are implemented using libatomic on some platforms,
+  # so linking to that may be required
+  check_library_exists(atomic __atomic_fetch_add_4 "" LIBATOMIC_NEEDED)
+  if(LIBATOMIC_NEEDED)
+    target_link_libraries(CMakeLib atomic)
+  endif()
+endif()
+
 # On Apple we need CoreFoundation
 if(APPLE)
   target_link_libraries(CMakeLib "-framework CoreFoundation")

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

Summary of changes:


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

Reply via email to