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
pull/10900/head
Joey Parrish 2 years ago
parent 97c0f376f6
commit cc1f708d75
  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