diff --git a/CMakeLists.txt b/CMakeLists.txt index 35cf3b7e5c..c3970b8a67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,8 +151,10 @@ if(NOT DEFINED OVERTE_WARNINGS_AS_ERRORS) endif() if(OVERTE_WARNINGS_WHITELIST) - set(CMAKE_PLATFORM_INFO_DIR "${CMAKE_CURRENT_BINARY_DIR}") - include(CMakeDetermineCXXCompiler) + if (NOT WIN32) + set(CMAKE_PLATFORM_INFO_DIR "${CMAKE_CURRENT_BINARY_DIR}") + include(CMakeDetermineCXXCompiler) + endif() if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") message("GCC compiler detected, suppressing some unsolvable warnings.") @@ -160,7 +162,7 @@ if(OVERTE_WARNINGS_WHITELIST) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") message("Clang compiler detected, suppressing some unsolvable warnings.") add_compile_definitions(OVERTE_WARNINGS_WHITELIST_CLANG) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR (CMAKE_CXX_COMPILER_ID MATCHES "" AND WIN32)) message("Microsoft Visual Studio compiler detected, suppressing some unsolvable warnings.") add_compile_definitions(OVERTE_WARNINGS_WHITELIST_MSVC) else()