How can I pass an argument to ranlib
when compiling a static library with CMake?
I tried:
set_target_properties(myLibrary STATIC_LIBRARY_FLAGS "--plugin /usr/lib/gcc/x86_64-linux-gnu/4.9/liblto_plugin.so")
and this worked for ar
but not for the subsequent ranlib
command.
Have you tried this?
On the Mac, this is how I pass the "-no_warning_for_no_symbols" flag to ranlib.
Note: The SET commands don't modify the ranlib command used as part of an installation by running "make install." CMake's installer code does not generate installation scripts that allow for options to be added to ranlib.
Adding
worked for me.