<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Brad King wrote:
<blockquote cite="mid4506E8EB.6040800@kitware.com" type="cite">
  <pre wrap="">Arjen Markus wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">    add_custom_target(${CMAKE_CURRENT_BINARY_DIR}/${file} ALL
    </pre>
  </blockquote>
  <pre wrap=""><!---->[snip]
  </pre>
  <blockquote type="cite">
    <pre wrap="">When I run this in ..\build, using
    cmake -G "NMake makefiles" ..\src
    </pre>
  </blockquote>
  <pre wrap=""><!---->[snip]
  </pre>
  <blockquote type="cite">
    <pre wrap="">CMake Error: Cannot open file for write:
C:/arjen/plplot-5.6.1-cmake/testcbs/build/CMakeFiles/C:/arjen/plplot-5.6.1-cmake/testcbs/build/x02.dir/build.make.tmp
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You're creating a high-level target named
"C:/arjen/plplot-5.6.1-cmake/testcbs/build/x02" which is invalid.  I'll
look into adding a better diagnostic for this.

Use ADD_CUSTOM_COMMAND for each of your files and an ADD_CUSTOM_TARGET
to drive them:

<a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F">http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F</a>

  </pre>
</blockquote>
<br>
Thanks, this explains what is going on and the solution you offer
should be <br>
easy to implement.<br>
<br>
Regards,<br>
<br>
Arjen<br>
</body>
</html>