From 7a6b3261a3114b0182e94bf2395f680e3ae179c3 Mon Sep 17 00:00:00 2001 From: Muhammad Awad Date: Sat, 18 Jan 2025 15:26:20 -0600 Subject: [PATCH] Add `BUILD_EXAMPLES` CMake option Signed-off-by: Muhammad Awad --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50aeeb7541..ecc6346ca5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,7 @@ option(USE_SHARED_CTX "Request support for shared ctx between WG" OFF) option(USE_SINGLE_NODE "Enable single node support only." OFF) option(USE_HOST_SIDE_HDP_FLUSH "Use a polling thread to flush the HDP cache on the host." OFF) option(BUILD_FUNCTIONAL_TESTS "Build the functional tests" ON) +option(BUILD_EXAMPLES "Build the examples" ON) option(BUILD_SOS_TESTS "Build the host-facing tests" OFF) option(BUILD_UNIT_TESTS "Build the unit tests" ON) option(BUILD_LOCAL_GPU_TARGET_ONLY "Build only for GPUs detected on this machine" OFF) @@ -152,7 +153,10 @@ target_include_directories( ############################################################################### add_subdirectory(src) add_subdirectory(tests) -add_subdirectory(examples) + +IF (BUILD_EXAMPLES) + add_subdirectory(examples) +ENDIF() ############################################################################### # HIP