Index: cmake/modules/HandleLLVMOptions.cmake =================================================================== --- cmake/modules/HandleLLVMOptions.cmake +++ cmake/modules/HandleLLVMOptions.cmake @@ -619,6 +619,14 @@ append("-Wno-comment" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) endif() + # g++ likes to generate a 12 line warning every time the + # SchedulerRegistry is referenced, which makes actual warnings and + # errors hard to find. Disabling the warning is not ideal, but is + # probably better than having other warnings and errors overlooked. + if (CMAKE_COMPILER_IS_GNUCXX) + add_flag_if_supported("-Wno-cast-function-type" NO_CAST_FUNCTION_TYPE_FLAG) + endif() + # Enable -Wstring-conversion to catch misuse of string literals. add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG) endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))