-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[avro-cpp] Update to 1.12.1 #49296
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
Merged
Merged
[avro-cpp] Update to 1.12.1 #49296
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,97 +1,20 @@ | ||
| diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt | ||
| index 19059a4..c49e9c2 100644 | ||
| index 6800d330f..c9ec221d9 100644 | ||
| --- a/lang/c++/CMakeLists.txt | ||
| +++ b/lang/c++/CMakeLists.txt | ||
| @@ -58,17 +58,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}) | ||
| if (WIN32 AND NOT CYGWIN AND NOT MSYS) | ||
| @@ -70,12 +70,12 @@ if (WIN32 AND NOT CYGWIN AND NOT MSYS) | ||
| add_definitions (/EHa) | ||
| add_definitions ( | ||
| - -DNOMINMAX | ||
| - -DBOOST_REGEX_DYN_LINK | ||
| - -DBOOST_FILESYSTEM_DYN_LINK | ||
| -DNOMINMAX | ||
| - -DBOOST_SYSTEM_DYN_LINK | ||
| - -DBOOST_IOSTREAMS_DYN_LINK | ||
| - -DBOOST_PROGRAM_OPTIONS_DYN_LINK | ||
| - -DBOOST_ALL_NO_LIB) | ||
| + -DNOMINMAX) | ||
| + ) | ||
| endif() | ||
|
|
||
| if (CMAKE_COMPILER_IS_GNUCXX) | ||
| - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wuseless-cast -Wconversion -pedantic -Werror") | ||
| + # Remove " -Werror" because of warning from boost-math (will require C++ 14 soon) | ||
| + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wuseless-cast -Wconversion -pedantic") | ||
| if (AVRO_ADD_PROTECTOR_FLAGS) | ||
| set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-all -D_GLIBCXX_DEBUG") | ||
| # Unset _GLIBCXX_DEBUG for avrogencpp.cc because using Boost Program Options | ||
| @@ -82,16 +77,7 @@ endif () | ||
| find_package (Boost 1.38 REQUIRED | ||
| COMPONENTS filesystem iostreams program_options regex system) | ||
| endif () | ||
|
|
||
| -include(FetchContent) | ||
| -FetchContent_Declare( | ||
| - fmt | ||
| - GIT_REPOSITORY https://github.com/fmtlib/fmt.git | ||
| - GIT_TAG 10.2.1 | ||
| - GIT_PROGRESS TRUE | ||
| - USES_TERMINAL_DOWNLOAD TRUE | ||
| -) | ||
| -FetchContent_MakeAvailable(fmt) | ||
| - | ||
| +find_package(fmt CONFIG REQUIRED) | ||
| find_package(Snappy) | ||
| if (SNAPPY_FOUND) | ||
| set(SNAPPY_PKG libsnappy) | ||
| @@ -128,7 +114,7 @@ set (AVRO_SOURCE_FILES | ||
| impl/CustomAttributes.cc | ||
| ) | ||
|
|
||
| -add_library (avrocpp SHARED ${AVRO_SOURCE_FILES}) | ||
| +add_library (avrocpp ${AVRO_SOURCE_FILES}) | ||
|
|
||
| set_property (TARGET avrocpp | ||
| APPEND PROPERTY COMPILE_DEFINITIONS AVRO_DYN_LINK) | ||
| @@ -194,6 +180,7 @@ target_include_directories(avrocpp PUBLIC | ||
| $<INSTALL_INTERFACE:include> | ||
| ) | ||
|
|
||
| +if(BUILD_TESTING) | ||
| enable_testing() | ||
|
|
||
| macro (unittest name) | ||
| @@ -220,23 +207,26 @@ unittest (CommonsSchemasTests) | ||
| add_dependencies (AvrogencppTestReservedWords cpp_reserved_words_hh) | ||
|
|
||
| add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh | ||
| - tweet_hh | ||
| - union_array_union_hh union_map_union_hh union_conflict_hh | ||
| - recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh | ||
| - primitivetypes_hh empty_record_hh cpp_reserved_words_union_typedef_hh | ||
| - union_empty_record_hh) | ||
| - | ||
| + tweet_hh | ||
| + union_array_union_hh union_map_union_hh union_conflict_hh | ||
| + recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh | ||
| + primitivetypes_hh empty_record_hh cpp_reserved_words_union_typedef_hh | ||
| + union_empty_record_hh) | ||
| +endif() | ||
| include (InstallRequiredSystemLibraries) | ||
|
|
||
| set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}") | ||
|
|
||
| include (CPack) | ||
|
|
||
| -install (TARGETS avrocpp avrocpp_s | ||
| - LIBRARY DESTINATION lib | ||
| - ARCHIVE DESTINATION lib | ||
| - RUNTIME DESTINATION lib) | ||
| +install(TARGETS avrocpp EXPORT unofficial-avro-cpp) | ||
|
|
||
| +install( | ||
| + EXPORT unofficial-avro-cpp | ||
| + FILE unofficial-avro-cpp-config.cmake | ||
| + DESTINATION share/unofficial-avro-cpp | ||
| + NAMESPACE unofficial::avro-cpp:: | ||
| +) | ||
| install (TARGETS avrogencpp RUNTIME DESTINATION bin) | ||
|
|
||
| install (DIRECTORY include/avro DESTINATION include | ||
| if (AVRO_BUILD_TESTS OR AVRO_USE_BOOST) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| avro-cpp provides CMake targets: | ||
|
|
||
| find_package(unofficial-avro-cpp CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE unofficial::avro-cpp::avrocpp) | ||
| find_package(avro-cpp CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE avro-cpp::avrocpp) |
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
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.
Can you explain why these are removed?
Uh oh!
There was an error while loading. Please reload this page.
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.
Are just needed for the tests (apache/avro#3293) and search for boost includes