]> git.treefish.org Git - phys/latlib.git/blobdiff - o815/CMakeLists.txt
Removed precalcless jack function.
[phys/latlib.git] / o815 / CMakeLists.txt
index b50568c5b74c307d810a4ff88e9aa9e8b8ce352a..f941c103702ea2c515b9aa5a551307a0b87f47e7 100644 (file)
@@ -2,12 +2,19 @@ cmake_minimum_required(VERSION 2.8)
 
 project(o815)
 
 
 project(o815)
 
-find_package(MPI REQUIRED)
-set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
-set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
-include_directories(${MPI_INCLUDE_PATH})
+if(NOT DEFINED ENV{MPI_DISABLED})
+  find_package(MPI REQUIRED)
+  set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
+  set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
+  include_directories(${MPI_INCLUDE_PATH})
+else()
+  message("O815: MPI support is disabled!")
+endif()
 
 SET(CMAKE_BUILD_TYPE Release)
 
 add_library(o815 o815.cpp obs.cpp sim.cpp)
 target_link_libraries(o815 ${MPI_LIBRARIES} lat_paraq lat_writeout lat_hypercache lat_progress)
 
 SET(CMAKE_BUILD_TYPE Release)
 
 add_library(o815 o815.cpp obs.cpp sim.cpp)
 target_link_libraries(o815 ${MPI_LIBRARIES} lat_paraq lat_writeout lat_hypercache lat_progress)
+if(DEFINED ENV{MPI_DISABLED})
+  set_target_properties(o815 PROPERTIES COMPILE_DEFINITIONS "MPI_DISABLED")
+endif()