diff options
author | warptangent <warptangent@inbox.com> | 2015-05-13 09:14:15 -0700 |
---|---|---|
committer | warptangent <warptangent@inbox.com> | 2015-05-13 09:20:02 -0700 |
commit | 5c025f99a8a4ad65a3a4e0b6a7fc0e930ff40366 (patch) | |
tree | 2711764d0cf40a5d00fff6aaba68c032b4970bb7 /CMakeLists.txt | |
parent | Merge branch 'clang_fixes' into clang_fixes-master (diff) | |
download | monero-5c025f99a8a4ad65a3a4e0b6a7fc0e930ff40366.tar.xz |
Check for Clang before adding compiler flag
See eb565a1ce208c543392808559ddea709eb1c935b
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c50e13065..b6bccc768 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,7 +213,10 @@ else() else() set(ARCH_FLAG "-march=${ARCH}") endif() - set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wno-deprecated-register") + set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -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() |