Warn about implicit 64 to 32 bit conversions when using clang
authorStuart Eichert <stuart@fivemicro.com>
Wed, 1 Jul 2015 21:05:54 +0000 (14:05 -0700)
committerChristopher Dunn <cdunn2001@gmail.com>
Sat, 11 Jul 2015 15:59:56 +0000 (10:59 -0500)
CMakeLists.txt

index ba32022..90eb14e 100644 (file)
@@ -97,7 +97,7 @@ endif( MSVC )
 
 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   # using regular Clang or AppleClang
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wshorten-64-to-32")
 elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
   # using GCC
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -pedantic")