Browse Source

now it compiles and run on OSX in Release. cleaned a lot the cmakelists.txt

Marc-Olivier Killijian 8 years ago
parent
commit
41f42ec2f7

+ 1 - 1
CMakeLists.txt

@@ -16,7 +16,7 @@ set(BOOST_ROOT "./local")
 
 SET( Boost_USE_STATIC_LIBS FALSE )
 find_package(Boost 1.55.0  REQUIRED
-  COMPONENTS atomic chrono date_time exception program_options regex system thread)
+  COMPONENTS atomic chrono date_time exception program_options regex system thread program_options)
 include_directories(${Boost_INCLUDE_DIR})
 link_directories(${Boost_LIBRARY_DIR})
 	

+ 0 - 3
apps/CMakeLists.txt

@@ -7,10 +7,7 @@ add_subdirectory("simplepir")
 
 set(CMAKE_CXX_FLAGS "-std=c++11")
 set (CMAKE_EXE_LINKER_FLAGS "-fopenmp")
-if (APPLE)
-        set(CMAKE_EXE_LINKER_FLAGS "-fopenmp -L$ENV{HOME}/Code/xpir/freshxpir/xpir-ng/local/lib/ -lboost_program_options")
 
-endif()
 include_directories(..)
 include_directories(../..)
 

+ 0 - 4
apps/client/CMakeLists.txt

@@ -1,10 +1,6 @@
 cmake_minimum_required(VERSION 2.6.0)
 
 set (CMAKE_EXE_LINKER_FLAGS "-fopenmp") 
-if (APPLE)
-	set(CMAKE_EXE_LINKER_FLAGS "-fopenmp -L$ENV{HOME}/Code/xpir/freshxpir/xpir-ng/local/lib/ -lboost_program_options")
-
-endif()
 include_directories(..)
 include_directories(../..)
 

+ 0 - 14
apps/server/CMakeLists.txt

@@ -1,9 +1,5 @@
 cmake_minimum_required(VERSION 2.6.0)
 
-if (APPLE)
-	set(CMAKE_EXE_LINKER_FLAGS "-fopenmp -L$ENV{HOME}/Code/xpir/freshxpir/xpir-ng/local/lib/ -lboost_program_options")
-
-endif()
 
 include_directories(.)
 include_directories(..)
@@ -13,16 +9,6 @@ add_executable(pir_server DBDirectoryProcessor.cpp DBGenerator.cpp PIRServer.cpp
 
 target_link_libraries(pir_server pir ${Boost_LIBRARIES} ${GMP_LIBRARIES} pthread )
 
-# set (git_cmd "git")
-# set (git_arg "--version")
-# message(STATUS "git cmd: ${git_cmd}")
-# execute_process(COMMAND ${git_cmd} ${git_arg}
-#   WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-#   RESULT_VARIABLE git_result
-#   OUTPUT_VARIABLE git_ver)
-#
-# message(STATUS "git ver[${git_result}]: ${git_ver}")
-
 file(COPY "../tools/check-correctness.sh" DESTINATION ".")
 file(COPY "../tools/makedb.sh" DESTINATION ".")
 file(COPY "../tools/mkdb-correctness.sh" DESTINATION ".")

+ 0 - 5
apps/simplepir/CMakeLists.txt

@@ -1,9 +1,5 @@
 cmake_minimum_required(VERSION 2.6.0)
 
-if (APPLE)
-	set(CMAKE_EXE_LINKER_FLAGS "-fopenmp -L$ENV{HOME}/Code/xpir/freshxpir/xpir-ng/local/lib/ -lboost_program_options")
-
-endif()
 
 include_directories(.)
 include_directories(..)
@@ -14,7 +10,6 @@ file(COPY "../tools/makedb.sh" DESTINATION ".")
 
 
 add_executable(simple_pir simplePIR.cpp ../../libpir.hpp ../server/DBGenerator.cpp ../server/DBDirectoryProcessor.cpp)
-#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})
 target_link_libraries(simple_pir pir pthread ${MPFR_LIBRARIES} ${Boost_LIBRARIES} ${GMP_LIBRARIES} ${GMPXX_LIBRARIES})
 
 

+ 0 - 4
crypto/CMakeLists.txt

@@ -4,10 +4,6 @@ add_subdirectory("prng")
 
 set(CMAKE_CXX_FLAGS "-std=c++11 -fopenmp")
 set (CMAKE_EXE_LINKER_FLAGS "-fopenmp")
-if (APPLE)
-	set(CMAKE_EXE_LINKER_FLAGS "-fopenmp -L$ENV{HOME}/Code/xpir/freshxpir/xpir-ng/local/lib/ -lboost_program_options")
-
-endif()
 include_directories(..)
 
 add_library(pir_crypto STATIC

+ 3 - 3
helper_script.sh

@@ -16,16 +16,16 @@
 # *  along with XPIR.  If not, see <http://www.gnu.org/licenses/>.
 #*/
 
-#wget --no-check-certificate https://github.com/XPIR-team/XPIR-dependencies/raw/master/dependencies.tgz
+wget --no-check-certificate https://github.com/XPIR-team/XPIR-dependencies/raw/master/dependencies.tgz
 tar zxf dependencies.tgz
-#rm dependencies.tgz
+rm dependencies.tgz
 mkdir local
 
 CONFIGURE="./configure CFLAGS=-I$PWD/local/include LDFLAGS=-L$PWD/local/lib --prefix=$PWD/local/"
 
   cd dependencies/mpfr-3.1.2 && $CONFIGURE && make && make install
   cd ../..
-  cd dependencies/gmp-6.0.0 && $CONFIGURE && make && make check && make install
+  cd dependencies/gmp-6.0.0 && $CONFIGURE --enable-cxx && make && make check && make install
   cd ../..
   LOCAL_PATH="$PWD/local/ "
   # Boostrap the build module

+ 0 - 2
pir/CMakeLists.txt

@@ -32,8 +32,6 @@ add_library(pir SHARED ${PIRLIB_ASMS} ${PIRLIB_SRCS})
 target_link_libraries(pir  ${MPFR_LIBRARY} ${Boost_LIBRARIES} ${GMP_LIBRARIES} ${GOBJECT_LIBRARIES})
 install(TARGETS pir LIBRARY DESTINATION lib)
 
-#if(!APPLE)
 add_library(pir_static STATIC ${PIRLIB_ASMS} ${PIRLIB_SRCS})
 target_link_libraries(pir_static ${MPFR_LIBRARY} ${Boost_LIBRARIES} ${GMP_LIBRARY} ${GOBJECT_LIBRARIES} gmp libgmp )
 install(TARGETS pir_static ARCHIVE DESTINATION lib)
-#endif()