On 07/18/2017 04:52 PM, Robert Dailey wrote:
> set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}
> -Wl,--no-undefined" )
That's fine, but you can use `string(APPEND)` to shorten the code:
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--no-undefined")
> After talking more with the NDK devs on github though, they seem to
> indicate this should happen by default (or at least, it does with the
> CMake that ships with the NDK according to Dan Albert).
I don't think the NDK build system itself did that back when we first
developed CMake's NDK support. It looks like their NDK-provided
toolchain does do it by default, but with an option to turn it off.
> Does --no-defined get specified by default for other platforms?
> Or is it just Android that isn't getting it?
CMake doesn't add --no-undefined by default on any platform.
-Brad
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers