]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake/arrow: don't treat warnings as errors
authorCasey Bodley <cbodley@redhat.com>
Wed, 24 Jan 2024 14:44:25 +0000 (09:44 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 14 May 2024 15:50:05 +0000 (17:50 +0200)
with arrow's default BUILD_WARNING_LEVEL, -Werror is added to cflags and
debug builds fail on a warning about _FORTIFY_SOURCE

Fixes: https://tracker.ceph.com/issues/63130
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 5c1a57a1afed1e4a632fb6df6de34ff9689460db)
(cherry picked from commit 7ecee431f6f3499730c5425b9b2930df8d61c159)

cmake/modules/BuildArrow.cmake

index 691108a40c5514901f35ff8e29a3f2e6bf5b2cee..8a16b9b8899df213c13786ab7e85a1faf6542e7b 100644 (file)
@@ -86,6 +86,9 @@ function(build_arrow)
   else()
     list(APPEND arrow_CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release)
   endif()
+  # don't add -Werror or debug package builds fail with:
+  #warning _FORTIFY_SOURCE requires compiling with optimization (-O)
+  list(APPEND arrow_CMAKE_ARGS -DBUILD_WARNING_LEVEL=PRODUCTION)
 
   # we use an external project and copy the sources to bin directory to ensure
   # that object files are built outside of the source tree.