File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
5
5
# C++ standard
6
6
set (CMAKE_CXX_STANDARD 20)
7
7
8
+ option (BENONI_TESTS "Build the Benoni tests" OFF )
9
+ option (BENONI_EXAMPLES "Build the Benoni examples" OFF )
10
+
8
11
if (APPLE )
9
12
add_subdirectory (src/apple )
10
13
elseif (WIN32 )
@@ -14,7 +17,11 @@ elseif(UNIX)
14
17
add_subdirectory (src/linux)
15
18
endif ()
16
19
17
- add_subdirectory (examples)
20
+ if (BENONI_EXAMPLES)
21
+ add_subdirectory (examples)
22
+ endif ()
18
23
19
- enable_testing ()
20
- add_subdirectory (test )
24
+ if (BENONI_TESTS)
25
+ enable_testing ()
26
+ add_subdirectory (test )
27
+ endif ()
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ EXAMPLE = build/examples/http_example
11
11
!endif
12
12
13
13
configure : .always
14
- $(CMAKE ) -B build
14
+ $(CMAKE ) -B build -DBENONI_TESTS:BOOL=ON -DBENONI_EXAMPLES:BOOL=ON
15
15
16
16
build : .always
17
17
$(CLANG_FORMAT ) --style=file -i include/benoni/http.h src/apple/http.mm src/win32/http.cc src/linux/http.cc examples/http_example.cc test/postman-echo-get.cc
You can’t perform that action at this time.
0 commit comments