CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. cmake_minimum_required(VERSION 2.6.0)
  2. include_directories(.)
  3. include_directories(..)
  4. include_directories(../..)
  5. add_executable(pir_server PIRServer.cpp PIRSession.cpp ServerService.cpp main.cpp)
  6. target_link_libraries(pir_server pir ${Boost_LIBRARIES} ${GMP_LIBRARIES} pthread )
  7. file(COPY "../tools/check-correctness.sh" DESTINATION ".")
  8. file(COPY "../tools/makedb.sh" DESTINATION ".")
  9. file(COPY "../tools/mkdb-correctness.sh" DESTINATION ".")
  10. add_custom_command(
  11. OUTPUT .db
  12. WORKING_DIR ${PROJECT_BINARY_DIR}/apps/server
  13. COMMAND ./makedb.sh 1024 16 2>/dev/null
  14. COMMAND touch .db
  15. )
  16. add_custom_target(db ALL DEPENDS .db)
  17. add_custom_command(
  18. OUTPUT .db-correct
  19. WORKING_DIR ${PROJECT_BINARY_DIR}/apps/server
  20. COMMAND ./mkdb-correctness.sh
  21. COMMAND touch .db-correct
  22. )
  23. add_custom_target(dbcorrect DEPENDS .db-correct)
  24. add_custom_command(
  25. OUTPUT .check
  26. WORKING_DIR ${PROJECT_BINARY_DIR}/apps/server
  27. COMMAND ./check-correctness.sh
  28. )
  29. add_custom_target(check DEPENDS .check dbcorrect pir_client pir_server)