[cmake-developers] Custom commands with Ninja on Windows
Brad King
brad.king at kitware.com
Thu May 19 16:46:33 EDT 2016
On 05/19/2016 04:31 PM, Martin Ankerl wrote:
> I didn't think about just writing a .cmd (or .bat?) with cmake
The ".cmd" extension is a modern version of ".bat".
> that sounds like the simplest solution!
Yes, assuming we never have a need for ninja placeholder substitution.
Why are one-line response files generated by Ninja not a solution?
Does cmd support them?
> if %errorlevel% neq 0 exit /b %errorlevel%
Yes.
> I have no experience with cmake implementation though, how would you
> find a name for the filename?
First, it can be made conditional on when the command line is really long.
Second, you could just put it in CMakeFiles/ and name it using a hash
of its content (or of the list of outputs). See Source/cmCryptoHash.h
for example.
Thanks,
-Brad
More information about the cmake-developers
mailing list