diff --git a/CMakeLists.txt b/CMakeLists.txt index 7331f0cf6..8eee0dcde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -372,6 +372,12 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") endif() endif() +if(MSVC) + if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "19.20") + message(FATAL_ERROR "Your version of MSVC (${CMAKE_CXX_COMPILER_VERSION}) is too old for building Icinga 2 (MSVC >= 19.20 from Visual Studio 2019 is required).") + endif() +endif() + if(NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")