Good find! I think we should remove that line (pcbnew/CMakeLists.txt:403) since it's not used. I guess we have just been clobbering KICAD_CONFIG_DIR for swig and it just didn't matter.
On Fri, Feb 7, 2020 at 1:29 PM Simon Richter <simon.rich...@hogyros.de> wrote: > Hi, > > On 07.02.20 19:19, Simon Richter wrote: > > > This. The COMPILE_DEFINITIONS property is applied to CC and CXX > > invocations, not to the SWIG command line. > > Spoke too soon. Those are actually applied. What is happening is that > swig is invoked as > > /usr/bin/swig3.0 -python -c++ -outdir /home/geier/OSS/kicad/Build/pcbnew > -I/home/geier/OSS/kicad/pcbnew -I/home/geier/OSS/kicad/include > -I/home/geier/OSS/kicad/scripting -I/home/geier/OSS/kicad/common/swig > -I/home/geier/OSS/kicad/libs/kimath/include -I -DDEBUG > -DKICAD_CONFIG_DIR=kicad -DHAVE_STDINT_H -DKICAD_SCRIPTING > -DKICAD_SCRIPTING_MODULES -DKICAD_SCRIPTING_PYTHON3 > -DKICAD_SCRIPTING_WXPYTHON -DKICAD_SCRIPTING_WXPYTHON_PHOENIX > -DKICAD_SCRIPTING_ACTION_MENU -DKICAD_SPICE -DKICAD_USE_OCE > -DGLM_FORCE_CTOR_INIT -DWX_COMPATIBILITY -D_FILE_OFFSET_BITS=64 > -DWXUSINGDLL -D__WXGTK__ -DPCBNEW -o > /home/geier/OSS/kicad/Build/pcbnew/pcbnew_wrap.cxx swig/pcbnew.i > > Notice the -I before the -DDEBUG? The fix for -DDEBUG reordered the > preprocessor definitions, so now -DDEBUG instead of the > -DKICAD_CONFIG_DIR is interpreted as an include directory. > > The -I is expanded from -I${WXPYTHON_SWIG_DIR} which is an empty > variable that is never mentioned anywhere else in the source tree. > > Unless there is a configuration that sets this variable, removing that > -I line from the swig invocation is the way to go. > > Simon > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp