mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 08:25:45 -07:00
Files

This fixes a build failure introduced by commit 2e48ce132e011e8 yesterday. When I saw that commit I expected the most likely problem would be in the NestedVM build, which is currently the thing with the most most out-of-date C implementation. And indeed the NestedVM toolchain doesn't have <tgmath.h> - but much more surprisingly, our _Windows_ builds failed too, with a compile error inside <tgmath.h> itself! I haven't looked closely into the problem yet. Our Windows builds are done with clang, which comes with its own <tgmath.h> superseding the standard Windows one. So you'd _hope_ that clang could make sense of its own header! But perhaps the problem is that this is an unusual compile mode and hasn't been tested. My fix is to simply add a cmake check for <tgmath.h> - which doesn't just check the file's existence, it actually tries compiling a file that #includes it, so it will detect 'file exists but is mysteriously broken' just as easily as 'not there at all'. So this makes the builds start working again, precisely on Ben's theory of opportunistically using <tgmath.h> where possible and falling back to <math.h> otherwise. It looks ugly, though! I'm half tempted to make a new header file whose job is to include a standard set of system headers, just so that that nasty #ifdef doesn't have to sit at the top of almost all the source files. But for the moment this at least gets the build working again.
This subdirectory contains puzzle implementations which are half-written, fundamentally flawed, or in other ways unready to be shipped as part of the polished Puzzles collection. The CMake build system will _build_ all of the source in this directory (to ensure it hasn't become unbuildable), but they won't be included in all-in-one puzzle binaries or installed by 'make install' targets. If you want to temporarily change that, you can reconfigure your build by defining the CMake variable PUZZLES_ENABLE_UNFINISHED. For example, cmake . -DPUZZLES_ENABLE_UNFINISHED="group;slide" will build as if both Group and Slide were fully official puzzles.