summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-25 19:21:06 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-25 19:29:20 -0200
commitf74ca08be9b78e5ac9a2f302ba2607db94872085 (patch)
treeede68b08efdcb71dd8141c110853dfb23b7f1299 /cmake
parenta2bc5ee1306184c8abab4c7eb62ddedb74687900 (diff)
cmake/eina: check more required functions and link with unwind if found.
unwind is needed for debug, thus link to that.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config/common.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/config/common.cmake b/cmake/config/common.cmake
index b06fd6c0e4..5056928e56 100644
--- a/cmake/config/common.cmake
+++ b/cmake/config/common.cmake
@@ -32,13 +32,13 @@ EFL_OPTION(ENABLE_VALGRIND "Enable valgrind support" "${SUGGEST_VALGRIND}" DEPEN
32HEADER_CHECK(asm/hwcap.h) 32HEADER_CHECK(asm/hwcap.h)
33HEADER_CHECK(dirent.h) 33HEADER_CHECK(dirent.h)
34HEADER_CHECK(execinfo.h) 34HEADER_CHECK(execinfo.h)
35HEADER_CHECK(libunwind.h NAME HAVE_UNWIND)
36HEADER_CHECK(mcheck.h) 35HEADER_CHECK(mcheck.h)
37HEADER_CHECK(stdlib.h) 36HEADER_CHECK(stdlib.h)
38HEADER_CHECK(sys/auxv.h) 37HEADER_CHECK(sys/auxv.h)
39HEADER_CHECK(sys/mman.h) 38HEADER_CHECK(sys/mman.h)
40HEADER_CHECK(sys/types.h) 39HEADER_CHECK(sys/types.h)
41 40
41FUNC_CHECK(backtrace INCLUDE_FILES execinfo.h)
42FUNC_CHECK(clock_gettime INCLUDE_FILES time.h) 42FUNC_CHECK(clock_gettime INCLUDE_FILES time.h)
43FUNC_CHECK(dirfd INCLUDE_FILES dirent.h sys/types.h) 43FUNC_CHECK(dirfd INCLUDE_FILES dirent.h sys/types.h)
44FUNC_CHECK(dladdr INCLUDE_FILES dlfcn.h LIBRARIES dl DEFINITIONS "-D_GNU_SOURCE=1") 44FUNC_CHECK(dladdr INCLUDE_FILES dlfcn.h LIBRARIES dl DEFINITIONS "-D_GNU_SOURCE=1")
@@ -53,6 +53,8 @@ FUNC_CHECK(getuid INCLUDE_FILES unistd.h)
53FUNC_CHECK(getxattr INCLUDE_FILES sys/types.h sys/xattr.h) 53FUNC_CHECK(getxattr INCLUDE_FILES sys/types.h sys/xattr.h)
54FUNC_CHECK(iconv INCLUDE_FILES iconv.h) 54FUNC_CHECK(iconv INCLUDE_FILES iconv.h)
55FUNC_CHECK(listxattr INCLUDE_FILES sys/types.h sys/xattr.h) 55FUNC_CHECK(listxattr INCLUDE_FILES sys/types.h sys/xattr.h)
56FUNC_CHECK(mallinfo INCLUDE_FILES malloc.h)
57FUNC_CHECK(malloc_info INCLUDE_FILES malloc.h)
56FUNC_CHECK(mmap INCLUDE_FILES sys/mman.h) 58FUNC_CHECK(mmap INCLUDE_FILES sys/mman.h)
57FUNC_CHECK(mtrace INCLUDE_FILES mcheck.h) 59FUNC_CHECK(mtrace INCLUDE_FILES mcheck.h)
58FUNC_CHECK(prctl INCLUDE_FILES sys/prctl.h) 60FUNC_CHECK(prctl INCLUDE_FILES sys/prctl.h)
@@ -67,6 +69,10 @@ TYPE_CHECK(siginfo_t INCLUDE_FILES signal.h)
67 69
68# END: HEADER, TYPE and FUNCTION CHECKS 70# END: HEADER, TYPE and FUNCTION CHECKS
69 71
72# TODO: move to a FindUnwind.cmake?
73# or is pkg-config enough these days?
74pkg_check_modules(UNWIND libunwind libunwind-generic)
75CHECK_APPEND_DEFINE(HAVE_UNWIND ${UNWIND_FOUND})
70 76
71CHECK_APPEND_DEFINE(EFL_BETA_API_SUPPORT 1) 77CHECK_APPEND_DEFINE(EFL_BETA_API_SUPPORT 1)
72if(CMAKE_THREAD_LIBS_INIT) 78if(CMAKE_THREAD_LIBS_INIT)