diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake index 4fa1a83d16fdf7a7468926e0bb13e07e4f1fec6f..e818157d5a40eb6c995862ee2103233668c9606d 100644 --- a/CompilerChecks.cmake +++ b/CompilerChecks.cmake @@ -40,6 +40,7 @@ if (UNIX) add_c_compiler_flag("-Wimplicit-fallthrough" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Werror=strict-overflow" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wstrict-overflow=2" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wstrict-aliasing=2" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wno-format-zero-length" SUPPORTED_COMPILER_FLAGS) check_c_compiler_flag("-Wformat" REQUIRED_FLAGS_WFORMAT)