On 2015-12-10 12:36-0000 Phil Rosenberg wrote: > Hi Alan > Sorry this has taken me a while to look at. > > I just want to check what you think the behaviour should be id > shapelib is off, deprecated is on and the user passes in a map name > other than one of the ones we supply? The behaviour before we began > using shapefiles was the same as it is now: If a file with that name > existed then plplot attempted to read it, if not then plplot reported > the warning you saw. I think that is still correct behaviour. > What should probably happen is that the final page of the example > should not be drawn unless shapelib support is on. To do this we need > either a compile time or runtime check for whether plplot was built > with shapelib support. Not wanting to touch the public API I guess a > #define PL_USE_SHAPEFILES in plConfig.h is required. However I'm not > sure how to do that. I tried adding > > set(PL_USE_SHAPEFILES, TRUE) ^
> In shapelib.cmake and > > #cmakedefine PL_USE_SHAPEFILES > > in plConfig.h.in, but this doesn't work. The issue is the comma in the above set command. Commas are extremely rare (if they exist at all) in CMake syntax. I don't know, but I suspect the variable name you set was "PL_USE_SHAPEFILES," with the above command. I followed up by pushing that comma removal (as of commit 4970505) which lead to // Define if built with shapefile support #define PL_USE_SHAPEFILES being set in the configured include/plConfig.h in the build tree. So all is well there, and here are the relevant results in the cache for my (default) configuration: software@raven> grep -E "SHAPE|DEPRECATED" CMakeCache.txt HAVE_SHAPELIB:BOOL=ON PL_DEPRECATED:BOOL=OFF SHAPELIB_INCLUDE_DIR:PATH=/usr/include SHAPELIB_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libshp.so So that all seems fine, but for this combination I now get the result that the last page of example 19 does not display any more. Instead of looking at that issue alone, I suggest you systematically look at example 19 results for all combinations of HAVE_SHAPELIB and PL_DEPRECATED 1. -DHAVE_SHAPELIB=OFF, -DPL_DEPRECATED=OFF 2. -DHAVE_SHAPELIB=ON, -DPL_DEPRECATED=OFF 3. -DHAVE_SHAPELIB=OFF, -DPL_DEPRECATED=ON 4. -DHAVE_SHAPELIB=ON, -DPL_DEPRECATED=ON For PL_DEPRECATED=OFF we should rely completely on the shapelib approach, and for PL_DEPRECATED=ON we should rely completely on the traditional non-shapelib approach. So following that philosophy we should have the following behaviour for example 19: Case 1 should not plot anything for any page and instead should emit a warning for each page that shapelib is missing. Case 2 (the above case I tested) should display all pages with no warnings (the last page is missing in error for me). Cases 3 and 4 should display all but the last page using the deprecated approach, and for the last page should not plot anything but give a warning message that shapelib and PL_DEPRECATED=OFF are required for that page. I hope this clarifies what is needed by example 19 in each of the 4 cases. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel