mkmkme commented on code in PR #3299:
URL: https://github.com/apache/avro/pull/3299#discussion_r1926590348


##########
lang/c++/CMakeLists.txt:
##########
@@ -69,17 +70,16 @@ 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.
+    find_package (Boost 1.70 REQUIRED CONFIG COMPONENTS system)
+    if (TARGET Boost::system)
+        message("Found Boost version: ${Boost_VERSION}")
+    else ()
+        message(FATAL_ERROR "Boost::system not found")
+    endif ()

Review Comment:
   I think what @mitjap was trying to say is that this `if` statement is 
superfluous as `find_package` is called with a `REQUIRED` keyword. It will fail 
by itself when `Boost::system` is not found, no need for doing it explicitly



-- 
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

Reply via email to