On 2015-09-03 22:06+0100 Phil Rosenberg wrote: > [...] Note that both snprintf and _snprintf are listed as not found by > cmake. But this isn't a blanket loss of the check_function_exists() > function. isnan and isfinite are both found and I presume they use > check_function_exists()? > > I then reread your email and found you provided a rather shorter test. > I dumped this in a cmakelists.txt file and this could not find > snprintf either > > > I figured we can't be the only people having this issue so I googled > it and found this page > http://public.kitware.com/Bug/bug_relationship_graph.php?bug_id=15659&graph=relation > > It seems that snprintf and a number of other io related functions are > now defined inline in stdio.h. This explains my linker errors above > when shapelib was included - snprintf was not found because it is no > longer in the library. The answer apparently is to use > CheckSymbolExists instead. > > The following works correctly > > cmake_minimum_required(VERSION 2.8.9) > project(test_check C) > include(CheckSymbolExists) > check_symbol_exists(snprintf stdio.h PL_HAVE_SNPRINTF) > message(STATUS "PL_HAVE_SNPRINTF = ${PL_HAVE_SNPRINTF}")
> So this is really nothing to do with the new "Universal" nature of the > CRT, it's just that the new CRT has inlined those particular > functions. Hi Phil: Thanks very much for the above investigation. > > Alan I will leave you to integrate this how you see fit as I wouldn't > know where to start. > It turns out we use check_function_exists a lot of places in our build system, but I don't think any of those have to do with io-related functions other than the checks for snprintf and _snprintf. So I have only changed those two instances (see commit id ac0f09f) to use the check_symbol_exists form that you found above works for you (and which also works for me on Linux). To finish off this topic, please test this latest version of PLplot for your Visual Studio 2015 platform and assuming that the PLplot build shows no other check_function_exists failures, then please close the bug report appropriately. 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 __________________________ ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel