[CMake] add_custom_command( NOT REQUIRED ) ?

David Cole dlrdave at aol.com
Tue Mar 11 00:44:57 EDT 2014


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

  


More information about the CMake mailing list