Skip to content

Commit

Permalink
Made it possible to disable tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
5cript committed Feb 26, 2022
1 parent 43ce323 commit a6ee6ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
if (INT_TREE_ENABLE_TESTS)
add_subdirectory(tests)
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<NumericT, Kind> make_safe_interval(NumericT border1, NumericT border2)
Expand Down
3 changes: 2 additions & 1 deletion cmake/options.cmake
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
option(DRAW_EXAMPLES "Draws some examples in a subdirectory. run make_drawable.sh before this" OFF )
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)

0 comments on commit a6ee6ed

Please sign in to comment.