Update CMake condition for Emacs load/save helper
authorDavid Neto <dneto@google.com>
Mon, 12 Sep 2016 20:48:05 +0000 (16:48 -0400)
committerDavid Neto <dneto@google.com>
Mon, 12 Sep 2016 20:51:35 +0000 (16:51 -0400)
Make SPIRV_TOOLS_INSTALL_EMACS_HELPERS a CMake option.  Otherwise
I get a variable-defined-but-not-used error.

CHANGES
tools/emacs/CMakeLists.txt

diff --git a/CHANGES b/CHANGES
index 51cc423..6b04d8e 100644 (file)
--- 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
index ce2cb89..3785771 100644 (file)
 # 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()