diff options
| author | Ken Haase <kh@beingmeta.com> | 2020-02-14 10:18:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-14 07:18:53 -0800 |
| commit | a18bfe9c156be16f231e0bb380fc70fad22da20c (patch) | |
| tree | f7b84df11b9114ad1a32cfb2263e5c7678a09e32 /CMakeLists.txt | |
| parent | 0a315e4e5f7d90789babba312079462953114e0d (diff) | |
| download | nng-a18bfe9c156be16f231e0bb380fc70fad22da20c.tar.gz nng-a18bfe9c156be16f231e0bb380fc70fad22da20c.tar.bz2 nng-a18bfe9c156be16f231e0bb380fc70fad22da20c.zip | |
Added atomic check for building on ARMs (#1196)
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 70177449..d71e72b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,6 +148,13 @@ if (NOT NNG_SANITIZER STREQUAL "none") set(NNG_SANITIZER_FLAGS "-fsanitize=${NNG_SANITIZER}") endif () +include(CheckAtomicLib) +CheckAtomicLib() +if (NOT HAVE_C_ATOMICS_WITHOUT_LIB AND HAVE_C_ATOMICS_WITH_LIB) + list(APPEND NNG_LIBS "atomic") +endif () + + if (NNG_ENABLE_COVERAGE) # NB: This only works for GCC and Clang 3.0 and newer. If your stuff # is older than that, you will need to find something newer. For |
