Update boost

This commit is contained in:
Sebastian Messmer 2021-04-18 00:49:26 -07:00
parent 25ccafda9e
commit 42169308b3
10 changed files with 36 additions and 33 deletions

View File

@ -93,8 +93,7 @@ endfunction(target_enable_style_warnings)
# Add boost to the project
#
# Uses:
# target_add_boost(buildtarget) # if you're only using header-only boost libs
# target_add_boost(buildtarget system filesystem) # list all libraries to link against in the dependencies
# target_add_boost(buildtarget)
##################################################
function(target_add_boost TARGET)
target_link_libraries(${TARGET} PUBLIC CryfsDependencies_boost)

View File

@ -5,38 +5,42 @@ class CryFSConan(ConanFile):
requires = [
"range-v3/0.11.0@ericniebler/stable",
"spdlog/1.8.5",
"boost/1.75.0",
]
generators = "cmake"
default_options = {
# Need to disable boost-math because that doesn't compile for some reason on CI
"boost:without_math": True,
"boost:without_wave": True,
"boost:without_container": True,
"boost:without_exception": True,
"boost:system_no_deprecated": True,
"boost:asio_no_deprecated": True,
"boost:filesystem_no_deprecated": True,
"boost:without_atomic": False, # needed by boost thread
"boost:without_chrono": False, # needed by CryFS
"boost:without_container": False, # needed by boost thread
"boost:without_context": True,
"boost:without_contract": True,
"boost:without_coroutine": True,
"boost:without_date_time": False, # needed by boost thread
"boost:without_exception": False, # needed by boost thread
"boost:without_fiber": True,
"boost:without_filesystem": False, # needed by CryFS
"boost:without_graph": True,
"boost:without_graph_parallel": True,
"boost:without_iostreams": True,
"boost:without_json": True,
"boost:without_locale": True,
"boost:without_log": True,
"boost:without_math": True,
"boost:without_mpi": True,
"boost:without_nowide": True,
"boost:without_program_options": False, # needed by CryFS
"boost:without_python": True,
"boost:without_random": True,
"boost:without_regex": True,
"boost:without_mpi": True,
"boost:without_serialization": True,
"boost:without_coroutine": True,
"boost:without_fiber": True,
"boost:without_context": True,
"boost:without_timer": True,
"boost:without_date_time": True,
"boost:without_atomic": True,
"boost:without_graph_parallel": True,
"boost:without_python": True,
"boost:without_serialization": False, # needed by boost date_time
"boost:without_stacktrace": True,
"boost:without_system": False, # needed by CryFS
"boost:without_test": True,
"boost:without_thread": False, # needed by CryFS
"boost:without_timer": True,
"boost:without_type_erasure": True,
"boost:without_wave": True,
}
def requirements(self):
if self.settings.os == "Macos":
self.requires("boost/1.73.0@conan/stable")
elif self.settings.os == "Windows":
self.requires("boost/1.69.0@conan/stable")
else:
self.requires("boost/1.65.1@conan/stable")

View File

@ -23,6 +23,6 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES})
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils blockstore)
target_add_boost(${PROJECT_NAME} filesystem system thread)
target_add_boost(${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})

View File

@ -36,6 +36,6 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES})
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils)
target_add_boost(${PROJECT_NAME} filesystem system thread)
target_add_boost(${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})

View File

@ -91,7 +91,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS})
target_link_libraries(${PROJECT_NAME} PUBLIC CryfsDependencies_spdlog cryptopp CryfsDependencies_range-v3)
target_add_boost(${PROJECT_NAME} filesystem system thread chrono)
target_add_boost(${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})

View File

@ -11,7 +11,7 @@ add_library(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils cryfs fspp-fuse)
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})
target_add_boost(${PROJECT_NAME} program_options)
target_add_boost(${PROJECT_NAME})
add_executable(${PROJECT_NAME}_bin main_unmount.cpp)
set_target_properties(${PROJECT_NAME}_bin PROPERTIES OUTPUT_NAME cryfs-unmount)

View File

@ -51,7 +51,7 @@ set(LIB_SOURCES
add_library(${PROJECT_NAME} STATIC ${LIB_SOURCES})
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils fspp-interface blockstore blobstore gitversion)
target_add_boost(${PROJECT_NAME} chrono) # TODO Check that dependent projects don't get boost added (use PRIVATE here)
target_add_boost(${PROJECT_NAME}) # TODO Check that dependent projects don't get boost added (use PRIVATE here)
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})

View File

@ -15,6 +15,6 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES})
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils)
target_add_boost(${PROJECT_NAME} filesystem system)
target_add_boost(${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})

View File

@ -11,7 +11,7 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES})
target_compile_definitions(${PROJECT_NAME} PUBLIC _FILE_OFFSET_BITS=64)
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils fspp-interface)
target_add_boost(${PROJECT_NAME} filesystem system thread chrono)
target_add_boost(${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})

View File

@ -9,6 +9,6 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES})
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils)
target_add_boost(${PROJECT_NAME} thread)
target_add_boost(${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})