1 cmake_minimum_required(VERSION 2.8)
5 if(NOT DEFINED ENV{MPI_DISABLED})
6 find_package(MPI REQUIRED)
7 set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
8 set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
9 include_directories(${MPI_INCLUDE_PATH})
11 message("O815: MPI support is disabled!")
14 SET(CMAKE_BUILD_TYPE Release)
16 add_library(o815 o815.cpp obs.cpp sim.cpp)
17 target_link_libraries(o815 ${MPI_LIBRARIES} lat_paraq lat_writeout lat_hypercache lat_progress)
18 if(DEFINED ENV{MPI_DISABLED})
19 set_target_properties(o815 PROPERTIES COMPILE_DEFINITIONS "MPI_DISABLED")