From 0c57a083c702609d3e65789338ea2477de92c6f3 Mon Sep 17 00:00:00 2001 From: Justin Brewer Date: Mon, 21 Jan 2019 15:05:04 -0600 Subject: Add ENABLE_EXAMPLES option, off by default Signed-off-by: Justin Brewer --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f3a87f6..d5df625 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) -- cgit v1.2.3