CMakeLists.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. cmake_minimum_required(VERSION 2.6.0)
  2. project(XPIR)
  3. include(CMakeCompilers.txt)
  4. enable_language(CXX ASM)
  5. if(APPLE)
  6. cmake_policy(SET CMP0042 NEW)
  7. endif()
  8. set(CMAKE_C_COMPILER "gcc")
  9. set(CMAKE_CXX_COMPILER "g++")
  10. set(CMAKE_CXX_FLAGS "-std=c++11 -fopenmp -ggdb -Wno-deprecated-declarations")
  11. set(CMAKE_EXE_LINKER_FLAGS "-fopenmp")
  12. set(BOOST_ROOT "./local")
  13. SET( Boost_USE_STATIC_LIBS FALSE )
  14. find_package(Boost 1.55.0 REQUIRED
  15. COMPONENTS atomic chrono date_time exception program_options regex system thread program_options)
  16. include_directories(${Boost_INCLUDE_DIR})
  17. link_directories(${Boost_LIBRARY_DIR})
  18. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
  19. find_package(GMP 6 REQUIRED)
  20. find_package(MPFR 3.1.2 REQUIRED)
  21. include_directories("/opt/local/include")
  22. option(SEND_CATALOG "Send the catalog to the client (default is send catalog if |catalog|<1000)" ON)
  23. if(SEND_CATALOG)
  24. message(STATUS "Send the catalog to the client")
  25. add_definitions(-DSEND_CATALOG)
  26. else()
  27. message(STATUS "Do not send the catalog to the client")
  28. endif()
  29. option(MULTI_THREAD "Use multi-threading" ON)
  30. if(MULTI_THREAD)
  31. message(STATUS "Use multi-threading")
  32. add_definitions(-DMULTI_THREAD)
  33. else()
  34. message(STATUS "Do not use multi-threading")
  35. endif()
  36. option(PERF_TIMERS "Show performance measurements during execution" ON)
  37. if(PERF_TIMERS)
  38. message(STATUS "Show performance measurements during execution")
  39. add_definitions(-DPERF_TIMERS)
  40. else()
  41. message(STATUS "Do not show performance measurements during execution")
  42. endif()
  43. add_subdirectory("apps")
  44. add_subdirectory("crypto")
  45. add_subdirectory("pir")