-set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb -DDEBUG=1")
-set(CMAKE_C_FLAGS_RELEASE "-O2")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+if (CMAKE_COMPILER_IS_CLANG)
+ if (STRICT_COMPILATION_CHECKS)
+ add_flags(STRICT_FLAGS
+ -Wshorten-64-to-32)
+ endif()
+endif()
+
+set(CMAKE_C_FLAGS_DEBUG "-O0 -DDEBUG=1 ${DEBUG_FLAGS} ${STRICT_FLAGS}")
+set(CMAKE_C_FLAGS_RELEASE "-O2 ${RELEASE_FLAGS} ${STRICT_FLAGS}")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 ${RELEASE_FLAGS} ${DEBUG_FLAGS} ${STRICT_FLAGS}")