Skip to content

Commit

Permalink
Support -DLIB_PROTO_MUTATOR_EXAMPLES:BOOL=OFF to build without examples
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Pipping <sebastian@pipping.org>
  • Loading branch information
hartwork authored and vitalybuka committed Feb 7, 2025
1 parent 5bc6adb commit 75f1720
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enable_language(C)
enable_language(CXX)

option(LIB_PROTO_MUTATOR_TESTING "Enable test building" ON)
option(LIB_PROTO_MUTATOR_EXAMPLES "Enable examples building" ON)
option(LIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF
"Automatically download working protobuf" OFF)
option(LIB_PROTO_MUTATOR_WITH_ASAN "Enable address sanitizer" OFF)
Expand Down Expand Up @@ -143,8 +144,8 @@ endif()

add_subdirectory(src)

if (NOT "${LIB_PROTO_MUTATOR_FUZZER_LIBRARIES}" STREQUAL "" OR
NOT "${FUZZING_FLAGS}" STREQUAL "")
if (LIB_PROTO_MUTATOR_EXAMPLES AND (NOT "${LIB_PROTO_MUTATOR_FUZZER_LIBRARIES}" STREQUAL "" OR
NOT "${FUZZING_FLAGS}" STREQUAL ""))
add_subdirectory(examples EXCLUDE_FROM_ALL)
endif()

Expand Down

0 comments on commit 75f1720

Please sign in to comment.