diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ce6fea..e953830 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,10 @@ add_library(interval-tree INTERFACE) target_include_directories(interval-tree INTERFACE ./include) -if(DRAW_EXAMPLES) +if(INT_TREE_DRAW_EXAMPLES) add_subdirectory(cairo-wrap) add_subdirectory(drawings) endif() -add_subdirectory(tests) \ No newline at end of file +if (INT_TREE_ENABLE_TESTS) + add_subdirectory(tests) +endif() \ No newline at end of file diff --git a/README.md b/README.md index ca6e102..3d13302 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ int main() Having googletest (find here on github) installed / built is a requirement to run the tests. Create a build folder, navigate there, run cmake and build the tree-tests target. You might have to adapt the linker line for gtest, if you built it yourself and didn't install it into your system. -If you want to generate the pretty drawings, install cairo, pull the submodule and pass DRAW_EXAMPLES=on to the cmake command line to generate a drawings/make_drawings executeable. +If you want to generate the pretty drawings, install cairo, pull the submodule and pass INT_TREE_DRAW_EXAMPLES=on to the cmake command line to generate a drawings/make_drawings executeable. ## Free Functions ### interval make_safe_interval(NumericT border1, NumericT border2) diff --git a/cmake/options.cmake b/cmake/options.cmake index 8635efe..41e341e 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -1 +1,2 @@ -option(DRAW_EXAMPLES "Draws some examples in a subdirectory. run make_drawable.sh before this" OFF ) \ No newline at end of file +option(INT_TREE_DRAW_EXAMPLES "Draws some examples in a subdirectory. run make_drawable.sh before this" OFF) +option(INT_TREE_ENABLE_TESTS "Enable tests?" ON) \ No newline at end of file