[gdal-dev] multiple processor compile option for build on Windows

Even Rouault even.rouault at spatialys.com
Sat Apr 8 09:41:55 PDT 2017


On vendredi 7 avril 2017 21:41:17 CEST Gregory, Matthew wrote:
> Hi all,
> 
> I do a funky build of GDAL where I'm still using the ArcInfo write driver
> (GIO) from way back. 

Woo, first time I hear about that one. Doing some archeology, is it this thing that was 
removed 11 years ago per
https://trac.osgeo.org/gdal/browser/trunk/frmts/aigrid/giodataset.cpp?rev=4312 ?

> As part of that build, I need to use a '#import'
> statement to get information for ESRI's type libraries.  

I don't see any #import in the above file. I guess you might have customized it.

> I build on Windows
> using VC9, but I'm guessing any later version of VC may have similar
> issues.
> 
> At SVN revision 37673, the nnmake.opt was updated to allow GDAL to build
> with multiple processors (/MP flag).  Apparently this causes issues when
> one has #import statements in the code (error C2813).  I'm wondering if
> it's possible to change the nnmake.opt file to specify whether or not to
> use multiple processors in building, e.g:
> 
> !IFDEF BUILD_MULT_PROC
> CXX_MULT_PROC_FLAG=/MP
> !ELSE
> CXX_MULT_PROC_FLAG=
> !ENDIF
> 
> and then below,
> 
> OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) $(CXX_MULT_PROC_FLAG)
> /nologo /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE
> /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
> 
> Would this cause any issues?  Or, if there's a better way for me personally
> to handle it, I'm all ears.

If you're the only one to experiment this issue, I'd prefer if you submit a patch that would use 
a IFNDEF DISABLE_MULT_PROC to disable only when requested by the user in its nmake.local

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170408/f2909f03/attachment-0001.html>


More information about the gdal-dev mailing list