File indexing completed on 2026-01-09 10:20:46
0001 #pragma once
0002
0003
0004
0005
0006
0007
0008 #include "wrap_include_python_h.h"
0009
0010
0011
0012 #define PYBIND11_PLATFORM_ABI_ID_STRINGIFY(x) #x
0013 #define PYBIND11_PLATFORM_ABI_ID_TOSTRING(x) PYBIND11_PLATFORM_ABI_ID_STRINGIFY(x)
0014
0015 #ifdef PYBIND11_COMPILER_TYPE
0016
0017 # define PYBIND11_COMPILER_TYPE_LEADING_UNDERSCORE ""
0018 #else
0019 # define PYBIND11_COMPILER_TYPE_LEADING_UNDERSCORE "_"
0020 # if defined(__MINGW32__)
0021 # define PYBIND11_COMPILER_TYPE "mingw"
0022 # elif defined(__CYGWIN__)
0023 # define PYBIND11_COMPILER_TYPE "gcc_cygwin"
0024 # elif defined(_MSC_VER)
0025 # define PYBIND11_COMPILER_TYPE "msvc"
0026 # elif defined(__clang__) || defined(__GNUC__)
0027 # define PYBIND11_COMPILER_TYPE "system"
0028 # else
0029 # error "Unknown PYBIND11_COMPILER_TYPE: PLEASE REVISE THIS CODE."
0030 # endif
0031 #endif
0032
0033
0034
0035 #ifndef PYBIND11_STDLIB
0036 # define PYBIND11_STDLIB ""
0037 #endif
0038
0039 #ifndef PYBIND11_BUILD_ABI
0040 # if defined(_MSC_VER)
0041 # if defined(_MT) && defined(_DLL)
0042 # if (_MSC_VER) / 100 == 19
0043 # define PYBIND11_BUILD_ABI "_md_mscver19"
0044 # else
0045 # error "Unknown major version for MSC_VER: PLEASE REVISE THIS CODE."
0046 # endif
0047 # elif defined(_MT)
0048 # define PYBIND11_BUILD_ABI "_mt_mscver" PYBIND11_PLATFORM_ABI_ID_TOSTRING(_MSC_VER)
0049 # else
0050 # if (_MSC_VER) / 100 == 19
0051 # define PYBIND11_BUILD_ABI "_none_mscver19"
0052 # else
0053 # error "Unknown major version for MSC_VER: PLEASE REVISE THIS CODE."
0054 # endif
0055 # endif
0056 # elif defined(_LIBCPP_ABI_VERSION)
0057 # define PYBIND11_BUILD_ABI \
0058 "_libcpp_abi" PYBIND11_PLATFORM_ABI_ID_TOSTRING(_LIBCPP_ABI_VERSION)
0059 # elif defined(_GLIBCXX_USE_CXX11_ABI)
0060 # if defined(__NVCOMPILER)
0061
0062
0063
0064 # elif !defined(__GXX_ABI_VERSION)
0065 # error \
0066 "Unknown platform or compiler (_GLIBCXX_USE_CXX11_ABI): PLEASE REVISE THIS CODE."
0067 # endif
0068 # if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION < 1002 || __GXX_ABI_VERSION >= 2000
0069 # error "Unknown platform or compiler (__GXX_ABI_VERSION): PLEASE REVISE THIS CODE."
0070 # endif
0071 # define PYBIND11_BUILD_ABI \
0072 "_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_" PYBIND11_PLATFORM_ABI_ID_TOSTRING( \
0073 _GLIBCXX_USE_CXX11_ABI)
0074 # else
0075 # error "Unknown platform or compiler: PLEASE REVISE THIS CODE."
0076 # endif
0077 #endif
0078
0079
0080 #if defined(_MSC_VER) && defined(_DEBUG)
0081 # define PYBIND11_BUILD_TYPE "_debug"
0082 #else
0083 # define PYBIND11_BUILD_TYPE ""
0084 #endif
0085
0086 #define PYBIND11_PLATFORM_ABI_ID \
0087 PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI PYBIND11_BUILD_TYPE