build: add option to disable building examples

If examples are not needed using that option can reduce build time and
output logs so it is easier to spot most important issues/warnings.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Id279cba96ddf25d50a8748555d511d21f243bd7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1047
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Jacek Kalwas 2020-02-27 17:59:20 +01:00 committed by Tomasz Zawadzki
parent b61e2479f5
commit 9b2c645294
3 changed files with 12 additions and 1 deletions

3
CONFIG
View File

@ -73,6 +73,9 @@ CONFIG_TSAN=n
# Build tests
CONFIG_TESTS=y
# Build examples
CONFIG_EXAMPLES=y
# Directory that contains the desired SPDK environment library.
# By default, this is implemented using DPDK.
CONFIG_ENV=

View File

@ -39,7 +39,8 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
DIRS-y += lib
DIRS-y += module
DIRS-$(CONFIG_SHARED) += shared_lib
DIRS-y += examples app include
DIRS-y += app include
DIRS-$(CONFIG_EXAMPLES) += examples
DIRS-$(CONFIG_TESTS) += test
DIRS-$(CONFIG_IPSEC_MB) += ipsecbuild
DIRS-$(CONFIG_ISAL) += isalbuild

7
configure vendored
View File

@ -33,6 +33,7 @@ function usage()
echo " --enable-pgo-capture Enable generation of profile guided optimization data"
echo " --enable-pgo-use Use previously captured profile guided optimization data"
echo " --disable-tests Disable building of tests"
echo " --disable-examples Disable building of examples"
echo ""
echo "Specifying Dependencies:"
echo "--with-DEPENDENCY[=path] Use the given dependency. Optionally, provide the"
@ -240,6 +241,12 @@ for i in "$@"; do
--disable-tests)
CONFIG[TESTS]=n
;;
--enable-examples)
CONFIG[EXAMPLES]=y
;;
--disable-examples)
CONFIG[EXAMPLES]=n
;;
--enable-werror)
CONFIG[WERROR]=y
;;