I love the current cmake setup because it's very robust. My libigl based projects are almost always painless to install. Each of my projects either downloads libigl via cmake or uses libigl as a submodule. Then cmaking that subproject will also cmake (the correct version of) libigl.
The downside of this is that my sad little laptop is constantly heating up compiling libigl in static library mode. Each new project needs to compile the same libigl code, over and over again. I noticed that this has effected my workflow to the point that I might think twice about trying an idea because I know I need to wait 3 mins for libigl to compile or I opt for header only and pay the cost on every compile, or I have some messy mega-cmake with all my subprojects in it. Even after waiting for the big initial compile, the make traversal of all the igl-related compilation units is not entirely negligible: debugging is more painful when compiling takes many seconds.
Finally, there's an energy argument that regardless of cost/time we should be minimizing total energy consumption when we can. Recompiling the same code over and over again is clearly wasteful.
I'm not sure what the best solution is here. It's related to facilitating a system install of libigl. Maybe that should be the ultimate goal.
In the meantime, I created a modified FindLIBIGL.cmake that has a flag to link to a prebuilt copy of the libigl libraries and dependencies.
Is this something we want in the libigl-example-project? Is there a better way to go about this?
I love the current cmake setup because it's very robust. My libigl based projects are almost always painless to install. Each of my projects either downloads libigl via cmake or uses libigl as a submodule. Then cmaking that subproject will also cmake (the correct version of) libigl.
The downside of this is that my sad little laptop is constantly heating up compiling libigl in static library mode. Each new project needs to compile the same libigl code, over and over again. I noticed that this has effected my workflow to the point that I might think twice about trying an idea because I know I need to wait 3 mins for libigl to compile or I opt for header only and pay the cost on every compile, or I have some messy mega-cmake with all my subprojects in it. Even after waiting for the big initial compile, the
maketraversal of all the igl-related compilation units is not entirely negligible: debugging is more painful when compiling takes many seconds.Finally, there's an energy argument that regardless of cost/time we should be minimizing total energy consumption when we can. Recompiling the same code over and over again is clearly wasteful.
I'm not sure what the best solution is here. It's related to facilitating a system install of libigl. Maybe that should be the ultimate goal.
In the meantime, I created a modified
FindLIBIGL.cmakethat has a flag to link to a prebuilt copy of the libigl libraries and dependencies.Is this something we want in the libigl-example-project? Is there a better way to go about this?