File: BuildLibEIO.cmake

package info (click to toggle)
tarantool-lts 1.5.5.37.g1687c02-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 15,124 kB
  • ctags: 18,819
  • sloc: ansic: 118,797; cpp: 22,178; sh: 18,496; xml: 10,692; python: 2,083; java: 1,759; perl: 972; makefile: 719; ruby: 84
file content (29 lines) | stat: -rw-r--r-- 917 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# A macro to build the bundled libeio
macro(libeio_build)
    set(eio_compile_flags)

    set(eio_compile_flags "${eio_compile_flags} -Wno-unused-value")
    set(eio_compile_flags "${eio_compile_flags} -Wno-dangling-else")
    set(eio_compile_flags "${eio_compile_flags} -DENABLE_BUNDLED_LIBEIO=1")
    set(eio_compile_flags "${eio_compile_flags} -DEIO_STACKSIZE=0")

    set(eio_src
        ${PROJECT_SOURCE_DIR}/third_party/tarantool_eio.c
    )

    add_library(eio STATIC ${eio_src})

    set_target_properties(eio PROPERTIES COMPILE_FLAGS "${eio_compile_flags}")

    set(LIBEIO_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party)
    set(LIBEIO_LIBRARIES eio)

    message(STATUS "Use bundled libeio includes: "
        "${LIBEIO_INCLUDE_DIR}/tarantool_eio.h")
    message(STATUS "Use bundled libeio library: "
        "${LIBEIO_LIBRARIES}")

    unset(eio_src)
    unset(eio_compile_flags)
endmacro(libeio_build)