FindM.cmake: directly pass -lm to fix selective static linking
authorPeter Wu <peter@lekensteyn.nl>
Thu, 18 Oct 2018 17:50:04 +0000 (19:50 +0200)
committerAnders Broman <a.broman58@gmail.com>
Thu, 18 Oct 2018 20:06:49 +0000 (20:06 +0000)
commit55cd530cf0db8ff7375f58a95ad9ca40a80509a2
tree9e1d2c9896ab6f62b615ea003b434d446d8fe920
parent54286eb09cca14f0931f094c3f4874a2701729a6
FindM.cmake: directly pass -lm to fix selective static linking

When CMAKE_FIND_LIBRARY_SUFFIXES is set to ".a" (in order to find only
static libraries), executables would be linked with libm.a. This fails
when the C runtime is not statically linked as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1433347

Change-Id: I1480607bd3d0678661694657a2709ee1c56f9530
Reviewed-on: https://code.wireshark.org/review/30253
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
cmake/modules/FindM.cmake