mkmkme commented on code in PR #3299: URL: https://github.com/apache/avro/pull/3299#discussion_r1927226386
########## lang/c++/CMakeLists.txt: ########## @@ -69,17 +70,18 @@ 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") -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 - # leads to linking errors when compiling with _GLIBCXX_DEBUG as described on - # https://stackoverflow.com/questions/19729036/ - set_source_files_properties(impl/avrogencpp.cc PROPERTIES COMPILE_FLAGS "-U_GLIBCXX_DEBUG") -endif () endif () if (AVRO_BUILD_TESTS OR AVRO_USE_BOOST) - find_package (Boost 1.38 REQUIRED COMPONENTS system) + # Boost 1.70 and above provide a BoostConfig.cmake package configuration file. + # It guarantees that Boost::system target exists if found. + # See https://cmake.org/cmake/help/latest/policy/CMP0167.html + find_package (Boost 1.70 REQUIRED CONFIG COMPONENTS system) + if (Boost_FOUND) Review Comment: Now this if-statement says `if (Boost_FOUND)` instead of `if (TARGET Boost::system)`. Is this change intentional? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org