CMakeLists.txt 2.43 KB
Newer Older
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
1
cmake_minimum_required(VERSION 3.0)
2
project(sensei)
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
3
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
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
include(CMakeDependentOption)

# Default to release.
if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE "Release"
    CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
#------------------------------------------------------------------------------
# Set default output directories.
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

#------------------------------------------------------------------------------
# Disable this option to build the miniapps without using any of the
# infrastructures, including the Sensei adaptor/brige.
option(ENABLE_SENSEI "Enable Sensei infrastucture" ON)

#------------------------------------------------------------------------------
# Options to enable various miniapps.
option(ENABLE_PARALLEL3D "Enable Parallel3D miniapp" ON)
option(ENABLE_OSCILLATORS "Enable Oscillators miniapp" ON)

# Options to enable various analysis.
option(ENABLE_HISTOGRAM "Enable histogram analysis" ON)
30
option(ENABLE_AUTOCORRELATION "Enable autocorrelation analysis" ON)
31 32 33 34 35 36

# Options to enable various infrastructures.



#------------------------------------------------------------------------------
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
37 38
include(mpi)

39 40
add_subdirectory(utils)

41 42 43 44 45 46 47 48 49 50
# Process subdirectories.
if(ENABLE_SENSEI)
  message(STATUS "Enabled: Sensei infrastructure.")
  add_subdirectory(core)
else()
  message(STATUS "Disabled: Sensei infrastructure.")
endif()

if(ENABLE_HISTOGRAM)
  message(STATUS "Enabled: Histogram analysis.")
51
  add_subdirectory(analysis/histogram)
52 53 54 55
else()
  message(STATUS "Disabled: Histogram analysis.")
endif()

56 57
if(ENABLE_AUTOCORRELATION)
  message(STATUS "Enabled: Autocorrelation analysis.")
58
  add_subdirectory(analysis/autocorrelation)
59 60 61 62
else()
  message(STATUS "Disabled: Autocorrelation analysis.")
endif()

63 64
if(ENABLE_PARALLEL3D)
  message(STATUS "Enabled: Parallel3D miniapp.")
65
  add_subdirectory(miniapps/parallel3d)
66 67 68
else()
  message(STATUS "Disabled: Parallel3D miniapp.")
endif()
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
69 70 71

if(ENABLE_OSCILLATORS)
  message(STATUS "Enabled: Oscillators miniapp.")
72
  add_subdirectory(miniapps/oscillators)
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
73 74 75
else()
  message(STATUS "Disabled: Histogram miniapp.")
endif()