[CMake] add_custom_command( NOT REQUIRED ) ?

J Decker d3ck0r at gmail.com
Tue Mar 11 01:13:40 EDT 2014


While in principle it does encourage better design; like using a LIST() and
removing from that and just copying the correct things in the first place;
it would have been nice it it wasn't always a show-stopper.

All it requires in 'make' files is a prefix of a '-' on the command; but
I'm sure that would break other things; but since the platforms available
for android to build are more limited it might be an ok hack... unless it
got quoted for some reason


On Mon, Mar 10, 2014 at 9:44 PM, David Cole <dlrdave at aol.com> wrote:

> If a custom command fails, it stops the build. It's equivalent to a failed
> compile of a source file.
>
> If you want to avoid it, then wrap the command in a script, and make the
> script eat the error, and return "success" to its caller.
>
>
> If you don't care if the command fails, then why are you running it at
> all? Wouldn't it be faster to run nothing, and pretend that "it ran, but
> failed..." ??
>
> ;-)
>
>
>
>
> -----Original Message-----
> From: J Decker <d3ck0r at gmail.com>
> To: cmake <cmake at cmake.org>
> Sent: Mon, Mar 10, 2014 11:52 pm
> Subject: [CMake] add_custom_command( NOT REQUIRED ) ?
>
>
> Is there no way to specify 'I don't care if this command fails?' since I
> don't have an OUTPUT anyway?
>
>
> the thing is, I had a copy(all in directory, including subdirectories) and
> I had an RM (things that don't belong) which included anything that was a
> directory, but it didn't have a -f option and I didn't really care if it
> was there (warn but don't stop? )
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140310/a74ec09b/attachment-0001.html>


More information about the CMake mailing list