[Proj] MACRO modernization
Kristian Evers
kreve at sdfe.dk
Fri May 20 02:55:07 PDT 2016
Thank you, Howard and Even! It's been a lot of work, but it was certainly worth it. We will continue the effort as Thomas already has hinted at in the PR.
Regarding the self-test in the shared library. I agree with you, Even, there is no need to clutter the .so unnecessarily. We should find a way to avoid that and your suggestion is without a doubt the easiest way to do that.
We implemented the self-tests to ensure that we didn't mess anything up while doing rather extensive code-surgery. As an added bonus we made the self-test callable from the command line via the proj binary. The reason for this is that it might prove useful to users to actually confirm that the application works as intended on their specific setup. Especially on obscure systems not covered by the Travis/Appveyor tests I see this as a nice feature.
For the curious, the self-test can be invoked by running "proj -C". Use -VC to get a more verbose test result. I suspect that we will have to work a bit more on the self-test as it only covers 2D-projection at the moment. I will have to think a bit about what the best way to move forward is. I'll share my thoughts with the list once I have a plan.
Kristian
-----Oprindelig meddelelse-----
Fra: proj-bounces at lists.maptools.org [mailto:proj-bounces at lists.maptools.org] På vegne af Even Rouault
Sendt: 19. maj 2016 16:55
Til: proj at lists.maptools.org
Emne: Re: [Proj] MACRO modernization
Le jeudi 19 mai 2016 16:12:39, Howard Butler a écrit :
> All,
>
> I just wanted to make you aware of the significant effort that Thomas
> Knudsen and Kristian Evers have put in to modernize Proj.4's macros and
> codebase. Along the way, they've increased the code coverage 42%!
>
> Three cheers to them!
>
> https://github.com/OSGeo/proj.4/pull/373
This is an amazing work indeed !
As far as I can see the increased test coverage comes from pj_XXXXX_selftest()
functions added in the file implemented each XXXXX projection method. It seems
that by default those selftest functions are compiled, and if PJ_OMIT_SELFTEST
is defined they are replaced by a stub.
For a "production" build, I'm wondering if we want the selftest to be compiled
in the .so, so perhaps the logic should be reversed (and thus in Travis and
other integration builds we would define PJ_INCLUDE_SELFTEST) ?
Size of libproj.so.11.0.0 (compiled with -O2 and stripped with -s)
* sdfe-refactor-macros--and-repair-generic-constructor-bug : 555440
* master : 379920
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
More information about the Proj
mailing list