From df91ada3772728cb52c29e0fb9f08f531f9c8144 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Wed, 8 Jun 2022 16:39:32 +0200 Subject: [PATCH] Fix compiler detection for warning whitelisting --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43c0dad424..2df2a2f0cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,8 @@ if(NOT DEFINED OVERTE_WARNINGS_AS_ERRORS) endif() if(OVERTE_WARNINGS_WHITELIST) + include(CMakeDetermineCXXCompiler) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") message("GCC compiler detected, suppressing some unsolvable warnings.") add_compile_definitions(OVERTE_WARNINGS_WHITELIST_GCC) @@ -158,7 +160,7 @@ if(OVERTE_WARNINGS_WHITELIST) message("Clang compiler detected, suppressing some unsolvable warnings.") add_compile_definitions(OVERTE_WARNINGS_WHITELIST_CLANG) elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - message("Clang compiler detected, suppressing some unsolvable warnings.") + message("Microsoft Visual Studio compiler detected, suppressing some unsolvable warnings.") add_compile_definitions(OVERTE_WARNINGS_WHITELIST_MSVC) else() message("We don't know yet how to whitelist warnings for ${CMAKE_CXX_COMPILER_ID}")