Skip to content

Commit

Permalink
Copybara import of the project:
Browse files Browse the repository at this point in the history
--
cc1f708 by Joey Parrish <[email protected]>:

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 protocolbuffers#10899

COPYBARA_INTEGRATE_REVIEW=protocolbuffers#10900 from joeyparrish:fix-libatomic cc1f708
PiperOrigin-RevId: 487859041
  • Loading branch information
joeyparrish authored and copybara-github committed Nov 11, 2022
1 parent c1a42b3 commit f06f81f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f06f81f

Please sign in to comment.