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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Gregory, Matthew
Hi all,

I do a funky build of GDAL where I'm still using the ArcInfo write driver (GIO) from way back.  As part of that build, I need to use a '#import' statement to get information for ESRI's type libraries.  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.

thanks, matt
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: multiple processor compile option for build on Windows

Even Rouault-2

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


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Loading...