[gdal-dev] CMAKE poppler c++17

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu Mar 3 12:26:17 PST 2022


Hi Chris,

I'm not sure if this is exactly related to your issue, but here are my 
thoughts:

I do know that the recent poppler release relies on the C++17 standard, 
and there was a recent change in GDAL to accommodate this (see 
https://github.com/OSGeo/gdal/issues/5071 ).

In my case (for the Windows / MS4W community) I had to patch GDAL 3.4.1 
for this, but in your case you might want to grab GDAL-master from git 
as that will be easier to handle the new poppler.


-jeff



-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/




On 2022-03-03 4:03 p.m., chris english wrote:
> Hi,
> I am a weak link when it comes to CMAKE. Geos-3.10.2 and PROJ-8.2.1 were 
> a breeze nonetheless.  A source build of libpoppler.so.119 via 
> ./configure went smoothly.
> 
> I have consistently failed at ogrpdflayer (well, only four times so far) 
> on 'optional', that is a C++17 thing. <-  an example of a feeble 
> understanding of build process requirements.
> 
> Recklessly editing lines in CMakeLists.txt:
> 41 # check compiler and set preferences.
> 42 set(CMAKE_CXX_STANDARD 17)
> [ 44%] Built target gdal_STACIT
> [ 44%] Building CXX object 
> frmts/pdf/CMakeFiles/gdal_PDF.dir/ogrpdflayer.cpp.o
> 
> but further along we run across c++17 be contra-indicated as to
> 
> [ 49%] Built target gdal_PostGISRaster
> [ 49%] Building CXX object 
> frmts/dods/CMakeFiles/gdal_DODS.dir/dodsdataset2.cpp.o
> 
> from /home/chris/gdal/frmts/dods/dodsdataset2.cpp:38:
> /usr/local/include/libdap/RCReader.h:114:16: error: ISO C++17 does not 
> allow dynamic exception specifications
>    114 |     RCReader() throw(Error);
> 
> which leads to a set by individual target approach as is said to be 
> available
> 
> set_property(TARGETtgtPROPERTYCXX_STANDARD17)
> set_property(TARGETtgtPROPERTYCXX_STANDARD11)
> 
> and were this the solution, what would it look like and where might it 
> reside in say
> 
> CMakeCache.txt, or have I just gotten this all wrong, as I expect I have.
> 
> Ubuntu 20.04, gcc-9.3.0, and happy to have broken through to 49%, but 
> wouldn't
> 
> that's 99% good news.
> 
> Chris
> 
> 


More information about the gdal-dev mailing list