A modern C++ library for image synthesis using Max Gumin's Wave Function Collapse algorithm
Dependencies:
- A C++20 compiler (tested on gcc version 10.2.1 20210110 , Debian 10.2.1-6)
- CMake >=3.5 build system
- Doxygen documentation generator
- LCov extension to gcov coverage tester\
To build (library, documentation, and test executable) assumming the root directory is the working directory:
cmake --build ./build --config Debug --target all --the --config Debug should be omitted in release, as it enables flags related to coverage testing and disables optimization.
A list of all targets that can be used instead of all
wfcppto compile WFCpp as a static library (part ofall).main.exeto compile test executable (part ofall).docto build Doxygen documentation for WFCpp (part ofall).runto run test executable (buildsmain.exetarget).coverageto build LCov coverage report for test executable (buildsruntarget).EasyBMPto compile EasyBMP as a static library (part ofall).lodepngto compile lodepng as a static library (part ofall).
Since it is not part of the all target, remember that to build the coverage report for the test executable, use:
cmake --build ./build --config Debug --target coverageThe --config Debug flag is required to build coverage.
To use this library, the easiest method is to use CMake for your project, and add a target_link_libraries(<target> wfcpp) command to your CMakeLists.txt file, where <target> refers to whatever executable you are compiling. CMake will ensure that you can access the library's headers by using angle bracket includes such as #include <Solver.h>. Alternatively, one can always build libwfcpp.a to link with using the wfcpp target, and copy-paste the library's headers to your own project. This is inadvisable but nontheless entirely possible.
Overall coverage rate: lines......: 91.0% (806 of 886 lines) functions..: 87.2% (102 of 117 functions)
LoC: 886 Number of functions: 117