diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-07-20 14:29:01 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-07-20 14:29:01 +0200 |
commit | c6c761c45c11981ea8749f343652f0c44c7cb333 (patch) | |
tree | 8fe9d7bb43c06a6d20b13e5c69712cc725c88151 | |
parent | Merge pull request #918 (diff) | |
parent | fix atomic library to only fire off for clang (diff) | |
download | monero-c6c761c45c11981ea8749f343652f0c44c7cb333.tar.xz |
Merge pull request #919
48e14ef fix atomic library to only fire off for clang (Riccardo Spagni)
39f7fad fix duplicate clang block in cmake (Riccardo Spagni)
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 46c5b2e1d..d421a8774 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -315,14 +315,11 @@ else() endif() endif() set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized") - if(CMAKE_C_COMPILER_ID STREQUAL "Clang") - set(WARNINGS "${WARNINGS} -Wno-deprecated-register") - endif() if(NOT MINGW) set(WARNINGS "${WARNINGS} -Werror") # to allow pedantic but not stop compilation endif() if(CMAKE_C_COMPILER_ID STREQUAL "Clang") - set(WARNINGS "${WARNINGS} -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration") + set(WARNINGS "${WARNINGS} -Wno-deprecated-register -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration") if(ARM6 OR ARM7) set(WARNINGS "${WARNINGS} -Wno-error=inline-asm") endif() @@ -465,9 +462,11 @@ endif() list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS}) -if(NOT MINGW AND NOT APPLE) - find_library(ATOMIC atomic) - list(APPEND EXTRA_LIBRARIES ${ATOMIC}) +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + if(NOT MINGW AND NOT APPLE) + find_library(ATOMIC atomic) + list(APPEND EXTRA_LIBRARIES ${ATOMIC}) + endif() endif() include(version.cmake) |