3 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
6 #set(CMAKE_CXX_FLAGS -pg)
7 #set(CMAKE_EXE_LINKER_FLAGS -pg)
8 #set(CMAKE_SHARED_LINKER_FLAGS -pg)
10 cmake_minimum_required(VERSION 2.8)
12 find_package(Boost 1.49 COMPONENTS iostreams REQUIRED)
13 include_directories(${Boost_INCLUDE_DIRS})
15 if(NOT DEFINED ENV{MPI_DISABLED})
16 find_package(MPI REQUIRED)
17 set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
18 set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
19 include_directories(${MPI_INCLUDE_PATH})
21 message("LATLIB: MPI support is disabled!")
24 add_library(lat_datread datread.cpp)
25 target_link_libraries(lat_datread ${Boost_LIBRARIES})
27 add_library(lat_configcache configcache.cpp)
28 target_link_libraries(lat_configcache ${Boost_LIBRARIES} lat_writeout lat_datread)
30 add_library(lat_hypercache hypercache.cpp)
31 target_link_libraries(lat_hypercache lat_configcache lat_writeout)
33 add_library(lat_neigh neigh.cpp)
35 add_library(lat_writeout writeout.cpp)
36 if(DEFINED ENV{MPI_DISABLED})
37 set_target_properties(lat_writeout PROPERTIES COMPILE_DEFINITIONS "MPI_DISABLED")
40 add_library(lat_paraq paraq.cpp)
42 add_library(lat_progress progress.cpp)
46 if (OPENGL_FOUND AND GLUT_FOUND)
47 include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ../ )
48 add_library(lat_culooks culooks.cpp culooks_cube.cpp culooks_drawing.cpp)
49 target_link_libraries(lat_culooks ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} pthread)
50 add_executable(culooks_test culooks_test.cpp)
51 target_link_libraries(culooks_test lat_culooks)
54 add_executable(neigh_test neigh_test.cpp)
55 target_link_libraries(neigh_test lat_neigh)
57 add_subdirectory(o815)