aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/FindCheck.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/FindCheck.cmake')
-rw-r--r--cmake/Modules/FindCheck.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/Modules/FindCheck.cmake b/cmake/Modules/FindCheck.cmake
index 35d4431..42ca746 100644
--- a/cmake/Modules/FindCheck.cmake
+++ b/cmake/Modules/FindCheck.cmake
@@ -42,9 +42,12 @@ else (CHECK_LIBRARIES AND CHECK_INCLUDE_DIRS)
)
mark_as_advanced(CHECK_INCLUDE_DIR)
+ # check_pic is a workaround for ubuntu's check bug which does not compile
+ # check as a shared library with -fPIC.
+ # see https://bugs.launchpad.net/ubuntu/+source/check/+bug/125781
find_library(CHECK_LIBRARY
NAMES
- check
+ check_pic check
PATHS
${_CHECK_LIBDIR}
/usr/lib