Commit 4ded751d authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Merge branch feature/jorgen.lind/boost_dependency with refs/heads/master into...

Merge branch feature/jorgen.lind/boost_dependency with refs/heads/master into refs/merge-requests/82/train
parents 3100191f 5facdea6
Pipeline #936 passed with stages
in 8 minutes and 38 seconds
......@@ -16,7 +16,12 @@ function(BuildAzure)
else()
set(cmake_arg -DCASABLANCA_DIR=${cpp-rest-api_INSTALL_INT_CONFIG})
endif()
BuildExternal(azure-storage ${azure-storage-cpp_VERSION} cpp-rest-api ${AzureCmakeDir} "${AZURE_LIBS_LIST}" "${AZURE_DLLS_LIST}" "" "" "${cmake_arg}")
if (BOOST_ROOT)
set(BOOST_FLAGS ";-DBOOST_ROOT=${BOOST_ROOT};")
elseif(BOOST_INCLUDEDIR)
set(BOOST_FLAGS ";-DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR};-DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR};")
endif()
BuildExternal(azure-storage ${azure-storage-cpp_VERSION} cpp-rest-api ${AzureCmakeDir} "${AZURE_LIBS_LIST}" "${AZURE_DLLS_LIST}" "" "" "${cmake_arg}${BOOST_FLAGS}")
endfunction()
......@@ -16,7 +16,12 @@ function(BuildCppRestSdk)
list(APPEND CPPRESTSDK_LIBS_LIST_RELEASE "lib${LIBSUFFIX}/libcpprest.so.2.10")
list(APPEND CPPRESTSDK_LIBS_LIST_RELEASE "lib${LIBSUFFIX}/libcpprest.so")
endif()
BuildExternal(cpp-rest-api ${cpprestapi_VERSION} "" ${cpprestapi_SOURCE_DIR} "${CPPRESTSDK_LIBS_LIST_RELEASE}" "${CPPRESTSDK_DLLS_LIST_RELEASE}" "${CPPRESTSDK_LIBS_LIST_DEBUG}" "${CPPRESTSDK_DLLS_LIST_DEBUG}" "-DCPPREST_EXCLUDE_WEBSOCKETS=ON;-DCPPREST_EXCLUDE_COMPRESSION=ON;-DCPPREST_EXCLUDE_BROTLI=ON;-DWERROR=OFF;-DBUILD_TESTS=OFF;-DBUILD_SAMPLES=OFF")
if (BOOST_ROOT)
set(BOOST_FLAGS ";-DBOOST_ROOT=${BOOST_ROOT};")
elseif(BOOST_INCLUDEDIR)
set(BOOST_FLAGS ";-DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR};-DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR};")
endif()
BuildExternal(cpp-rest-api ${cpprestapi_VERSION} "" ${cpprestapi_SOURCE_DIR} "${CPPRESTSDK_LIBS_LIST_RELEASE}" "${CPPRESTSDK_DLLS_LIST_RELEASE}" "${CPPRESTSDK_LIBS_LIST_DEBUG}" "${CPPRESTSDK_DLLS_LIST_DEBUG}" "-DCPPREST_EXCLUDE_WEBSOCKETS=ON;-DCPPREST_EXCLUDE_COMPRESSION=ON;-DCPPREST_EXCLUDE_BROTLI=ON;-DWERROR=OFF;-DBUILD_TESTS=OFF;-DBUILD_SAMPLES=OFF${BOOST_FLAGS}")
set(cpp-rest-api_INSTALL_INT_CONFIG ${cpp-rest-api_INSTALL_INT_CONFIG} PARENT_SCOPE)
#add_definitions(-DUSE_IMPORT_EXPORT)
......
......@@ -145,7 +145,9 @@ endif()
#Azure storage exposes boost_system on linux et al.
if (UNIX)
target_link_libraries(openvds_objects PUBLIC boost_system)
find_package(Boost REQUIRED COMPONENTS system date_time regex)
set_source_files_properties(IO/IOManager.cpp PROPERTIES COMPILE_FLAGS -I${Boost_INCLUDE_DIR})
set_source_files_properties(IO/IOManagerAzure.cpp PROPERTIES COMPILE_FLAGS -I${Boost_INCLUDE_DIR})
endif()
if (OpenMP_CXX_FOUND)
......
......@@ -37,6 +37,9 @@ add_test_executable(io_tests
io/InMemoryIo.cpp
io/AzureIo.cpp
)
if (UNIX)
set_source_files_properties(io/AzureIo.cpp PROPERTIES COMPILE_FLAGS -I${Boost_INCLUDE_DIR})
endif()
add_test_executable(io_performance_test
io/IoPerformance.cpp
......
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