Fix building under clang-cl on windows, selectany cannot be used in the same way on it

This commit is contained in:
chss95cs@gmail.com 2022-10-30 09:01:55 -07:00
parent b2b8cf2f50
commit ec1cafb9f9

View File

@ -50,12 +50,12 @@ THE SOFTWARE.
# define CXXOPTS_NO_REGEX true
# endif
#endif
#if defined(_MSC_VER)
#define CXXOPTS_LINKONCE_CONST __declspec(selectany)
#define CXXOPTS_LINKONCE __declspec(selectany)
#if defined(_MSC_VER) && !defined(__clang__)
#define CXXOPTS_LINKONCE_CONST __declspec(selectany) extern
#define CXXOPTS_LINKONCE __declspec(selectany) extern
#else
#define CXXOPTS_LINKONCE_CONST const
#define CXXOPTS_LINKONCE
#define CXXOPTS_LINKONCE_CONST
#define CXXOPTS_LINKONCE
#endif
#ifndef CXXOPTS_NO_REGEX