v2.0.2-rc (#27)
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
## v2.0.2-rc ### BREAKING CHANGES * Refactored `config.json` - will need to verify configuration settings prior to mounting ### Issues * \#12 \[Unit Test\] Complete all providers unit tests * \#14 \[Unit Test\] SQLite mini-ORM unit tests and cleanup * \#16 Add support for bucket name in Sia provider * \#17 Update to common c++ build system * A single 64-bit Linux Jenkins server is used to build all Linux and Windows versions * All dependency sources are now included * MSVC is no longer supported * MSYS2 is required for building Windows binaries on Windows * OS X support is temporarily disabled * \#19 \[bug\] Rename file is broken for files that are existing * \#23 \[bug\] Incorrect file size displayed while upload is pending * \#24 RocksDB implementations should be transactional * \#25 Writes should block when maximum cache size is reached * \#26 Complete ring buffer and direct download support ### Changes from v2.0.1-rc * Ability to choose between RocksDB and SQLite databases * Added direct reads and implemented download fallback * Corrected file times on S3 and Sia providers * Corrected handling of `chown()` and `chmod()` * Fixed erroneous download of chunks after resize Reviewed-on: #27
This commit is contained in:
153
cmake/functions.cmake
Normal file
153
cmake/functions.cmake
Normal file
@ -0,0 +1,153 @@
|
||||
function(set_common_target_options name)
|
||||
target_compile_definitions(${name} PUBLIC
|
||||
${PROJECT_DEFINITIONS}
|
||||
${${name}_DEFINITIONS}
|
||||
)
|
||||
|
||||
target_include_directories(${name} BEFORE PUBLIC
|
||||
${PROJECT_EXTERNAL_BUILD_ROOT}/include
|
||||
)
|
||||
|
||||
target_link_directories(${name} BEFORE PUBLIC
|
||||
${PROJECT_EXTERNAL_BUILD_ROOT}/lib
|
||||
)
|
||||
|
||||
target_include_directories(${name} AFTER PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include
|
||||
${name}_INCLUDES
|
||||
)
|
||||
|
||||
if(PROJECT_DEPENDENCIES)
|
||||
add_dependencies(${name} ${PROJECT_DEPENDENCIES})
|
||||
endif()
|
||||
|
||||
if(PROJECT_STATIC_LINK)
|
||||
set_property(TARGET ${name} PROPERTY LINK_SEARCH_START_STATIC 1)
|
||||
endif()
|
||||
endfunction(set_common_target_options)
|
||||
|
||||
function(add_project_executable2 name dependencies libraries headers sources is_win32)
|
||||
if (PROJECT_WINDOWS_VERSION_RC)
|
||||
list(APPEND sources ${PROJECT_WINDOWS_VERSION_RC})
|
||||
endif()
|
||||
|
||||
add_executable(${name}
|
||||
${headers}
|
||||
${sources}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/main.cpp
|
||||
)
|
||||
|
||||
foreach(dependency ${dependencies})
|
||||
set_common_target_options(${dependency})
|
||||
endforeach()
|
||||
|
||||
set_common_target_options(${name})
|
||||
|
||||
if(dependencies)
|
||||
add_dependencies(${name} ${dependencies})
|
||||
endif()
|
||||
|
||||
target_link_libraries(${name} PRIVATE ${libraries})
|
||||
|
||||
if(PROJECT_ENABLE_SDL AND PROJECT_IS_MINGW)
|
||||
target_link_libraries(${name} PRIVATE SDL2::SDL2main)
|
||||
endif ()
|
||||
|
||||
if (is_win32 AND PROJECT_IS_MINGW)
|
||||
target_link_options(${name} PRIVATE -mwindows)
|
||||
endif()
|
||||
endfunction(add_project_executable2)
|
||||
|
||||
function(add_project_executable name dependencies libraries)
|
||||
file(GLOB_RECURSE headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.hh
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.hxx
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cxx
|
||||
)
|
||||
|
||||
if(PROJECT_ENABLE_WXWIDGETS OR PROJECT_ENABLE_SDL OR PROJECT_ENABLE_SFML OR PROJECT_ENABLE_NANA)
|
||||
set(IS_WIN32 ON)
|
||||
endif()
|
||||
|
||||
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}" "${IS_WIN32}")
|
||||
|
||||
if(PROJECT_ENABLE_WXWIDGETS)
|
||||
target_link_libraries(${name} PRIVATE ${wxWidgets_LIBRARIES})
|
||||
endif()
|
||||
endfunction(add_project_executable)
|
||||
|
||||
function(add_project_library name dependencies libraries additional_sources)
|
||||
file(GLOB_RECURSE headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.hh
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/${name}/include/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/${name}/include/${name}/include/*.hxx
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE sources
|
||||
${additional_sources}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cxx
|
||||
)
|
||||
|
||||
add_library(${name} STATIC
|
||||
${headers}
|
||||
${sources}
|
||||
)
|
||||
|
||||
set_common_target_options(${name})
|
||||
|
||||
set_target_properties(${name} PROPERTIES PREFIX "")
|
||||
target_link_libraries(${name} PRIVATE ${libraries})
|
||||
endfunction(add_project_library)
|
||||
|
||||
function(add_project_test_executable name dependencies libraries)
|
||||
if(PROJECT_ENABLE_TESTING)
|
||||
find_package(GTest ${GTEST_VERSION} REQUIRED)
|
||||
enable_testing()
|
||||
|
||||
file(GLOB_RECURSE headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/${name}/include/${name}/include/*.hxx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/${name}/include/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/include/*.hh
|
||||
${PROJECT_SUPPORT_DIR}/test/include/*.hpp
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cxx
|
||||
${PROJECT_SUPPORT_DIR}/test/src/*.cpp
|
||||
${additional_sources}
|
||||
)
|
||||
|
||||
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}" OFF)
|
||||
|
||||
target_compile_definitions(${name} PRIVATE -DPROJECT_TESTING)
|
||||
|
||||
target_include_directories(${name} SYSTEM BEFORE
|
||||
${GTEST_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_include_directories(${name} AFTER PRIVATE
|
||||
${PROJECT_SUPPORT_DIR}/test/include
|
||||
)
|
||||
|
||||
target_link_libraries(${name} PRIVATE
|
||||
GTest::gtest
|
||||
GTest::gmock
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
Reference in New Issue
Block a user