CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829
  1. cmake_minimum_required(VERSION 2.6.0)
  2. if (APPLE)
  3. set(CMAKE_EXE_LINKER_FLAGS "-fopenmp -L$ENV{HOME}/Code/xpir/freshxpir/xpir-ng/local/lib/ -lboost_program_options")
  4. endif()
  5. include_directories(.)
  6. include_directories(..)
  7. include_directories(../..)
  8. add_custom_target(build-time-make-directory-simple-pir ALL COMMAND ${CMAKE_COMMAND} -E make_directory "db")
  9. file(COPY "../tools/makedb.sh" DESTINATION ".")
  10. add_executable(simple_pir simplePIR.cpp ../../libpir.hpp ../server/DBGenerator.cpp ../server/DBDirectoryProcessor.cpp)
  11. #target_link_libraries(simple_pir pir_server_pir pir_query_gen pir_reply pir pir_client_events pir_client_optim pthread ${MPFR_LIBRARIES} ${Boost_LIBRARIES} ${GMP_LIBRARIES} ${GMPXX_LIBRARIES})
  12. target_link_libraries(simple_pir pir pthread ${MPFR_LIBRARIES} ${Boost_LIBRARIES} ${GMP_LIBRARIES} ${GMPXX_LIBRARIES})
  13. add_custom_command(
  14. OUTPUT .simplepirdb
  15. WORKING_DIR ${PROJECT_BINARY_DIR}/apps/simplepir
  16. COMMAND ./makedb.sh 1024 16 2>/dev/null
  17. COMMAND touch .simplepirdb
  18. )
  19. add_custom_target(simplepirdb ALL DEPENDS .simplepirdb)