Fix T48250: suppress CMake ranlib warnings to avoid issue with Qt Creator
authorTianwei Shen <shentianweipku@gmail.com>
Sat, 23 Apr 2016 13:44:26 +0000 (15:44 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 23 Apr 2016 13:52:38 +0000 (15:52 +0200)
Reviewed By: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D1942

CMakeLists.txt

index f05e9680c0a6db6e30a00f5ac6cca838a7948544..a924098b85a79b3027f4e5af3487208142a636d8 100644 (file)
@@ -2319,6 +2319,12 @@ elseif(APPLE)
        endif()
        # Get rid of eventually clashes, we export some symbols explicite as local
        set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map")
+
+       # Suppress ranlib "has no symbols" warnings
+       SET(CMAKE_C_ARCHIVE_CREATE   "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
+       SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
+       SET(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
+       SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
 endif()
 
 #-----------------------------------------------------------------------------