diff --git a/CMakeLists.txt b/CMakeLists.txt index e694dfc4..45813bac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,11 @@ if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() +# make sure __cplusplus is defined under msvc +if(MSVC) + string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus") +endif() + set(CMAKE_CXX_EXTENSIONS OFF) if(CMAKE_SYSTEM_NAME MATCHES "CYGWIN" OR CMAKE_SYSTEM_NAME MATCHES "MSYS")