aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-05-14 15:51:19 +0200
committerRiccardo Spagni <ric@spagni.net>2015-05-14 15:51:25 +0200
commit478ec22a1af6e18ea73e3ac77ee24aa95771a4bf (patch)
tree58fe3aa1c57864ab20341db48425b7e19cb178f3
parentMerge pull request #281 (diff)
parentCheck for Clang before adding compiler flag (diff)
downloadmonero-478ec22a1af6e18ea73e3ac77ee24aa95771a4bf.tar.xz
Merge pull request #283
5c025f9 Check for Clang before adding compiler flag (warptangent)
-rw-r--r--CMakeLists.txt5
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()