CMakeLists.txt 1.04 KB
Newer Older
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
1 2
#------------------------------------------------------------------------------
set(sources
3
  oscillator.cpp)
4

5 6 7 8 9
if(ENABLE_SENSEI)
  list(APPEND sources
    dataadaptor.cpp
    bridge.cpp)
endif()
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
10 11 12 13
#------------------------------------------------------------------------------
# Build the util library.
add_library(util STATIC src/format.cc)
target_include_directories(util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
14

Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
15 16 17 18
#------------------------------------------------------------------------------
# Build the oscillator executable.
add_executable(oscillator ${sources})
target_compile_options(oscillator PRIVATE "-std=c++11")
19

Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
20
# Link with MPI.
21
target_link_libraries(oscillator PRIVATE mpi diy grid)
22

Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
23 24 25
# Threads
find_package(Threads)
target_link_libraries(oscillator PRIVATE util ${CMAKE_THREAD_LIBS_INIT})
26 27 28 29

if(ENABLE_SENSEI)
  target_link_libraries(oscillator PRIVATE core)
endif()
30 31

if(ENABLE_HISTOGRAM)
32 33
  target_link_libraries(oscillator PRIVATE histogram)
endif()
34

35 36 37
if(ENABLE_AUTOCORRELATION)
  target_link_libraries(oscillator PRIVATE autocorrelation)
endif()