morphologica icon indicating copy to clipboard operation
morphologica copied to clipboard

Consider making build of tests/examples explicit

Open niclar opened this issue 2 years ago • 5 comments

Tying to build an example. -The cmake installation target for morph seem to miss e.g. Visual.h, ScatterVisual.h

niclar avatar Mar 15 '22 13:03 niclar

This might have happened if you built and installed morphologica without first having installed the glfw library on your system. If the cmake process fails to find glfw, then a make install won't install Visual.h and all the other headers required for graphical programs. Here's the relevant section of the CMakeLists.txt: https://github.com/ABRG-Models/morphologica/blob/main/morph/CMakeLists.txt#L16

sebjameswml avatar Mar 15 '22 13:03 sebjameswml

I'm just trying to build standalone_examples/schnakenberg with an installed morphologica (installed into /usr/local/). There are one or two headers that are not installed - base64.h is one.

sebjameswml avatar Mar 15 '22 14:03 sebjameswml

I made sure that the Schnakenberg example in standalone_examples/ will compile against an installed morphologica now (see the most recent couple of commits). Let me know which example you're trying to build if you are still stuck.

sebjameswml avatar Mar 15 '22 14:03 sebjameswml

@sebjameswml Yeah I tried building/installing morph in isolation omitting examples & tests.

-Can you maybe make dependencies and examples explicitly optional (from the top level cmake) or the morph cmake "standalone". I.e use FindModule for glfw there

(also tried HEAD / 3efe3abf3f7003a8e82775138ee44a80deebfc42)

https://github.com/ABRG-Models/morphologica/files/8254410/patch.diff.txt

niclar avatar Mar 15 '22 14:03 niclar

Making deps and examples explicitly optional is possible, so that it's a simple make && make install process (buildling all the tests and examples does take quite a while).

sebjameswml avatar Mar 15 '22 16:03 sebjameswml

I don't think I'll change the build process. When you type make, you'll just get all the tests and examples compiled.

sebjameswml avatar Feb 01 '23 14:02 sebjameswml