So I have a command:

add_custom_command(
  OUTPUT myfile.blah
  MAIN DEPENDENCY myfile.orig
  COMMAND ...
  )

Then I add the file to a target:

add_executable(myexec myexec.c myfile.blah)

If myfile.blah disappears and I build myexec via VS, it remakes
myfile.blah, but if the custom command to create myfile.blah fails and
myexec compiles, then myfile.blah's command won't be run again.

Do I need to create a custom target for myfile.blah and then use
add_dependencies?  I was hoping that by adding myfile.blah to the
myexec target that if the myfile.blah command failed it wouldn't
continue to build myexec.

Thanks,
James
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to