Commit 365dfd20 authored by ernestotapiar's avatar ernestotapiar Committed by Davis E. King

cmake script to suppress randlib warnings about *.a having no symbols on MacOSX (#390)

* cmake script to suppress randlib warnings about *.a having no symbols on
MacOSX

* Moved script code into the main CMakeLists.txt file to suppress the
superfluous ranlib warnings all the time.
parent 97151133
......@@ -63,6 +63,14 @@ macro (toggle_preprocessor_switch option_name)
endif()
endmacro()
# Suppress superfluous randlib warnings about libdlib.a having no symbols on MacOSX.
if (APPLE)
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()
# Don't try to call add_library(dlib) and setup dlib's stuff if it has already
# been done by some other part of the current cmake project. We do this
# because it avoids getting warnings/errors about cmake policy CMP0002. This
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment