Skip to content

Commit c6e50ae

Browse files
committed
Add Options For Testing And Benchmarking
branch: [feature/restructuring] Signed-off-by: Ghasem Ramezani (Personal GCCORE GPG) <[email protected]>
1 parent 032a8e9 commit c6e50ae

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ set(CMAKE_CXX_STANDARD 11)
55
set(CMAKE_CXX_EXTENSIONS off)
66
set(CMAKE_CXX_STANDARD_REQUIRED on)
77

8-
include(cmake/ConfigureProjectTests.cmake)
9-
Core_ConfigureProjectTests()
8+
option(OPTIONS_ENABLE_TESTING "Enable Tests Using Catch2" on)
9+
if (OPTIONS_ENABLE_TESTING)
10+
include(cmake/ConfigureProjectTests.cmake)
11+
Core_ConfigureProjectTests()
12+
endif()
1013

11-
include(cmake/ConfigureProjectBenchmark.cmake)
12-
Core_ConfigureProjectBenchmark()
14+
option(OPTIONS_ENABLE_BENCHMARKING "Enable Benchmarks Using Google Benchmarks" on)
15+
if (OPTIONS_ENABLE_BENCHMARKING)
16+
include(cmake/ConfigureProjectBenchmark.cmake)
17+
Core_ConfigureProjectBenchmark()
18+
endif()
1319

1420
add_library(${PROJECT_NAME} INTERFACE include/sorting_algorithms/sort.hpp)
1521
add_library(SortAlgorithmsLibrary ALIAS ${PROJECT_NAME})

0 commit comments

Comments
 (0)