voronoi icon indicating copy to clipboard operation
voronoi copied to clipboard

Add linux compile support

Open HeinrichWizardKreuser opened this issue 3 years ago • 2 comments
trafficstars

could we add a make file or a bash script for compiling it in linux?

HeinrichWizardKreuser avatar Jun 30 '22 08:06 HeinrichWizardKreuser

I've looked into the repo in a bit more detail and found how to build it for linux in .travis.yml file and in appveyor.yml and found how to compile it for linux:

./compile_clang.sh
(cd test && ./compile_clang.sh)
(cd src/examples && ./compile_clang.sh)
cd ./build
ASAN_OPTIONS=detect_stack_use_after_return=1 ./test
ASAN_OPTIONS=detect_stack_use_after_return=1 ./test_double
ASAN_OPTIONS=detect_stack_use_after_return=1 ./simple
sleep 1 # wait for output

I do wish it was a bit more clear.

Can we add a segment in the README that would just explain how to compile it from scratch (on linux)?

HeinrichWizardKreuser avatar Jun 30 '22 08:06 HeinrichWizardKreuser

The compile_clang.sh shows and actual command line.

Also, it's just a header, and it should work with C/C++. The example section shows how it's actually used. I.e. simply include the file like so:

#define JC_VORONOI_IMPLEMENTATION
#include "jc_voronoi.h"

This is a common way to use single file header libraries.

JCash avatar Jun 30 '22 09:06 JCash