title: Proper way to call a found executable in a custom command?
body: <p>I have a program on my computer, let's say <code>C:/Tools/generate_v23_debug.exe</code></p>
  
  <p>I have a FindGenerate.cmake file which allows CMake to find that exact path to the executable.  </p>
  
  <p>So in my CMake code, I do:</p>
  
  <pre><code>find_program(Generate)
  if (NOT Generate_FOUND)
      message(FATAL_ERROR "Generator not found!")
  </code></pre>
  
  <p>So CMake has found the executable.  Now I want to call this program in a custom command statement.  Should I use <code>COMMAND Generator</code> or <code>COMMAND ${GENERATOR_EXECUTABLE}</code>?  Will both of these do the same thing?  Is one preferred over the other?  Is name_EXECUTABLE a variable that CMake will define (it's not in the FindGenerate.cmake file), or is it something specific to someone else's example code I'm looking at?  Will <code>COMMAND Generator</code> be expanded to the correct path?</p>
  
  <pre><code>add_custom_command(
      OUTPUT blahblah.txt
      COMMAND Generator inputfile1.log
      DEPENDS Generator
  )
  </code></pre>