On 2017-05-09 09:42-0000 Arjen Markus wrote: > Hi Alan, > >> -----Original Message----- >> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca] >> Sent: Tuesday, May 09, 2017 9:50 AM >> >> Hi Arjen: >> >> The diff executable from the MinGW-w64/MSYS2 Unix tools should "just work" if >> run from a bash script (as in comprehensive testing, ctest, >> etc.) Is the issue simply that our build system is finding something other >> than >> /usr/bin/diff.exe from the MinGW-w64/MSYS2 diffstat package? >> >> If the issue is more complicated than that, please send me the relevant >> report >> tarball. >> > That is what I expect too, but CMake (being the "bare Windows" version, not > the MinGW-w64/MSYS2 one) picks up an executable by that very name, which is > almost but not quite unrelated to the diff utility we want. (It comes with > Subversion.) So I have to instruct Windows-Cmake to use a > MinGW-w64/MSYS2-utility.
The relevant find_program calls (for diff, tail, and cmp) are in cmake/modules/plplot.cmake. One preliminary issue is our find of cmp only occurs on Linux, but you should drop that constraint since I assume that command is available on all POSIX systems and also Cygwin and MinGW-w64/MSYS2. But if the cmp command isn't available, then find_program does the right thing in any case. The cmp command is significantly faster than the equivalent combination of tail and diff. So if cmp is available, plplot_test/test_diff.sh(.in) uses it rather than tail/diff. The primary issue, of course, is the one above where our find system is finding a "subversion" version of diff. However, if you look at <https://cmake.org/cmake/help/latest/command/find_program.html>, there are all sorts of ways to control find_program inside cmake/modules/plplot.cmake. For example, our CMake logic could find tail first (assuming that is not supplied by subversion), then use HINTS to find cmp and diff by looking in the same directory as tail was found. (Or look first for cmp, then follow with the other two if cmp is the one not supplied by subversion.) I hope this idea helps, but in any case good luck figuring out how to change the CMake logic in cmake/modules/plplot.cmake so that the result is all 3 programmes are found in a consistent directory (which virtually guarantees that they will be found in the platform-relevant directory if the user sets the PATH 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 __________________________ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel