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

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2016-11-16 18:52:31 +0300
committerDavid Neto <dneto@google.com>2016-11-16 18:52:31 +0300
commit5c19de25107d496a15c7869b3e1dab0a0f85913d (patch)
tree869eb15df6d827043585aa462c22739260ee4f04 /examples
parentc935253c91c687ff3fe42bf9197b81c0b64bfa34 (diff)
Skip building example executable when asked
Diffstat (limited to 'examples')
-rw-r--r--examples/cpp-interface/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/cpp-interface/CMakeLists.txt b/examples/cpp-interface/CMakeLists.txt
index 4e98deded..14f993767 100644
--- a/examples/cpp-interface/CMakeLists.txt
+++ b/examples/cpp-interface/CMakeLists.txt
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_executable(spirv-tools-cpp-example main.cpp)
-spvtools_default_compile_options(spirv-tools-cpp-example)
-target_link_libraries(spirv-tools-cpp-example PRIVATE SPIRV-Tools-opt)
+if (NOT ${SPIRV_SKIP_EXECUTABLES})
+ add_executable(spirv-tools-cpp-example main.cpp)
+ spvtools_default_compile_options(spirv-tools-cpp-example)
+ target_link_libraries(spirv-tools-cpp-example PRIVATE SPIRV-Tools-opt)
+endif()