Commit b6c8039f authored by Martin Killenberg's avatar Martin Killenberg
Browse files

changed CMakeLists.txt so the server does not unnecessarily depend on the bosst unit test library

parent e1009f6f
...@@ -24,6 +24,11 @@ include(cmake/add_dependency.cmake) ...@@ -24,6 +24,11 @@ include(cmake/add_dependency.cmake)
add_dependency(DOOCS 18.10.9 COMPONENTS server REQUIRED) add_dependency(DOOCS 18.10.9 COMPONENTS server REQUIRED)
#add_dependency(doocs-server-test-helper 0.3 REQUIRED) maybe needed later #add_dependency(doocs-server-test-helper 0.3 REQUIRED) maybe needed later
#First run 'find boost' without the unit test frame work and store the libraries
#We don't unnecessarily link the server to the unit test framework.
FIND_PACKAGE(Boost COMPONENTS system REQUIRED)
set(Boost_LIBS_FOR_SERVER ${Boost_LIBRARIES})
FIND_PACKAGE(Boost COMPONENTS system unit_test_framework REQUIRED) FIND_PACKAGE(Boost COMPONENTS system unit_test_framework REQUIRED)
ENABLE_TESTING() ENABLE_TESTING()
...@@ -77,7 +82,7 @@ add_library(GpsdoDevice ${gpsdio_device_sources}) ...@@ -77,7 +82,7 @@ add_library(GpsdoDevice ${gpsdio_device_sources})
add_executable(${PROJECT_NAME} ${server_sources} ) add_executable(${PROJECT_NAME} ${server_sources} )
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS " ${DOOCS_CXX_FLAGS}") set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS " ${DOOCS_CXX_FLAGS}")
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS ${DOOCS_LINK_FLAGS}) set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS ${DOOCS_LINK_FLAGS})
target_link_libraries(${PROJECT_NAME} ${DOOCS_LIBRARIES} ${Boost_LIBRARIES} GpsdoDevice) target_link_libraries(${PROJECT_NAME} ${DOOCS_LIBRARIES} ${Boost_LIBS_FOR_SERVER} GpsdoDevice)
# Copy the RPC_LIBNO # Copy the RPC_LIBNO
FILE(COPY ${CMAKE_SOURCE_DIR}/doocs_gpsdo_server/RPC_LIBNO DESTINATION ${PROJECT_BINARY_DIR}) FILE(COPY ${CMAKE_SOURCE_DIR}/doocs_gpsdo_server/RPC_LIBNO DESTINATION ${PROJECT_BINARY_DIR})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment