cmake_minimum_required(VERSION 3.0) add_executable(test_cclient test_cclient.c) add_dependencies(test_cclient paddle_pserver_cclient) if(APPLE) set(CMAKE_EXE_LINKER_FLAGS "-framework CoreFoundation -framework Security") else() set(CMAKE_EXE_LINKER_FLAGS "-pthread") endif() if(PROJ_ROOT) include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) target_link_libraries(test_cclient ${CMAKE_CURRENT_BINARY_DIR}/../libpaddle_pserver_cclient.a pthread) else(PROJ_ROOT) include_directories(${CMAKE_BINARY_DIR}) target_link_libraries(test_cclient ${CMAKE_BINARY_DIR}/libpaddle_pserver_cclient.a pthread) endif(PROJ_ROOT)