jhasse / poly2tri

2D constrained Delaunay triangulation library
BSD 3-Clause "New" or "Revised" License
439 stars 89 forks source link

Please have a special target to run tests #14

Closed yurivict closed 3 years ago

yurivict commented 4 years ago

The README says that OpenGL is only required for tests, yet your executable is permanently linked with it.

You should only build and install the minimal exacutable by default, and build and run test executable on request (with a special target).

jhasse commented 4 years ago

Which build system?

yurivict commented 4 years ago

waf

jhasse commented 4 years ago

Only Meson can be used to build the tests, sorry :/

yurivict commented 4 years ago

If gl is only used for tests and they can't be built - you shouldn't link with gl.

meson build doesn't install anything.

jhasse commented 4 years ago

GL is only used for the testbed, not for the unittests. These are the two types of "tests" that exist.

yurivict commented 4 years ago

So when I build and the executable it shouldn't be linked to gl?

jhasse commented 4 years ago

Waf builds the testbed only, so it needs to link to GL. Meson builds a static library and the unit tests, it shouldn't need GL. CMake only builds the static library, it also shouldn't need GL.

yurivict commented 4 years ago

cmake also doesn't install anything.

Why don't you make cmake install what is needed, and add a target there that can test the build?

jhasse commented 4 years ago

No particular reason, simply haven't had the time.

jhasse commented 4 years ago

Thanks to #20 by @pierre-dejoue CMake can now be used to build the unit tests and the testbed. We should get rid of Waf to avoid the confusion.