+
+# For MSVC, at least do a version sanity check...
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0")
+ message(FATAL_ERROR "Your compiler is too old; you need at least Visual Studio 2015 (MSVC 19.0+), GCC 4.8+, Clang 3.3+, or any other compiler with full C++11 support.")
+ endif()
+
+ # ... and enable exception handling (required for STL types)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+
+# Unknown/unsupported compiler
+else()
+ message(WARNING "Unknown or unsupported compiler. Make sure to enable C++11 support. Good luck.")