summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-10-05 10:31:53 +0200
committerPatrick Steinhardt <ps@pks.im>2018-10-26 14:58:52 +0200
commite78f9f66d829b35ea95376717ea83c4f9f409312 (patch)
treea7d08563c9b296f6d385c26e46010efe4ec3b0d6
parent0952278f5097c5a49fae7ef36d3b291279bce789 (diff)
downloadlibgit2-e78f9f66d829b35ea95376717ea83c4f9f409312.tar.gz
cmake: explicitly enable int-conversion warnings
While GCC enables int-conversion warnings by default, it will currently only warn about such errors even in case where "-DENABLE_WERROR=ON" has been passed to CMake. Explicitly enable int-conversion warnings by using our `ENABLE_WARNINGS` macro, which will automatically use "-Werror=int-conversions" in case it has been requested by the user. (cherry picked from commit aa0ae59a2a31dc0ee5cc987066903d135a5f9e79)
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 106469377..83898c570 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -227,6 +227,7 @@ ELSE ()
DISABLE_WARNINGS(unused-function)
ENABLE_WARNINGS(format)
ENABLE_WARNINGS(format-security)
+ ENABLE_WARNINGS(int-conversion)
IF (APPLE) # Apple deprecated OpenSSL
DISABLE_WARNINGS(deprecated-declarations)