I am working on a pybind11 project, and hope both c++ and setup.py on the python can use a commonly defined macro or variable.
for example, in a c++ include file defined.h
#define THIS_NAME
#define THIS_NAME1 this_name
in python, setup.py
from setuptools import setup, Extension
from distutils.command.bdist import bdist as _bdist
from distutils.command.sdist import sdist as _sdist
import pybind11
# The following is for GCC compiler only.
cpp_args = []
a_name = THIS_NAME
if THIS_NAME1 == 'this_name':
...
Is this doable, and how to implement?