Copybara import of the project:

--
cc1f708d75 by Joey Parrish <joeyparrish@google.com>:

Fix misdetection of libatomic with strict compiler flags

With strict flags and -Werror, the detection for libatomic breaks, causing it to be included in places where it is not needed.  And on macOS, this leads to a link error when libatomic cannot be found.

Closes #10899

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/10900 from joeyparrish:fix-libatomic cc1f708d75
PiperOrigin-RevId: 487859041
pull/10968/head
Joey Parrish 2 years ago committed by Copybara-Service
parent c1a42b34e5
commit f06f81f0c8
  1. 2
      CMakeLists.txt

@ -238,7 +238,7 @@ if (NOT MSVC)
check_cxx_source_compiles("
#include <atomic>
int main() {
return std::atomic<int64_t>{};
return static_cast<int>(std::atomic<int64_t>{});
}
" protobuf_HAVE_BUILTIN_ATOMICS)
if (NOT protobuf_HAVE_BUILTIN_ATOMICS)

Loading…
Cancel
Save