From 400fb3dbd45a4ceae6090b82a9abda02e6e731c5 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Wed, 28 Dec 2022 11:44:02 -0800 Subject: [PATCH] platform.h: set up macros for detecting MSVS 2019 and 2022 (#3727) --- src/include/OpenImageIO/platform.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/include/OpenImageIO/platform.h b/src/include/OpenImageIO/platform.h index 773aa46262..164a9683b7 100644 --- a/src/include/OpenImageIO/platform.h +++ b/src/include/OpenImageIO/platform.h @@ -230,6 +230,10 @@ # define OIIO_MSVS_BEFORE_2015 (_MSC_VER < 1900) # define OIIO_MSVS_AT_LEAST_2017 (_MSC_VER >= 1910) # define OIIO_MSVS_BEFORE_2017 (_MSC_VER < 1910) +# define OIIO_MSVS_AT_LEAST_2019 (_MSC_VER >= 1920) +# define OIIO_MSVS_BEFORE_2019 (_MSC_VER < 1920) +# define OIIO_MSVS_AT_LEAST_2022 (_MSC_VER >= 1930) +# define OIIO_MSVS_BEFORE_2022 (_MSC_VER < 1930) # if OIIO_MSVS_BEFORE_2017 # error "This version of OIIO is meant to work only with Visual Studio 2017 or later" # endif @@ -241,6 +245,10 @@ # define OIIO_MSVS_BEFORE_2015 0 # define OIIO_MSVS_AT_LEAST_2017 0 # define OIIO_MSVS_BEFORE_2017 0 +# define OIIO_MSVS_AT_LEAST_2019 0 +# define OIIO_MSVS_BEFORE_2019 0 +# define OIIO_MSVS_AT_LEAST_2022 0 +# define OIIO_MSVS_BEFORE_2022 0 #endif