sorry, that DEP_FILE problem was my fault. It's working correctly. Martin
On Fri, May 20, 2016 at 9:41 AM Martin Ankerl <martin.ank...@gmail.com> wrote: > From what I have understood it seems more safe to use .bat and not .cmd, > because the behavior of the errorlevel is different. From > http://waynes-world-it.blogspot.co.at/2008/08/difference-between-bat-and-cmd.html > : > > > The differences between .CMD and .BAT as far as CMD.EXE is concerned > are: With extensions enabled, PATH/APPEND/PROMPT/SET/ASSOC in .CMD files > will set > ERRORLEVEL regardless of error. .BAT sets ERRORLEVEL only on errors. > > I've created a first attempt of this implementation, please see the > attached patch. It seems to do the trick for my test case, but I couldn't > test it well because unfortunately I've run into a different unrelated > problem: the slashes for the DEP_FILE are in the git version / instead of \ > which makes the ninja build fail. This was not the case with version 3.5.2 > > Martin > > > > On Thu, May 19, 2016 at 10:46 PM Brad King <brad.k...@kitware.com> wrote: > >> 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 >> >> -- > Martin > -- Martin
-- 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://public.kitware.com/mailman/listinfo/cmake-developers