Skip to content

Commit

Permalink
tool: Add cmake options for enabling and disabling builds (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
kotaweav authored Sep 28, 2023
1 parent 33005c0 commit 3491969
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Example usages of the library
option(SKIP_EXAMPLES "Skip building the examples" OFF)
if(NOT SKIP_EXAMPLES)
add_subdirectory(examples)
endif()

# Enables testing in CMAKE, needs to be called BEFORE call to add_subdirectory
option(SKIP_TESTS "Skip building the tests" OFF)
if(NOT SKIP_TESTS)
enable_testing()
add_subdirectory(test)
endif()

# Benchmarks
add_subdirectory(perf)
option(SKIP_BENCHMARKS "Skip building the performance benchmarks" OFF)
if(NOT SKIP_BENCHMARKS)
add_subdirectory(perf)
endif()

0 comments on commit 3491969

Please sign in to comment.