# =========================================================
# Deps options
# =========================================================

option(
    BUILD_TEST
    "If build unit tests using googletest"
    OFF
)

IF(${TD_WINDOWS})

    MESSAGE("build pthread Win32")
    option(
            BUILD_PTHREAD
            "If build pthread on Windows"
            ON
          )

    MESSAGE("build gnu regex for Windows")
    option(
            BUILD_GNUREGEX
            "If build gnu regex on Windows"
            ON
          )

    MESSAGE("build iconv Win32")
    option(
            BUILD_WITH_ICONV
            "If build iconv on Windows"
            ON
          )

    MESSAGE("build msvcregex Win32")
    option(
            BUILD_MSVCREGEX
            "If build msvcregex on Windows"
            ON
          )

    MESSAGE("build wcwidth Win32")
    option(
            BUILD_WCWIDTH
            "If build wcwidth on Windows"
            ON
          )

    MESSAGE("build wingetopt Win32")
    option(
            BUILD_WINGETOPT 
                "If build wingetopt on Windows"
            ON
        )
    
    option(
            TDENGINE_3
            "TDengine 3.x for taos-tools"
            ON
        )
    
    option(
            BUILD_CRASHDUMP
            "If build crashdump on Windows" 
            ON
        )

ELSEIF (TD_DARWIN_64)
    IF(${BUILD_TEST})
        add_definitions(-DCOMPILER_SUPPORTS_CXX13)
    ENDIF ()
ENDIF ()

option(
    BUILD_SHARED_LIBS
    ""
    OFF
    )

option(
    RUST_BINDINGS
    "If build with rust-bindings"
    ON
    )

option(
    JEMALLOC_ENABLED
    "If build with jemalloc"
    OFF
    )

option(
    BUILD_SANITIZER
    "If build sanitizer"
    OFF
    )

option(
    BUILD_ADDR2LINE
    "If build addr2line"
    OFF
    )

option(
    BUILD_WITH_LEVELDB 
    "If build with leveldb" 
    OFF
)

option(
    BUILD_WITH_ROCKSDB 
    "If build with rocksdb" 
    ON
)

option(
    BUILD_WITH_SQLITE
    "If build with sqlite" 
    OFF
)

option(
    BUILD_WITH_BDB
    "If build with BDB" 
    OFF
)

option(
    BUILD_WITH_LUCENE 
    "If build with lucene" 
    off 
)


option(
    BUILD_WITH_NURAFT
    "If build with NuRaft" 
    OFF
)

option(
    BUILD_WITH_UV
    "If build with libuv" 
    ON  
)

option(
    BUILD_WITH_UV_TRANS
    "If build with libuv_trans " 
    ON 
)

IF(${TD_LINUX} MATCHES TRUE)

option(
    BUILD_DEPENDENCY_TESTS 
    "If build dependency tests" 
    ON
)

ENDIF ()

option(
    BUILD_DOCS
    "If use doxygen build documents" 
    OFF
)

option(
   BUILD_WITH_INVERTEDINDEX
   "If use invertedIndex" 
   ON 
)

