From 26b51ef30c49f7c57eb94d9b19f3cfe2abc9149f Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 12 Sep 2016 16:48:05 -0400 Subject: [PATCH] Update CMake condition for Emacs load/save helper Make SPIRV_TOOLS_INSTALL_EMACS_HELPERS a CMake option. Otherwise I get a variable-defined-but-not-used error. --- CHANGES | 5 ++++- tools/emacs/CMakeLists.txt | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 51cc4234..6b04d8e1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Revision history for SPIRV-Tools -v2016.5-dev 2016-09-01 +v2016.5-dev 2016-09-12 + - Partial fixes: + #359: Add Emacs helper for automatically diassembling/assembling a SPIR-V + binary on file load/save. v2016.4 2016-09-01 - Relicensed under Apache 2.0 diff --git a/tools/emacs/CMakeLists.txt b/tools/emacs/CMakeLists.txt index ce2cb89b..3785771f 100644 --- a/tools/emacs/CMakeLists.txt +++ b/tools/emacs/CMakeLists.txt @@ -35,7 +35,10 @@ # Note that symbol IDs are not preserved through a load/edit/save operation. # This may change if the ability is added to spirv-as. -if (DEFINED SPIRV_TOOLS_INSTALL_EMACS_HELPERS) +option(SPIRV_TOOLS_INSTALL_EMACS_HELPERS + "Install Emacs helper to disassemble/assemble SPIR-V binaries on file load/save." + ${SPIRV_TOOLS_INSTALL_EMACS_HELPERS}) +if (${SPIRV_TOOLS_INSTALL_EMACS_HELPERS}) if(EXISTS /etc/emacs/site-start.d) install(FILES 50spirv-tools.el DESTINATION /etc/emacs/site-start.d) endif()