- Notifications
You must be signed in to change notification settings - Fork 20
Guard against overflow for dynamic interval overlap#60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
d9756484a7476f634e1f25997c059a9e05c18c7357b8677136c971aa09c6162b2a228d002865eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -19,7 +19,14 @@ file(GLOB sources "*.cpp") | ||
| # Add Executable | ||
| add_executable(tree-tests ${sources}) | ||
| find_package(GTest REQUIRED) | ||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
Owner There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes this is easier and I only accept this because its for tests only where it doesnt matter. Just letting you know. | ||
| googletest | ||
| GIT_REPOSITORY https://github.com/google/googletest.git | ||
| GIT_TAG v1.15.2 | ||
| ) | ||
| set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
| FetchContent_MakeAvailable(googletest) | ||
| target_link_libraries(tree-tests PRIVATE interval-tree GTest::gtest GTest::gmock GTest::gmock_main) | ||
| @@ -47,4 +54,9 @@ if (DEFINED ENV{MSYSTEM}) | ||
| COMMAND bash -c "ldd $<TARGET_FILE:tree-tests>" | "grep" "clang" | awk "NF == 4 { system(\"${CMAKE_COMMAND} -E copy \" \$3 \" $<TARGET_FILE_DIR:tree-tests>\") }" | ||
| VERBATIM | ||
| ) | ||
| endif() | ||
| endif() | ||
| if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") | ||
| target_compile_options(tree-tests PRIVATE -fsanitize=signed-integer-overflow -fno-sanitize-recover=all) | ||
| target_link_options(tree-tests PRIVATE -fsanitize=signed-integer-overflow -fno-sanitize-recover=all) | ||
| endif() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake .. -DINT_TREE_ENABLE_TESTS=on
Configure step is missing.