Skip to content

Commit

Permalink
[build] Allow disabling tests and examples
Browse files Browse the repository at this point in the history
When you have gtsam as a dependency in CMake these would get built. This
doesn't make sense and increases build times, allowing them to be
disabled fixes this.

Signed-off-by: Jade Turner <spacey-sooty@proton.me>
  • Loading branch information
spacey-sooty committed Dec 6, 2024
1 parent bb5cfb2 commit ddd95f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,17 @@ add_subdirectory(CppUnitLite)
add_subdirectory(gtsam)

# Build Tests
add_subdirectory(tests)
option(BUILD_TESTS "Builds unit tests" ON)
if (BUILD_TESTS)
add_subdirectory(tests)
endif()


# Build examples
add_subdirectory(examples)
option(BUILD_EXAMPLES "Builds examples" ON)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

# Build timing
add_subdirectory(timing)
Expand Down

0 comments on commit ddd95f4

Please sign in to comment.