r-barnes / richdem

High-performance Terrain and Hydrology Analysis
GNU General Public License v3.0
271 stars 69 forks source link

add WITH_TESTS cmake option and wrap executable build in if statement #43

Closed Crghilardi closed 6 months ago

Crghilardi commented 3 years ago

Hello, this PR adds a WITH_TESTS option to allow a user to specify if they want the unit test executable compiled or not. The option is ON (build the tests) by default.

I was compiling this locally and only really cared about making a shared library. With this modification, I can now just add a -DWITH_TESTS=OFF flag to my cmake statement to avoid compiling the unit test portion.

r-barnes commented 6 months ago

Thanks!