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 6b50276
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ add_subdirectory(CppUnitLite)
add_subdirectory(gtsam)

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

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

# Build timing
add_subdirectory(timing)
Expand Down

0 comments on commit 6b50276

Please sign in to comment.