options.cmake 1.5 KB
Newer Older
O
overweight 已提交
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
# build which type of lcr library
option(USESHARED "set type of libs, default is shared" ON)
if (USESHARED STREQUAL "ON")
    set(LIBTYPE "SHARED")
    message("--  Build shared library")
else ()
    set(LIBTYPE "STATIC")
    message("--  Build static library")
endif()

option(ENABLE_GRPC "use grpc as connector" ON)
if (ENABLE_GRPC STREQUAL "ON")
    add_definitions(-DGRPC_CONNECTOR)
    set(GRPC_CONNECTOR 1)
endif()

option(ENABLE_SYSTEMD_NOTIFY "enable systemd notify" ON)
if (ENABLE_SYSTEMD_NOTIFY STREQUAL "ON")
    add_definitions(-DSYSTEMD_NOTIFY)
    set(SYSTEMD_NOTIFY 1)
endif()

option(ENABLE_OPENSSL_VERIFY "use ssl with connector" ON)
if (ENABLE_OPENSSL_VERIFY STREQUAL "ON")
    add_definitions(-DOPENSSL_VERIFY)
    set(OPENSSL_VERIFY 1)
endif()

L
LiuHao 已提交
29
option(PACKAGE "set isulad package" ON)
O
overweight 已提交
30
if (PACKAGE STREQUAL "ON")
L
LiuHao 已提交
31
    set(ISULAD_PACKAGE "iSulad")
O
overweight 已提交
32 33
endif()

L
LiuHao 已提交
34
option(VERSION "set isulad version" ON)
O
overweight 已提交
35
if (VERSION STREQUAL "ON")
L
lifeng68 已提交
36
    set(ISULAD_VERSION "2.0.5")
O
overweight 已提交
37 38
endif()

L
LiuHao 已提交
39
option(DEBUG "set isulad gcc option" ON)
O
overweight 已提交
40 41 42 43
if (DEBUG STREQUAL "ON")
    add_definitions("-g -O2")
endif()

L
LiuHao 已提交
44
option(GCOV "set isulad gcov option" OFF)
O
overweight 已提交
45 46 47
if (GCOV STREQUAL "ON")
    set(ISULAD_GCOV "ON")
endif()
O
openeuler-iSula 已提交
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

# set OCI image server type
option(DISABLE_OCI "disable oci image" OFF)
if (DISABLE_OCI STREQUAL "ON")
    message("Disable OCI image")
else()
    add_definitions(-DENABLE_OCI_IMAGE=1)
    set(ENABLE_OCI_IMAGE 2)
endif()

option(ENABLE_EMBEDDED "enable embedded image" OFF)
if (ENABLE_EMBEDDED STREQUAL "ON")
    add_definitions(-DENABLE_EMBEDDED_IMAGE=1)
    set(ENABLE_EMBEDDED_IMAGE 1)
endif()