Add ENABLE_EXAMPLES option, off by default

Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
master
Justin Brewer 2019-01-21 15:05:04 -06:00 committed by Mark Nunberg
parent bbad21f5ca
commit 0c57a083c7
1 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
INCLUDE(GNUInstallDirs)
PROJECT(redisearch)
SET(ENABLE_EXAMPLES OFF CACHE BOOL "Enable building hiredis examples")
# Get the version numbers
MACRO(getVersionBit name)
@ -46,5 +48,6 @@ ADD_EXECUTABLE(hiredis-test
TARGET_LINK_LIBRARIES(hiredis-test hiredis)
# Add examples
ADD_SUBDIRECTORY(examples)
IF(ENABLE_EXAMPLES)
ADD_SUBDIRECTORY(examples)
ENDIF(ENABLE_EXAMPLES)