CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(blackhole)

SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

SET(BLACKHOLE_VERSION_MAJOR 0)
SET(BLACKHOLE_VERSION_MINOR 2)
SET(BLACKHOLE_VERSION_PATCH 0)
SET(BLACKHOLE_VERSION "${BLACKHOLE_VERSION_MAJOR}.${BLACKHOLE_VERSION_MINOR}.${BLACKHOLE_VERSION_PATCH}")

OPTION(BLACKHOLE_HEADER_ONLY "Build as header-only library" ON)
OPTION(BLACKHOLE_DEBUG "Enable debugging messages support" ON)
OPTION(ENABLE_TESTING "Enable testing" ON)
OPTION(ENABLE_EXAMPLES "Enable examples" ON)
OPTION(ENABLE_BENCHMARKING "Enable benchmarking" OFF)
OPTION(ENABLE_ELASTICSEARCH "Enable elasticsearch sink" OFF)
OPTION(ENABLE_ELASTICSEARCH_DEBUG "Enable elasticsearch debug" OFF)

CONFIGURE_FILE(
    "${PROJECT_SOURCE_DIR}/config.hpp.in"
    "${PROJECT_SOURCE_DIR}/src/blackhole/config.hpp"
)

IF(ENABLE_TESTING)
    ENABLE_TESTING()
ENDIF()

ADD_SUBDIRECTORY(src)


CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(blackhole)

SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

SET(BLACKHOLE_VERSION_MAJOR 0)
SET(BLACKHOLE_VERSION_MINOR 2)
SET(BLACKHOLE_VERSION_PATCH 0)
SET(BLACKHOLE_VERSION "${BLACKHOLE_VERSION_MAJOR}.${BLACKHOLE_VERSION_MINOR}.${BLACKHOLE_VERSION_PATCH}")

OPTION(BLACKHOLE_HEADER_ONLY "Build as header-only library" ON)
OPTION(BLACKHOLE_DEBUG "Enable debugging messages support" ON)
OPTION(ENABLE_TESTING "Enable testing" OFF)
OPTION(ENABLE_EXAMPLES "Enable examples" OFF)
OPTION(ENABLE_BENCHMARKING "Enable benchmarking" OFF)
OPTION(ENABLE_ELASTICSEARCH "Enable elasticsearch sink" OFF)
OPTION(ENABLE_ELASTICSEARCH_DEBUG "Enable elasticsearch debug" OFF)

CONFIGURE_FILE(
    "${PROJECT_SOURCE_DIR}/config.hpp.in"
    "${PROJECT_SOURCE_DIR}/src/blackhole/config.hpp"
)

IF(ENABLE_TESTING)
    ENABLE_TESTING()
ENDIF()

ADD_SUBDIRECTORY(src)


Disable tests and examples by default.
[Project] Disable tests and examples by default.
