Skip to content

Werror in CMake Build propogates warnings from subprojects as errors #246

@WillAyd

Description

@WillAyd

When using the CMake configuration, dependencies that need to be built may throw warnings. With the current CMake configuration, these warnings cause the build to fail:

[ 62%] Building CXX object src/iceberg/CMakeFiles/iceberg_static.dir/manifest_entry.cc.o
/home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.cc: In member function ‘const std::shared_ptr<arrow::Array>& arrow::StructArray::field(int) const’:
/home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.cc:1080:51: error: ‘std::shared_ptr<_Tp> std::atomic_load(const shared_ptr<_Tp>*) [with _Tp = arrow::Array]’ is deprecated: use 'std::atomic<std::shared_ptr<T>>' instead [-Werror=deprecated-declarations]
 1080 |   std::shared_ptr<Array> result = std::atomic_load(&boxed_fields_[i]);
      |                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/memory:81,
                 from /home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.h:24,
                 from /home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.cc:18:
/usr/include/c++/14/bits/shared_ptr_atomic.h:142:5: note: declared here
  142 |     atomic_load(const shared_ptr<_Tp>* __p)
      |     ^~~~~~~~~~~
/home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.cc:1089:22: error: ‘void std::atomic_store(shared_ptr<_Tp>*, shared_ptr<_Tp>) [with _Tp = arrow::Array]’ is deprecated: use 'std::atomic<std::shared_ptr<T>>' instead [-Werror=deprecated-declarations]
 1089 |     std::atomic_store(&boxed_fields_[i], std::move(result));
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/shared_ptr_atomic.h:183:5: note: declared here
  183 |     atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
      |     ^~~~~~~~~~~~
/home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.cc: In member function ‘std::shared_ptr<arrow::Array> arrow::UnionArray::field(int) const’:
/home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.cc:1360:51: error: ‘std::shared_ptr<_Tp> std::atomic_load(const shared_ptr<_Tp>*) [with _Tp = arrow::Array]’ is deprecated: use 'std::atomic<std::shared_ptr<T>>' instead [-Werror=deprecated-declarations]
 1360 |   std::shared_ptr<Array> result = std::atomic_load(&boxed_fields_[i]);
      |                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/shared_ptr_atomic.h:142:5: note: declared here
  142 |     atomic_load(const shared_ptr<_Tp>* __p)
      |     ^~~~~~~~~~~
/home/will/clones/iceberg-cpp/build/_deps/vendoredarrow-src/cpp/src/arrow/array/array_nested.cc:1372:22: error: ‘void std::atomic_store(shared_ptr<_Tp>*, shared_ptr<_Tp>) [with _Tp = arrow::Array]’ is deprecated: use 'std::atomic<std::shared_ptr<T>>' instead [-Werror=deprecated-declarations]
 1372 |     std::atomic_store(&boxed_fields_[i], result);
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/shared_ptr_atomic.h:183:5: note: declared here
  183 |     atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
      |     ^~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions