summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-11-16 13:03:23 -0500
committerdan sinclair <dj2@everburning.com>2018-11-16 13:03:23 -0500
commit7cb43009d543e90698dd300eb26dfd6d9a9bb100 (patch)
treee829e4fac4de3444078f8360dd0252928de4a017 /CMakeLists.txt
parenta2c529b5dda18838ab4b52f816acfebd774eaab3 (diff)
downloadSPIRV-Headers-7cb43009d543e90698dd300eb26dfd6d9a9bb100.tar.gz
SPIRV-Headers-7cb43009d543e90698dd300eb26dfd6d9a9bb100.tar.bz2
SPIRV-Headers-7cb43009d543e90698dd300eb26dfd6d9a9bb100.zip
Add option to skip examples.
This CL adds a SPIRV_HEADERS_SKIP_EXAMPLES flag which skips building the example folder.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2488baf..167a3e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,4 +57,12 @@ add_custom_target(install-headers
COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv
$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/include/spirv)
-add_subdirectory(example)
+option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples"
+ ${SPIRV_HEADERS_SKIP_EXAMPLES})
+if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES})
+ set(SPIRV_HEADERS_ENABLE_EXAMPLES ON)
+endif()
+if (SPIRV_HEADERS_ENABLE_EXAMPLES)
+ message(STATUS "Building SPIRV-Header examples")
+ add_subdirectory(example)
+endif()