cmake_minimum_required (VERSION 3.1)

# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

project(earthworm_top VERSION 0.1.0)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/CMake)

if (NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release)
endif()

#option(ET_ONLY  "Build Earthworm oly" ON)
option(WITH_REDIS "Build with Redis support" OFF)
option(WITH_MR  "Build Reflectormetor subdirectory" ON)

if(DR_ONLY)
  add_subdirectory(gen_nexus)
else()
  add_subdirectory(src)
  if(WITH_REDIS)
      add_subdirectory(bin)
      add_subdirectory(examples)
  endif()
endif()
