@@ -33,6 +33,8 @@ make fetch # download and prepare dependant artifacts
3333make build # compile and link
3434 DEBUG=1 # build for debugging
3535 COV=1 # build for coverage analysis (implies DEBUG=1)
36+ PROFILE=1 # enable profiling compile flags (and debug symbols) for release type.
37+ # You can consider this as build type release with debug symbols and -fno-omit-frame-pointer
3638 VARIANT=name # build variant `name`
3739 WHY=1 # explain CMake decisions (into /tmp/cmake.why)
3840make clean # remove build artifacts
@@ -63,10 +65,11 @@ make docker # build docker image
6365make docker-gpu-test # run GPU tests
6466
6567fetch and build options:
66- WITH_TF=0 # SKip TensofFlow
67- WITH_TFLITE=0 # SKip TensofFlowLite
68- WITH_PT=0 # Skip PyTorch
69- WITH_ORT=0 # SKip ONNXRuntime
68+ WITH_TF=0 # SKip TensofFlow
69+ WITH_TFLITE=0 # SKip TensofFlowLite
70+ WITH_PT=0 # Skip PyTorch
71+ WITH_ORT=0 # SKip ONNXRuntime
72+ WITH_UNIT_TESTS=0 # SKip unit tests
7073
7174device selection options (fetch, build, and test):
7275 CPU=1 # build for CPU
@@ -115,10 +118,17 @@ else
115118USE_COVERAGE =off
116119endif
117120
121+ ifeq ($(PROFILE ) ,1)
122+ USE_PROFILE =on
123+ else
124+ USE_PROFILE =off
125+ endif
126+
118127CMAKE_FLAGS += \
119128 -DDEPS_PATH=$(abspath $(DEPS_DIR ) ) \
120129 -DINSTALL_PATH=$(abspath $(INSTALL_DIR ) ) \
121130 -DUSE_COVERAGE=$(USE_COVERAGE ) \
131+ -DUSE_PROFILE=$(USE_PROFILE ) \
122132 -DREDISAI_GIT_SHA=\"$(GIT_SHA ) \" \
123133 -DDEVICE=$(DEVICE )
124134
@@ -138,6 +148,10 @@ ifeq ($(WITH_ORT),0)
138148CMAKE_FLAGS += -DBUILD_ORT=off
139149endif
140150
151+ ifeq ($(WITH_UNIT_TESTS ) ,0)
152+ CMAKE_FLAGS += -DPACKAGE_UNIT_TESTS=off
153+ endif
154+
141155include $(MK ) /defs
142156
143157# ----------------------------------------------------------------------------------------------
0 commit comments