Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Headers.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-11-16 21:03:23 +0300
committerdan sinclair <dj2@everburning.com>2018-11-16 21:03:23 +0300
commit7cb43009d543e90698dd300eb26dfd6d9a9bb100 (patch)
treee829e4fac4de3444078f8360dd0252928de4a017 /CMakeLists.txt
parenta2c529b5dda18838ab4b52f816acfebd774eaab3 (diff)
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()