<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">In this example, how do I get</div><div class="">   make <a href="http://foo.cc" class="">foo.cc</a></div><div class="">to work?</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 9px; font-family: Menlo; color: rgb(255, 207, 130); background-color: rgb(5, 13, 17);" class=""><div style="margin: 0px;" class="">0 Thu 16:56:19 yost DaveBook ~/p/c++/cmake/custom-command-target</div><div style="margin: 0px; color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ffcf82" class="">369 Z% </span>bundle CMakeLists.txt genFoo</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">#!/usr/bin/env unbundle</div><div style="margin: 0px; color: rgb(255, 255, 255);" class=""># See <a href="http://yost.com/computers/bundle/" class="">http://yost.com/computers/bundle/</a></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">======== CMakeLists.txt</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">cmake_minimum_required(VERSION 3.3.0)</div><div style="margin: 0px; color: rgb(255, 255, 255); min-height: 10px;" class=""><br class=""></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">project(custom-command-target)</div><div style="margin: 0px; color: rgb(255, 255, 255); min-height: 10px;" class=""><br class=""></div><div style="margin: 0px; color: rgb(255, 255, 255); min-height: 10px;" class=""><br class=""></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">add_custom_command (</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">  OUTPUT  <a href="http://foo.cc" class="">foo.cc</a></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">  COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/genFoo > <a href="http://foo.cc" class="">foo.cc</a></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">  )</div><div style="margin: 0px; color: rgb(255, 255, 255); min-height: 10px;" class=""><br class=""></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">add_executable (foo <a href="http://foo.cc" class="">foo.cc</a>)</div><div style="margin: 0px; color: rgb(255, 255, 255); min-height: 10px;" class=""><br class=""></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">======== genFoo</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">#!/bin/bash</div><div style="margin: 0px; color: rgb(255, 255, 255); min-height: 10px;" class=""><br class=""></div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">echo "</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">int main() {</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">  return 0;</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">}"</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">========</div><div style="margin: 0px;" class="">0 Thu 16:56:23 yost DaveBook ~/p/c++/cmake/custom-command-target</div><div style="margin: 0px; color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ffcf82" class="">370 Z% </span>cd build                                                </div><div style="margin: 0px;" class="">0 Thu 16:56:36 yost DaveBook ~/p/c++/cmake/custom-command-target/build</div><div style="margin: 0px; color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ffcf82" class="">371 Z% </span>cmake ..                                                </div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">-- Configuring done</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">-- Generating done</div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">-- Build files have been written to: /Users/yost/p/c++/cmake/custom-command-target/build</div><div style="margin: 0px;" class="">0 Thu 16:56:41 yost DaveBook ~/p/c++/cmake/custom-command-target/build</div><div style="margin: 0px; color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ffcf82" class="">372 Z% </span>make clean                                              </div><div style="margin: 0px;" class="">0 Thu 16:56:45 yost DaveBook ~/p/c++/cmake/custom-command-target/build</div><div style="margin: 0px; color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ffcf82" class="">373 Z% </span>make <a href="http://foo.cc" class="">foo.cc</a>                                             </div><div style="margin: 0px; color: rgb(255, 255, 255);" class="">make: *** No rule to make target '<a href="http://foo.cc" class="">foo.cc</a>'.  Stop.</div><div style="margin: 0px;" class="">2 Thu 16:56:49 yost DaveBook ~/p/c++/cmake/custom-command-target/build</div><div style="margin: 0px;" class="">374 Z% </div><div class=""><br class=""></div></div></div><div class=""><br class=""></div></body></html>