-
Notifications
You must be signed in to change notification settings - Fork 350
Cobrazz improvements #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yoori
wants to merge
10
commits into
userver-framework:develop
Choose a base branch
from
yoori:userver_cobrazz_improvements
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Cobrazz improvements #316
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a4228b0
Cobrazz improvements
yoori b39fa25
adapt rpm spec for build static libraries
yoori a1f5b25
adapt rpm spec for build static libraries
yoori c3d3308
adapt rpm spec for build static libraries
yoori 2b5ae61
adapt rpm spec for build static libraries
yoori b08f4ff
adapt rpm spec for build static libraries
yoori 24f3ed6
Http integration with cobrazz
arbogdanov 9d0fa86
added install of required files
yoori 220cf6a
fix double include error for cmake
yoori 846405e
Replace BLOCK_SIZE moodycamel constant for solve conflict with unix s…
yoori File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,37 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON) | |
| set (CMAKE_CXX_EXTENSIONS OFF) | ||
| set (CMAKE_VISIBILITY_INLINES_HIDDEN ON) | ||
|
|
||
| add_compile_options ("-pipe" "-g" "-gz" "-fPIC") | ||
| function(remove_option OUT_LIST_NAME IN_LIST_NAME REMOVE_ITEM) | ||
| string(REPLACE " " ";" LOCAL_LIST "${IN_LIST_NAME}") | ||
| list (REMOVE_ITEM LOCAL_LIST "${REMOVE_ITEM}") | ||
| string(REPLACE ";" " " LOCAL_LIST "${LOCAL_LIST}") | ||
| set(${OUT_LIST_NAME} "${LOCAL_LIST}" PARENT_SCOPE) | ||
| endfunction() | ||
|
|
||
| # remove default -g debug option (we will add it if required) | ||
| remove_option(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" "-g") | ||
| set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING "Flags used by the C compiler during DEBUG builds" FORCE) | ||
| remove_option(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" "-g") | ||
| set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "Flags used by the CXX compiler during DEBUG builds" FORCE) | ||
|
|
||
| remove_option(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}" "-g") | ||
| set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}" CACHE STRING "Flags used by the C compiler during RELWITHDEBINFO builds" FORCE) | ||
| remove_option(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" "-g") | ||
| set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" CACHE STRING "Flags used by the CXX compiler during RELEASE builds" FORCE) | ||
|
|
||
| if (USERVER_GEN_GDB_DEBUGINFO) | ||
| set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ggdb3") | ||
| set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3") | ||
| set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -ggdb3") | ||
| set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3") | ||
| else () | ||
| set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -gz") | ||
| set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -gz") | ||
| set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -gz") | ||
| set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -gz") | ||
| endif() | ||
|
|
||
| add_compile_options ("-pipe" "-fPIC") | ||
| add_definitions ("-DPIC") | ||
| add_definitions(-DUSERVER) | ||
|
|
||
|
|
@@ -140,4 +170,8 @@ else () | |
| add_definitions(-D_FORTIFY_SOURCE=2) | ||
| endif () | ||
|
|
||
| if (UNIX AND BUILD_SHARED_LIBS) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do not support building userver as a dynamic library. Doing so will result in performance drops (we rely on LTO heavily) and bugs around non-constexpr |
||
| link_libraries(dl) | ||
| endif () | ||
|
|
||
| enable_testing () | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| function(userver_add_library NAME) | ||
|
|
||
| set(options) | ||
| set(one_value_args) | ||
| set(multi_value_args | ||
| SOURCES | ||
| PUBLIC_LINK_LIBRARIES | ||
| PRIVATE_LINK_LIBRARIES | ||
| ) | ||
| cmake_parse_arguments(USERVER_ADD_LIBRARY "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN}) | ||
|
|
||
| if (BUILD_SHARED_LIBS) | ||
| add_library(${NAME} SHARED ${USERVER_ADD_LIBRARY_SOURCES}) | ||
|
|
||
| set_property(TARGET "${NAME}" PROPERTY POSITION_INDEPENDENT_CODE 1) | ||
|
|
||
| target_link_libraries(${NAME} | ||
| PUBLIC | ||
| ${USERVER_ADD_LIBRARY_PUBLIC_LINK_LIBRARIES} | ||
| PRIVATE | ||
| ${USERVER_ADD_LIBRARY_PRIVATE_LINK_LIBRARIES} | ||
| ) | ||
| else() | ||
| add_library(${NAME} STATIC ${USERVER_ADD_LIBRARY_SOURCES}) | ||
|
|
||
| target_link_libraries(${NAME} | ||
| PUBLIC | ||
| ${USERVER_ADD_LIBRARY_PUBLIC_LINK_LIBRARIES} | ||
| PRIVATE | ||
| ${USERVER_ADD_LIBRARY_PRIVATE_LINK_LIBRARIES} | ||
| ) | ||
| endif() | ||
|
|
||
| endfunction() | ||
|
|
||
| function(userver_target_link_libraries NAME) | ||
| set(options) | ||
| set(one_value_args) | ||
| set(multi_value_args | ||
| PUBLIC | ||
| PRIVATE | ||
| STATIC_PRIVATE | ||
| ) | ||
| cmake_parse_arguments(USERVER_ADD_LIBRARY "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN}) | ||
|
|
||
| if(BUILD_SHARED_LIBS) | ||
| target_link_libraries(${NAME} | ||
| PUBLIC | ||
| ${USERVER_ADD_LIBRARY_PUBLIC} | ||
| ${USERVER_ADD_LIBRARY_PRIVATE} | ||
| PRIVATE | ||
| ${USERVER_ADD_LIBRARY_STATIC_PRIVATE} | ||
| ) | ||
| else() | ||
| target_link_libraries(${NAME} | ||
| PUBLIC | ||
| ${USERVER_ADD_LIBRARY_PUBLIC} | ||
| PRIVATE | ||
| ${USERVER_ADD_LIBRARY_PRIVATE} | ||
| ${USERVER_ADD_LIBRARY_STATIC_PRIVATE} | ||
| ) | ||
| endif() | ||
|
|
||
| endfunction() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| function(userver_install_library) | ||
|
|
||
| set(options) | ||
| set(one_value_args) | ||
| set(multi_value_args TARGETS INCLUDE_DIR) | ||
| cmake_parse_arguments(USERVER_INSTALL "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN}) | ||
|
|
||
| install(TARGETS ${USERVER_INSTALL_TARGETS} EXPORT userver-targets | ||
| PUBLIC_HEADER DESTINATION include) | ||
|
|
||
| if (NOT DEFINED USERVER_INSTALL_INCLUDE_DIR) | ||
| set(USERVER_INSTALL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/") | ||
| endif() | ||
|
|
||
| install(DIRECTORY "${USERVER_INSTALL_INCLUDE_DIR}/" | ||
| DESTINATION "include" | ||
| FILES_MATCHING | ||
| PATTERN "*.hpp" | ||
| PATTERN "*.ipp" | ||
| PATTERN "*.h" | ||
| PATTERN "*.inc" | ||
| ) | ||
|
|
||
| endfunction() | ||
|
|
||
| function(userver_export) | ||
| set(options) | ||
| set(one_value_args) | ||
| set(multi_value_args TARGETS) | ||
| cmake_parse_arguments(USERVER_EXPORT "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN}) | ||
|
|
||
| install(TARGETS ${USERVER_EXPORT_TARGETS} EXPORT userver-targets | ||
| PUBLIC_HEADER DESTINATION include) | ||
|
|
||
| endfunction() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| @PACKAGE_INIT@ | ||
|
|
||
| find_package(PkgConfig REQUIRED) | ||
|
|
||
| find_package(Threads REQUIRED) | ||
| find_package(Boost COMPONENTS filesystem program_options iostreams regex locale coroutine REQUIRED) | ||
| find_package(CURL REQUIRED) | ||
| find_package(OpenSSL REQUIRED) | ||
| find_package(Iconv REQUIRED) | ||
| find_package(ZLIB REQUIRED) | ||
|
|
||
| find_package(yaml-cpp REQUIRED) | ||
| add_library(libyamlcpp INTERFACE) | ||
| target_link_libraries(libyamlcpp INTERFACE ${YAML_CPP_LIBRARIES}) | ||
|
|
||
| pkg_check_modules (JEMALLOC jemalloc) | ||
| pkg_search_module(JEMALLOC REQUIRED jemalloc) | ||
| add_library(Jemalloc INTERFACE) | ||
| target_link_libraries(Jemalloc INTERFACE ${JEMALLOC_LIBRARIES}) | ||
|
|
||
| pkg_check_modules (LIBCARES libcares) | ||
| pkg_search_module(LIBCARES REQUIRED libcares) | ||
| add_library(c-ares INTERFACE) | ||
| target_link_libraries(c-ares INTERFACE ${LIBCARES_LIBRARIES}) | ||
|
|
||
| pkg_check_modules (LIBCRYPTOPP cryptopp) | ||
| pkg_search_module(LIBCRYPTOPP REQUIRED cryptopp) | ||
| add_library(CryptoPP INTERFACE) | ||
| target_link_libraries(CryptoPP INTERFACE ${LIBCRYPTOPP_LIBRARIES}) | ||
|
|
||
| pkg_check_modules (LIBEV libevent) | ||
| pkg_search_module(LIBEV REQUIRED libevent) | ||
| add_library(LibEv INTERFACE) | ||
| target_link_libraries(LibEv INTERFACE ${LIBEV_LIBRARIES}) | ||
|
|
||
| add_library(Http_Parser INTERFACE) | ||
| target_link_libraries(Http_Parser INTERFACE http_parser) | ||
|
|
||
| set(CMAKE_CONFIG_TARGETS_FILE @CMAKE_CONFIG_TARGETS_FILE@) | ||
| include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_CONFIG_TARGETS_FILE}") | ||
|
|
||
| check_required_components(userver) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few lines above we already do this, so the root_path should be already a real path. Are we missing something?