Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 7:08 PM, Peter Kümmel wrote: So we don't need any ninja patches, neither for msvc nor for mingw. All tests pass with ninja master. WOW! Congrats, this is awesome. The windows ninja dashboard is totally green today. Thanks for all the hard work, this is really great stuff. It is now the official speed daemon for windows builds. Look at this machine: http://open.cdash.org/index.php?project=CMakedate=2012-06-13filtercount=1showfilters=1field1=site/stringcompare1=63value1=dash2win64 ninja wins in build and test time over jom, nmake, and gmake! The only thing left for ninja now is the OSX framework and bundle stuff. Also, we have to figure out how to get it to fortran 90 module depend stuff. But, windows is now done! I guess I also need to setup a ninja mingw dashboard. Thanks. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/13/2012 9:31 AM, Amine Khaldi wrote: Please don't consider Windows as done until proper dependency tracking is in place (it's lacking so far for rc files). OK, so we need a test for rc file depend tracking. I did not realize that was still missing. We have it for c/c++ now. I am guessing there is no rc /showincludes option. I guess the thing to do there is to use the cmake parser and write a cmrcdep executable that uses the cmake depend stuff and then calls rc. Are you interested in doing that? -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 13.06.2012 15:16, Bill Hoffman wrote: On 6/12/2012 7:08 PM, Peter Kümmel wrote: So we don't need any ninja patches, neither for msvc nor for mingw. All tests pass with ninja master. WOW! Congrats, this is awesome. The windows ninja dashboard is totally green today. Thanks for all the hard work, this is really great stuff. It is now the official speed daemon for windows builds. Look at this machine: http://open.cdash.org/index.php?project=CMakedate=2012-06-13filtercount=1showfilters=1field1=site/stringcompare1=63value1=dash2win64 Nice link, especially when Advanced View is clicked. ninja wins in build and test time over jom, nmake, and gmake! And configuring takes longer than building ;) But ninja automatically uses -j n+2 (n number of processors) Are the other build also multi threaded? The only thing left for ninja now is the OSX framework and bundle stuff. Also, we have to figure out how to get it to fortran 90 module depend stuff. But, windows is now done! I guess I also need to setup a ninja mingw dashboard. Thanks. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On Wed, Jun 13, 2012 at 05:34:14PM +0200, Peter Kümmel wrote: On 13.06.2012 15:31, Amine Khaldi wrote: Please don't consider Windows as done until proper dependency tracking is in place (it's lacking so far for rc files). Please test stage. I've added rc file dependency tracking. It's a bit brute force because I feed cl.exe with the .rc file and collect the included files. This works as long as all #includes are done before cl.exe stops because of rc specific stuff. I don't know if cmake could do it better. You could invoke cl.exe in preprocessor-only mode (/P /DRC_INVOKED), and then supply its output to rc.exe. This also prevents cl.exe from uselessly trying to compile the resource file as a C program. Thanks, -- Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 13.06.2012 18:09, Peter Collingbourne wrote: On Wed, Jun 13, 2012 at 05:34:14PM +0200, Peter Kümmel wrote: On 13.06.2012 15:31, Amine Khaldi wrote: Please don't consider Windows as done until proper dependency tracking is in place (it's lacking so far for rc files). Please test stage. I've added rc file dependency tracking. It's a bit brute force because I feed cl.exe with the .rc file and collect the included files. This works as long as all #includes are done before cl.exe stops because of rc specific stuff. I don't know if cmake could do it better. You could invoke cl.exe in preprocessor-only mode (/P /DRC_INVOKED), and then supply its output to rc.exe. This also prevents cl.exe from uselessly trying to compile the resource file as a C program. Yes, this looks like a more advanced solution. We only need to extract #line 1234 c:\... from the generated file. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/13/2012 12:41 PM, Peter Kümmel wrote: Yes, this looks like a more advanced solution. We only need to extract #line 1234 c:\... from the generated file. Peter -- Just do this: cl /P /showIncludes Then it won't error out, and will show the includes in the same format. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 13.06.2012 18:53, Bill Hoffman wrote: On 6/13/2012 12:41 PM, Peter Kümmel wrote: Yes, this looks like a more advanced solution. We only need to extract #line 1234 c:\... from the generated file. Peter -- Just do this: cl /P /showIncludes Then it won't error out, and will show the includes in the same format. Yes, perfect! -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On Wed, Jun 13, 2012 at 1:20 PM, Peter Kümmel syntheti...@gmx.net wrote: On 13.06.2012 18:53, Bill Hoffman wrote: On 6/13/2012 12:41 PM, Peter Kümmel wrote: Yes, this looks like a more advanced solution. We only need to extract #line 1234 c:\... from the generated file. Peter -- Just do this: cl /P /showIncludes Then it won't error out, and will show the includes in the same format. Yes, perfect! -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/** opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-**bin/mailman/listinfo/cmake-**developershttp://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/** opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-**bin/mailman/listinfo/cmake-**developershttp://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers I just committed the CMakeLists file to enable the ninja generator by default on Windows now that we have all the CMake test suite passing. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2077e98753a505490d16cba42af0e0cae04f2c36 Nice job to all the Ninja+CMake contributors. Congrats! -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Putting quotes in and then taking them out. Where do the quotes come from? Is there another way to put paths with spaces into ninja? Yes sounds strange, but atm I've no better idea, ninja adds the quotes because it internally has a space separated list, see the link in my comment in merge request: https://github.com/martine/ninja/pull/324 This is the reason for the patch: http://open.cdash.org/testDetails.php?test=149373149build=2355021 Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
One of my last changes was to replaces back slashes with slashes exactly because of \../../ problems. Have you used cl and recent next? With cl and recent next: * Our host tools (the host-tools folder) basically get rebuilt everytime you run ninja, and -d explain suggests x86 is dirty and /Windows Kits/8.0/include/shared/sal.h is dirty...etc because we end up with entries like C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/ConcurrencySal.h and C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/sal.h in the .d files. * As to ros itself, ntoskrnl produces a correct ninja: no work to do. when you rebuild and also tracks this E:/reactos/ntoskrnl/include/../mm/ARM3/miarm.h correctly if you alter it (leading to the recompilation of the dependent files). * Here we also lack the dependency tracking of the includes inside rc files. With gcc (windows) and recent next: * Our host tools (the host-tools folder) basically get rebuilt everytime you run ninja, and -d explain suggests psdk/guiddef.h is dirty (because of e:\reactos\include\host/../psdk/guiddef.h in the .d files) and reactos/wine/rpcfc.h is dirty (because of e:\reactos\include\host/wine/../../reactos/wine/rpcfc.h)... etc. * As to ros itself, ntoskrnl gets recompiled everytime, because of entries like e:\reactos\ntoskrnl\include/../kdbg/kdb.h and e:\reactos\ntoskrnl\include/../mm/ARM3/miarm.h... etc. Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 11.06.2012 13:23, Amine Khaldi wrote: Another thing I noticed while testing ReactOS is that we end up with entries like e:\reactos\ntoskrnl\include/../mm/ARM3/miarm.h (for example) in the .d files, and this triggers recompiles. If this /../ construct is eliminated (not that it's practically possible, I did it just for testing) the dependency works fine. Is fixed now, slashes are used: ninja ntoskrnl ninja: no work to do. Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 13:47, Amine Khaldi wrote: One of my last changes was to replaces back slashes with slashes exactly because of \../../ problems. Have you used cl and recent next? With cl and recent next: * Our host tools (the host-tools folder) basically get rebuilt everytime you run ninja, and -d explain suggests x86 is dirty and /Windows Kits/8.0/include/shared/sal.h is dirty...etc because we end up with entries like C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/ConcurrencySal.h and C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/sal.h in the .d files. Fixed. It was because of the parentheses. Such paths will be ignored. * As to ros itself, ntoskrnl produces a correct ninja: no work to do. when you rebuild and also tracks this E:/reactos/ntoskrnl/include/../mm/ARM3/miarm.h correctly if you alter it (leading to the recompilation of the dependent files). * Here we also lack the dependency tracking of the includes inside rc files. rc doesn't support something like /showInclude. Only idea I have to feed cl with the .rc file and to hope it prints the include paths before it breaks. But I don't know if it worth the effort. With gcc (windows) and recent next: * Our host tools (the host-tools folder) basically get rebuilt everytime you run ninja, and -d explain suggests psdk/guiddef.h is dirty (because of e:\reactos\include\host/../psdk/guiddef.h in the .d files) and reactos/wine/rpcfc.h is dirty (because of e:\reactos\include\host/wine/../../reactos/wine/rpcfc.h)... etc. * As to ros itself, ntoskrnl gets recompiled everytime, because of entries like e:\reactos\ntoskrnl\include/../kdbg/kdb.h and e:\reactos\ntoskrnl\include/../mm/ARM3/miarm.h... etc. Fixed by using slashes. Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
The gcc build issues are all fixed. Thanks ! The cl scenario for host-tools remains, I'm still getting entries like C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/ConcurrencySal.h and C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/sal.h Thank you for looking into the rc handling too ;) Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 14:58, Amine Khaldi wrote: The gcc build issues are all fixed. Thanks ! The cl scenario for host-tools remains, I'm still getting entries like C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/ConcurrencySal.h and C:/Program\ Files\ (x86)/Windows\ Kits/8.0/include/shared/sal.h Have you also rebuild cmcldeps? Thank you for looking into the rc handling too ;) Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Have you also rebuild cmcldeps? That was it. My VS generated solution didn't have cmcldeps listed among the modules, so I only rebuilt cmake. I confirm it works. Excellent work Peter, thanks. Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 5:27 AM, Peter Kümmel wrote: Yes sounds strange, but atm I've no better idea, ninja adds the quotes because it internally has a space separated list, see the link in my comment in merge request: https://github.com/martine/ninja/pull/324 This is the reason for the patch: http://open.cdash.org/testDetails.php?test=149373149build=2355021 Peter As I suspected the pull request is getting some questions. It seems like it is in the wrong place. Seems like the code that reads the string should be stripping it. When ninja read the string: C:\Dashboards\My Tests\CMake-ninja-build\Tests\OutOfBinary\CMakeFiles\outlib.dir\outlib.c.obj, it should have removed the start and end quotes if it found them. C:\Dashboards\My Tests\CMake-ninja-build\Tests\OutOfBinary\CMakeFiles\outlib.dir\outlib.c.obj.d -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 15:37, Bill Hoffman wrote: On 6/12/2012 5:27 AM, Peter Kümmel wrote: Yes sounds strange, but atm I've no better idea, ninja adds the quotes because it internally has a space separated list, see the link in my comment in merge request: https://github.com/martine/ninja/pull/324 This is the reason for the patch: http://open.cdash.org/testDetails.php?test=149373149build=2355021 Peter As I suspected the pull request is getting some questions. It seems like it is in the wrong place. Seems like the code that reads the string should be stripping it. When you debug it, you will see that it is not that simple. When the path is read you don't know what is done with it later on. And feeding fopen with is wrong anyway. When ninja read the string: C:\Dashboards\My Tests\CMake-ninja-build\Tests\OutOfBinary\CMakeFiles\outlib.dir\outlib.c.obj, it should have removed the start and end quotes if it found them. C:\Dashboards\My Tests\CMake-ninja-build\Tests\OutOfBinary\CMakeFiles\outlib.dir\outlib.c.obj.d -Bill -- -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 11:21 AM, Peter Kümmel wrote: When you debug it, you will see that it is not that simple. When the path is read you don't know what is done with it later on. Where is it read? Seems like at that point it does not matter where it is used later one. Once you read it in, it should strip them, and store it internally as a string. It would only need to be quoted again if it was being written out to the disk again. And feeding fopen with is wrong anyway. -- Bill Hoffman Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 bill.hoff...@kitware.com http://www.kitware.com 518 881-4905 (Direct) 518 371-3971 x105 Fax (518) 371-4573 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 17:43, Bill Hoffman wrote: On 6/12/2012 11:21 AM, Peter Kümmel wrote: When you debug it, you will see that it is not that simple. When the path is read you don't know what is done with it later on. Where is it read? Seems like at that point it does not matter where it is used later one. Once you read it in, it should strip them, and store it internally as a string. It would only need to be quoted again if it was being written out to the disk again. Here: https://github.com/syntheticpp/ninja/blob/master/src/graph.cc#L195 And the loop also builds the list of source files for the compiler, for instance: c:\my build\a.cpp c:\my build\b.cpp c:\my build\c.cpp in this case you need the quotes. But in case of a dependency file, which should be read from disk it must not have quotes. You could only speculate what will happen. All you know is that you evaluate the $out variable. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 11:21 AM, Peter Kümmel wrote: When you debug it, you will see that it is not that simple. When the path is read you don't know what is done with it later on. And feeding fopen with is wrong anyway. BTW, you can create files with in the name on Windows, just not from explorer: touch \ $ ls -l total 69 -rw-r--r-- 1 hoffman Domain Users0 Jun 12 12:05 -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 18:07, Bill Hoffman wrote: On 6/12/2012 11:21 AM, Peter Kümmel wrote: When you debug it, you will see that it is not that simple. When the path is read you don't know what is done with it later on. And feeding fopen with is wrong anyway. BTW, you can create files with in the name on Windows, just not from explorer: touch \ Maybe you should use \ \ as build folder ;) $ ls -l total 69 -rw-r--r-- 1 hoffman Domain Users0 Jun 12 12:05 -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 1:22 PM, Peter Kümmel wrote: Maybe you should use \ \ as build folder ;) I agree, it is crazy Well, lets hope you can get them to accept your changes upstream. One thing that might help is if you created a case that failed on linux with spaces in the path. They seem to care more about that than windows :) -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
One more thing... Why is the MFC test failing now? -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 19:27, Bill Hoffman wrote: On 6/12/2012 1:22 PM, Peter Kümmel wrote: Maybe you should use \ \ as build folder ;) I agree, it is crazy Well, lets hope you can get them to accept your changes upstream. I found a much simpler patch: https://github.com/syntheticpp/ninja/commit/0ea34053a4692f190b8c13ce0ff032a57cece047 Could you please have a look at it before I create a merge request? Peter One thing that might help is if you created a case that failed on linux with spaces in the path. They seem to care more about that than windows :) -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 1:44 PM, Peter Kümmel wrote: I found a much simpler patch: https://github.com/syntheticpp/ninja/commit/0ea34053a4692f190b8c13ce0ff032a57cece047 Could you please have a look at it before I create a merge request? I would change RemoveQuotes to only remove them if they are at the start and end of the string. Something like this: if(str.size() == 0) return str; if (str[0] == '\' str[str.size()-1] == '\') { cleaned = str.substr(1, str.size()-2); return cleaned; } return str; -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 19:59, Bill Hoffman wrote: On 6/12/2012 1:44 PM, Peter Kümmel wrote: I found a much simpler patch: https://github.com/syntheticpp/ninja/commit/0ea34053a4692f190b8c13ce0ff032a57cece047 Could you please have a look at it before I create a merge request? I would change RemoveQuotes to only remove them if they are at the start and end of the string. Something like this: if(str.size() == 0) return str; if (str[0] == '\' str[str.size()-1] == '\') { cleaned = str.substr(1, str.size()-2); return cleaned; } return str; OK, but we need to handle strings like this: ... \outlib.dir\outlib.c.obj.d Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 2:30 PM, Peter Kümmel wrote: OK, but we need to handle strings like this: ... \outlib.dir\outlib.c.obj.d Peter OK, so where does the .d get added? That seems like the problem. It should not be adding a .d to the end of a quoted string. -- Bill Hoffman Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 bill.hoff...@kitware.com http://www.kitware.com 518 881-4905 (Direct) 518 371-3971 x105 Fax (518) 371-4573 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 20:54, Bill Hoffman wrote: On 6/12/2012 2:30 PM, Peter Kümmel wrote: OK, but we need to handle strings like this: ... \outlib.dir\outlib.c.obj.d Peter OK, so where does the .d get added? That seems like the problem. It should not be adding a .d to the end of a quoted string. Defined in rules.ninja: # # Rule for compiling CXX files. rule CXX_COMPILER depfile = $out.d And $out is given by build.ninja: # = # Object build statements for EXECUTABLE target cmIML_test build Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj: C_COMPILER -- depfile = $out.d = c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj.d Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 21:10, Peter Kümmel wrote: On 12.06.2012 20:54, Bill Hoffman wrote: On 6/12/2012 2:30 PM, Peter Kümmel wrote: OK, but we need to handle strings like this: ... \outlib.dir\outlib.c.obj.d Peter OK, so where does the .d get added? That seems like the problem. It should not be adding a .d to the end of a quoted string. Defined in rules.ninja: # # Rule for compiling CXX files. rule CXX_COMPILER depfile = $out.d And $out is given by build.ninja: # = # Object build statements for EXECUTABLE target cmIML_test build Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj: C_COMPILER -- depfile = $out.d = c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj.d First its evaluates the variable out https://github.com/syntheticpp/ninja/blob/master/src/eval_env.cc#L36 - c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj then it appends a RAW string https://github.com/syntheticpp/ninja/blob/master/src/eval_env.cc#L34 - c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj.d Peter -- -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 3:10 PM, Peter Kümmel wrote: -- depfile = $out.d = c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj.d Maybe this should be mentioned on the ninja mailing list. If this were CMake, I would say that the should be stripped when $out is being expanded. It just seems like this is a fundamental issue with ninja and handling spaces in the path with .d files. How does it work on linux? I guess it uses foo\ space? The way this is handled in CMake, is that all paths inside a CMake file have to be posix style using / even on windows. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 21:17, Bill Hoffman wrote: On 6/12/2012 3:10 PM, Peter Kümmel wrote: -- depfile = $out.d = c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj.d Maybe this should be mentioned on the ninja mailing list. If this were CMake, I would say that the should be stripped when $out is being expanded. It just seems like this is a fundamental issue with ninja and handling spaces in the path with .d files. Yes, that's the reason why that patches look so ugly. How does it work on linux? I guess it uses foo\ space? The way this is handled in CMake, is that all paths inside a CMake file have to be posix style using / even on windows. But I found a ninja-patch free solution. Busy with testing now Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/12/2012 3:15 PM, Peter Kümmel wrote: First its evaluates the variable out https://github.com/syntheticpp/ninja/blob/master/src/eval_env.cc#L36 - c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj So, if this removed the quotes would it work: env-LookupVariable(i-first) Remove the start and end quotes from the lookup? then it appends a RAW string https://github.com/syntheticpp/ninja/blob/master/src/eval_env.cc#L34 - c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj.d Again, I think this should be moved to the ninja mailing list. My goal is to create a patch that makes them happen and works with spaces in the path on windows. Also, since ninja devs care more about linux if the problem could be re-created there that might help, but I suspect it can not be... -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 21:30, Bill Hoffman wrote: On 6/12/2012 3:15 PM, Peter Kümmel wrote: First its evaluates the variable out https://github.com/syntheticpp/ninja/blob/master/src/eval_env.cc#L36 - c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj So, if this removed the quotes would it work: env-LookupVariable(i-first) Remove the start and end quotes from the lookup? then it appends a RAW string https://github.com/syntheticpp/ninja/blob/master/src/eval_env.cc#L34 - c:\my build\Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj.d Again, I think this should be moved to the ninja mailing list. My goal is to create a patch that makes them happen and works with spaces in the path on windows. Also, since ninja devs care more about linux if the problem could be re-created there that might help, but I suspect it can not be... Found a way around $out.d, the dep file path is now passed explicitly by DEP_FILE: # # Rule for compiling C files. rule C_COMPILER depfile = $DEP_FILE # Object build statements for EXECUTABLE target testing build CMakeFiles/testing.dir/testing.cxx.obj: CXX_COMPILER E$:/sandbox/cmake/cmake$ with$ spaces/Tests/Testing/testing.cxx DEP_FILE = CMakeFiles/testing.dir/testing.cxx.obj.d So we don't need any ninja patches, neither for msvc nor for mingw. All tests pass with ninja master. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 19:28, Bill Hoffman wrote: One more thing... Why is the MFC test failing now? Was a bug. rc files were compiled with cl. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Hi, I just tested this with ReactOS and the results are really promising ! Thank you Peter for working on this. One thing I noticed is the lack of dependency tracking for the resource files (*.rc, they are compiled with rc and not cl). If you #include a file in an .rc and then alter that included file, nothing will happen. We had the same problem with the gcc builds, but since windres is more flexible re. the preprocessor pass, I introduced this line into our cmake files: set(CMAKE_DEPFILE_FLAGS_RC --preprocessor \CMAKE_C_COMPILER -E -xc-header -MMD -MF DEPFILE -MT OBJECT\) I wonder what would be the solution in order to track such dependencies with the msvc toolchain. Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Another thing I noticed while testing ReactOS is that we end up with entries like e:\reactos\ntoskrnl\include/../mm/ARM3/miarm.h (for example) in the .d files, and this triggers recompiles. If this /../ construct is eliminated (not that it's practically possible, I did it just for testing) the dependency works fine. Regards, Amine. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 11.06.2012 13:23, Amine Khaldi wrote: Another thing I noticed while testing ReactOS is that we end up with entries like e:\reactos\ntoskrnl\include/../mm/ARM3/miarm.h (for example) in the .d files, and this triggers recompiles. If this /../ construct is eliminated (not that it's practically possible, I did it just for testing) the dependency works fine. One of my last changes was to replaces back slashes with slashes exactly because of \../../ problems. Have you used cl and recent next? Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
All tests pass now for MSVC and MinGW! With some small patches for ninja: https://github.com/syntheticpp/ninja/commits/ninja-for-cmake The changes are only needed for msvc when the build dir path contains spaces, and for mingw because of slashes in path names. Cheers, Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/11/2012 10:21 PM, Peter Kümmel wrote: All tests pass now for MSVC and MinGW! With some small patches for ninja: https://github.com/syntheticpp/ninja/commits/ninja-for-cmake The changes are only needed for msvc when the build dir path contains spaces, and for mingw because of slashes in path names. Great work. Nice to see. What are the chances of those changes being accepted upstream? I am a bit concerned about the quote stuff. Putting quotes in and then taking them out. Where do the quotes come from? Is there another way to put paths with spaces into ninja? Most of the tests except the depend stuff was passing with spaces in the path before these changes. Is this all about the .d file contents? -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 12.06.2012 04:33, Bill Hoffman wrote: On 6/11/2012 10:21 PM, Peter Kümmel wrote: All tests pass now for MSVC and MinGW! With some small patches for ninja: https://github.com/syntheticpp/ninja/commits/ninja-for-cmake The changes are only needed for msvc when the build dir path contains spaces, and for mingw because of slashes in path names. Great work. Nice to see. What are the chances of those changes being accepted upstream? I am a bit concerned about the quote stuff. The patches are not critical, but there's not much traffic the last days. Putting quotes in and then taking them out. Where do the quotes come from? Is there another way to put paths with spaces into ninja? Yes sounds strange, but atm I've no better idea, ninja adds the quotes because it internally has a space separated list, see the link in my comment in merge request: https://github.com/martine/ninja/pull/324 But I think the patch is straight forward. The Win32 functions simply don't need them, even worse they reject the quoted path as Invalid argument. Most of the tests except the depend stuff was passing with spaces in the path before these changes. Is this all about the .d file contents? Yes, ninja can't open the .d files when they are behind a space and stops. It works when your build folder has no spaces. The other patch also isn't critical. https://github.com/martine/ninja/pull/322 It's like a fall back. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 09.06.2012 16:22, Óscar Fuentes wrote: After looking that the ouptput of ninja -v, the problem is that ninja is recompiling some of the source files of llvm-tblgen.exe, which regenerates the llvm-tblgen.exe executable, which in turn triggers the regeneration of the files produced using that tool. ninja -d explain shows the files which are dirty, and having a look at the .d files shows that ninja couldn't parse them. (\\../) I've switched to slashes in .d files and this fixes it. All in stage/next, or https://sourceforge.net/projects/cmakescript/files/ ninja/master is ok when don't have spaces in your paths, otherwise ninja must be patched. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Peter Kümmel syntheti...@gmx.net writes: ninja -d explain shows the files which are dirty, and having a look at the .d files shows that ninja couldn't parse them. (\\../) I've switched to slashes in .d files and this fixes it. All in stage/next, or https://sourceforge.net/projects/cmakescript/files/ ninja/master is ok when don't have spaces in your paths, otherwise ninja must be patched. After updating to the latest binaries everything seems ok. Thanks! On Linux, cmake+gmake is fast enough even for middle-sized projects like LLVM+Clang, but on Windows with Visual Studio, the available options such as msbuild, devenv, nmake and jom are annoyingly slow and inefficient while ninja is extremely fast, so I'm very happy to see this project maturing. Thanks again. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 09.06.2012 01:29, Óscar Fuentes wrote: Peter Kümmelsyntheti...@gmx.net writes: It is not getting that far. It is not even running cmcldeps. :) The command= line is bad, so nothing builds, and we get no .d files. I added parentheses around cmcldeps, it should work now. With your binaries from 2 hours ago, changes on header files are correctly detected on my C++ projects. Thanks! LLVM builds fine, although re-running ninja results on re-executing all tablegen commands. Even with all those 70 or so tablegen invocations, ninja does a no-op rebuild in 16 seconds, which is faster than a true no-op rebuild with jom and much faster than msbuild. Windows XP SP3 32 bits, Visual Studio 2010. Many thanks for testing! I'm glad it mostly works. I assume the tablegen commands are some scripts and not compiler calls, maybe it can't find the generated one. Could you make a verbose run (-v) and post one rebuild? Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 09.06.2012 03:28, Bill Hoffman wrote: fails in a new way: http://open.cdash.org/viewConfigure.php?buildid=2345213 FAILED: CMAKE_CMCLDEPS_EXECUTABLE-NOTFOUND testCXXCompiler.cxx CMakeFiles\cmTryCompileExec4166421573.dir\testCXXCompiler.cxx.obj.d CMakeFiles\cmTryCompileExec4166421573.dir\testCXXCompiler.cxx.obj Note: including file: C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /TP /FoCMakeFiles\cmTryCompileExec4166421573.dir\testCXXCompiler.cxx.obj /FdcmTryCompileExec4166421573.pdb -c testCXXCompiler.cxx CreateProcess failed: The system cannot find the file specified. For testing your system is better than any build server ;) I did a FIND_PROGRAM for setting CMAKE_CMCLDEPS_EXECUTABLE, now cmake.exe in CMAKE_COMMAND is simply replaced by cmcldeps.exe. But it seems I have also to switch to a patch with spaces. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 09.06.2012 09:10, Peter Kümmel wrote: On 09.06.2012 01:29, Óscar Fuentes wrote: Peter Kümmelsyntheti...@gmx.net writes: It is not getting that far. It is not even running cmcldeps. :) The command= line is bad, so nothing builds, and we get no .d files. I added parentheses around cmcldeps, it should work now. With your binaries from 2 hours ago, changes on header files are correctly detected on my C++ projects. Thanks! LLVM builds fine, although re-running ninja results on re-executing all tablegen commands. Even with all those 70 or so tablegen invocations, ninja does a no-op rebuild in 16 seconds, which is faster than a true no-op rebuild with jom and much faster than msbuild. Windows XP SP3 32 bits, Visual Studio 2010. Does clang has another build system which supports ninja? Then we could compare the generated files. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Hi Peter, I agree, we need your/our changes at upstream! I will switch to our github: https://github.com/syntheticpp/ninja On little more about ninja bootstrap: Original bootstrap.py generated target rule: ninja -t clean does a really distclean. The re2c generted files are removed too! To be save, I added a rule to build/update them if needed: # set (RE2C_FOUND FALSE) find_program (RE2C_EXECUTABLE re2c) if (RE2C_EXECUTABLE) set (RE2C_FOUND TRUE) set (RE2C_FLAGS -b -i --no-generation-date) # build src/depfile_parser.cc: re2c src/depfile_parser.in.cc # build src/lexer.cc: re2c src/lexer.in.cc foreach(_in depfile_parser.in.cc lexer.in.cc) string(REGEX REPLACE .in.cc .cc _out ${_in}) message(STATUS Generate re2c src/${_in} -o src/${_out}) # CMake atrocity: if none of these OUTPUT files is used in a target in # the current CMakeLists.txt file, the ADD_CUSTOM_COMMAND is plainly # ignored and left out of the make files. add_custom_command(OUTPUT ${srcdir}/${_out} COMMAND ${RE2C_EXECUTABLE} ${${RE2C_FLAGS}} -o ${srcdir}/$ {_out} ${srcdir}/${_in} DEPENDS ${srcdir}/${_in} ) endforeach() endif (RE2C_EXECUTABLE) claus-kleins-macbook-pro:build clausklein$ ninja -d explain ninja: no work to do. claus-kleins-macbook-pro:build clausklein$ touch ../src/lexer.in.cc claus-kleins-macbook-pro:build clausklein$ ninja -d explain ninja explain: restat of output ../src/lexer.cc older than inputs ninja explain: ../src/lexer.cc is dirty ninja explain: ../src/lexer.cc is dirty ninja explain: CMakeFiles/ninja_lib.dir/src/lexer.cc.o is dirty ninja explain: libninja_lib.a is dirty ninja explain: ninja is dirty ninja explain: libninja_lib.a is dirty [4/4] Linking CXX executable ninja claus-kleins-macbook-pro:build clausklein$ //Regards Claus On 08.06.2012, at 23:13, Peter Kümmel wrote: Will it merged later? Can you please apply my time-stamp patch? More interesting would be to bring it upstream. P.S. I tried to compile it with your CMakeLists.txt file, but it needs love on linux (UNIX) build hosts. Oh, yes, thanks. The last day I'm only on windows. //Regards Claus -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 09.06.2012 10:02, Claus Klein wrote: Hi Peter, I agree, we need your/our changes at upstream! I will switch to our github: https://github.com/syntheticpp/ninja In times of git there is no our repository any more. You could simply fork martine/ninja and push you changes into your fork. Then, when you think something should go upstream, create a merge request. You could track multiple repositories by using git remote, for instance in my cmake dir it looks like this: $ git remote -v origin git://cmake.org/cmake.git (fetch) origin git://cmake.org/cmake.git (push) pcc https://github.com/pcc/CMake.git (fetch) pcc https://github.com/pcc/CMake.git (push) polrop https://github.com/polrop/CMake.git (fetch) polrop https://github.com/polrop/CMake.git (push) stage g...@cmake.org:stage/cmake.git (fetch) stage g...@cmake.org:stage/cmake.git (push) steveires git://gitorious.org/~steveire/cmake/steveires-cmake.git (fetch) steveires git://gitorious.org/~steveire/cmake/steveires-cmake.git (push) syntheticpp g...@github.com:syntheticpp/CMake.git (fetch) syntheticpp g...@github.com:syntheticpp/CMake.git (push) On little more about ninja bootstrap: Original bootstrap.py generated target rule: ninja -t clean does a really distclean. The re2c generted files are removed too! Yes, you have to checkout again. When you don't have changes checkout -f is the fasted way. To be save, I added a rule to build/update them if needed: Mostly I use my cmake file. Their python scripts are a bit sub-optimal. # set (RE2C_FOUND FALSE) find_program (RE2C_EXECUTABLE re2c) if (RE2C_EXECUTABLE) set (RE2C_FOUND TRUE) set (RE2C_FLAGS -b -i --no-generation-date) # build src/depfile_parser.cc: re2c src/depfile_parser.in.cc # build src/lexer.cc: re2c src/lexer.in.cc foreach(_in depfile_parser.in.cc lexer.in.cc) string(REGEX REPLACE .in.cc .cc _out ${_in}) message(STATUS Generate re2c src/${_in} -o src/${_out}) # CMake atrocity: if none of these OUTPUT files is used in a target in # the current CMakeLists.txt file, the ADD_CUSTOM_COMMAND is plainly # ignored and left out of the make files. add_custom_command(OUTPUT ${srcdir}/${_out} COMMAND ${RE2C_EXECUTABLE} ${${RE2C_FLAGS}} -o ${srcdir}/${_out} ${srcdir}/${_in} DEPENDS ${srcdir}/${_in} ) endforeach() endif (RE2C_EXECUTABLE) claus-kleins-macbook-pro:build clausklein$ ninja -d explain ninja: no work to do. claus-kleins-macbook-pro:build clausklein$ touch ../src/lexer.in.cc claus-kleins-macbook-pro:build clausklein$ ninja -d explain ninja explain: restat of output ../src/lexer.cc older than inputs ninja explain: ../src/lexer.cc is dirty ninja explain: ../src/lexer.cc is dirty ninja explain: CMakeFiles/ninja_lib.dir/src/lexer.cc.o is dirty ninja explain: libninja_lib.a is dirty ninja explain: ninja is dirty ninja explain: libninja_lib.a is dirty [4/4] Linking CXX executable ninja claus-kleins-macbook-pro:build clausklein$ //Regards Claus Nice, never tried -d explain. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 09.06.2012, at 10:25, Peter Kümmel wrote: On 09.06.2012 10:02, Claus Klein wrote: Hi Peter, I agree, we need your/our changes at upstream! I will switch to our github: https://github.com/syntheticpp/ninja In times of git there is no our repository any more. Yes, I know, I meant your repo... (clone) You could simply fork martine/ninja and push you changes into your fork. Then, when you think something should go upstream, create a merge request. I work with git not so long, but its cool and I will do this! ;-) Thanks, Claus-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Peter Kümmel syntheti...@gmx.net writes: Does clang has another build system which supports ninja? Then we could compare the generated files. No, AFAIK. What does work is all other build tools supported by cmake (VS project files, nmake/jom). The command looks good. It is a custom command that runs a tool previously generated by the build (llvm-tblgen.exe). After looking that the ouptput of ninja -v, the problem is that ninja is recompiling some of the source files of llvm-tblgen.exe, which regenerates the llvm-tblgen.exe executable, which in turn triggers the regeneration of the files produced using that tool. Here, the first chunk of output of ninja -v, whith comments: # Ninja starts recompiling some of the source files of llvm-tblgen.exe. This is wrong, because everything is up to date: [1/71] C:/apps/CMake2.8ninja/bin/cmcldeps.exe D:\dev\llvm\llvm\utils\TableGen\ DisassemblerEmitter.cpp utils\TableGen\CMakeFiles\llvm-tblgen.dir\DisassemblerEm itter.cpp.obj.d utils\TableGen\CMakeFiles\llvm-tblgen.dir\DisassemblerEmitter.cp p.obj Note: including file: C:\ARCHIV~1\MICROS~2.0\VC\bin\cl.exe /nologo /D WIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /MD /O2 /Ob2 /D NDEBUG -Iutils\TableGen - ID:\dev\llvm\llvm\utils\TableGen -Iinclude -ID:\dev\llvm\llvm\include-wd4146 -wd4180 -wd4224 -wd4244 -wd4267 -wd4275 -wd4291 -wd4345 -wd4351 -wd4355 -wd4503 -wd4551 -wd4624 -wd4715 -wd4800 -wd4065 -wd4181 -w14062 -D_CRT_SECURE_NO_DEPRE CATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WAR NINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D__STDC_CONSTANT_MAC ROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS /TP /Foutils\TableGen\CMakeFile s\llvm-tblgen.dir\DisassemblerEmitter.cpp.obj /Fdbin\llvm-tblgen.pdb -c D:\dev\l lvm\llvm\utils\TableGen\DisassemblerEmitter.cpp [2/71] C:/apps/CMake2.8ninja/bin/cmcldeps.exe D:\dev\llvm\llvm\utils\TableGen\ X86DisassemblerTables.cpp utils\TableGen\CMakeFiles\llvm-tblgen.dir\X86Disassemb lerTables.cpp.obj.d utils\TableGen\CMakeFiles\llvm-tblgen.dir\X86DisassemblerTab les.cpp.obj Note: including file: C:\ARCHIV~1\MICROS~2.0\VC\bin\cl.exe /nol ogo /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /MD /O2 /Ob2 /D NDEBUG -Iutils\Tabl eGen -ID:\dev\llvm\llvm\utils\TableGen -Iinclude -ID:\dev\llvm\llvm\include- wd4146 -wd4180 -wd4224 -wd4244 -wd4267 -wd4275 -wd4291 -wd4345 -wd4351 -wd4355 - wd4503 -wd4551 -wd4624 -wd4715 -wd4800 -wd4065 -wd4181 -w14062 -D_CRT_SECURE_NO _DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_ NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D__STDC_CONSTA NT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS /TP /Foutils\TableGen\CMa keFiles\llvm-tblgen.dir\X86DisassemblerTables.cpp.obj /Fdbin\llvm-tblgen.pdb -c D:\dev\llvm\llvm\utils\TableGen\X86DisassemblerTables.cpp [3/71] C:/apps/CMake2.8ninja/bin/cmcldeps.exe D:\dev\llvm\llvm\utils\TableGen\ X86RecognizableInstr.cpp utils\TableGen\CMakeFiles\llvm-tblgen.dir\X86Recognizab leInstr.cpp.obj.d utils\TableGen\CMakeFiles\llvm-tblgen.dir\X86RecognizableInstr .cpp.obj Note: including file: C:\ARCHIV~1\MICROS~2.0\VC\bin\cl.exe /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /MD /O2 /Ob2 /D NDEBUG -Iutils\TableGe n -ID:\dev\llvm\llvm\utils\TableGen -Iinclude -ID:\dev\llvm\llvm\include-wd4 146 -wd4180 -wd4224 -wd4244 -wd4267 -wd4275 -wd4291 -wd4345 -wd4351 -wd4355 -wd4 503 -wd4551 -wd4624 -wd4715 -wd4800 -wd4065 -wd4181 -w14062 -D_CRT_SECURE_NO_DE PRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_ WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D__STDC_CONSTANT_ MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS /TP /Foutils\TableGen\CMakeF iles\llvm-tblgen.dir\X86RecognizableInstr.cpp.obj /Fdbin\llvm-tblgen.pdb -c D:\d ev\llvm\llvm\utils\TableGen\X86RecognizableInstr.cpp # Now invokes the linker for producing llvm-tblgen.exe : [4/71] cmd.exe /c cd. c:\apps\CMake2.8ninja\bin\cmake.exe -E vs_link_exe C:\A RCHIV~1\MICROS~2.0\VC\bin\cl.exe /nologo utils\TableGen\CMakeFiles\llvm-tblgen. dir\AsmMatcherEmitter.cpp.obj utils\TableGen\CMakeFiles\llvm-tblgen.dir\AsmWrite rEmitter.cpp.obj utils\TableGen\CMakeFiles\llvm-tblgen.dir\AsmWriterInst.cpp.obj utils\TableGen\CMakeFiles\llvm-tblgen.dir\CallingConvEmitter.cpp.obj utils\Tabl eGen\CMakeFiles\llvm-tblgen.dir\CodeEmitterGen.cpp.obj utils\TableGen\CMakeFiles \llvm-tblgen.dir\CodeGenDAGPatterns.cpp.obj utils\TableGen\CMakeFiles\llvm-tblge n.dir\CodeGenInstruction.cpp.obj utils\TableGen\CMakeFiles\llvm-tblgen.dir\CodeG enRegisters.cpp.obj utils\TableGen\CMakeFiles\llvm-tblgen.dir\CodeGenTarget.cpp. obj utils\TableGen\CMakeFiles\llvm-tblgen.dir\DAGISelEmitter.cpp.obj utils\Table Gen\CMakeFiles\llvm-tblgen.dir\DAGISelMatcherEmitter.cpp.obj utils\TableGen\CMak eFiles\llvm-tblgen.dir\DAGISelMatcherGen.cpp.obj utils\TableGen\CMakeFiles\llvm- tblgen.dir\DAGISelMatcherOpt.cpp.obj utils\TableGen\CMakeFiles\llvm-tblgen.dir\D
Re: [cmake-developers] -GNinja on Windows
The only thing to do is to figure out the prefix of /showIncludes, it's hard coded atm: https://github.com/syntheticpp/ninja/blob/cldeps/misc/cldeps.cc#L150 and to pass it to cldeps. Interesting problem... Maybe just look for the second : or something like that. I compile a test file and extract the translated string. I am thinking we should port cldeps to use the cmake cmSystemtools so that we can just build/ship the whole binary with cmake itself. Make it use CMakeLib instead of util from ninja. I've added cldeps as cmcldeps but included the SubProcess class from ninja (hope Apache 2 lisence is ok). We could port it to cmSystemtools later. BuildDepends only works when the binary BuildDepends folder doesn't exists, and ninja needs also as Xcode multiple runs, at the moment I don't know why. I've pushed it to next to see if the BuildDepends test also passes on the build server. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 08.06.2012 18:10, Peter Kümmel wrote: The only thing to do is to figure out the prefix of /showIncludes, it's hard coded atm: https://github.com/syntheticpp/ninja/blob/cldeps/misc/cldeps.cc#L150 and to pass it to cldeps. Interesting problem... Maybe just look for the second : or something like that. I compile a test file and extract the translated string. I am thinking we should port cldeps to use the cmake cmSystemtools so that we can just build/ship the whole binary with cmake itself. Make it use CMakeLib instead of util from ninja. I've added cldeps as cmcldeps but included the SubProcess class from ninja (hope Apache 2 lisence is ok). We could port it to cmSystemtools later. BuildDepends only works when the binary BuildDepends folder doesn't exists, and ninja needs also as Xcode multiple runs, at the moment I don't know why. I've pushed it to next to see if the BuildDepends test also passes on the build server. If someone giv it a try, I've uploaded binaries here https://sourceforge.net/projects/cmakescript/files/ You need cmake and ninja (ninja/master, copy it into cmake's bin/). Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/8/2012 12:38 PM, Peter Kümmel wrote: I've pushed it to next to see if the BuildDepends test also passes on the build server. If someone giv it a try, I've uploaded binaries here https://sourceforge.net/projects/cmakescript/files/ You need cmake and ninja (ninja/master, copy it into cmake's bin/). I just tried to run an experimental dashboard and it failed. I think it was because my cmake build had a space in the path: command = C:/Users/hoffman/Work/My Builds/cmake-gmake/bin/cmcldeps.exe $in $out.d $out Note: including file: C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe /nologo $FLAGS $DEFINES /Fo$out /Fd$TARGET_PDB -c $in description = Building C object $out ninja gives this: $ ../ninja/ninja [1/437] Building C object Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj ninja: FATAL: CreateProcess: %1 is not a valid Win32 application. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 08.06.2012 19:40, Bill Hoffman wrote: On 6/8/2012 12:38 PM, Peter Kümmel wrote: I've pushed it to next to see if the BuildDepends test also passes on the build server. If someone giv it a try, I've uploaded binaries here https://sourceforge.net/projects/cmakescript/files/ You need cmake and ninja (ninja/master, copy it into cmake's bin/). I just tried to run an experimental dashboard and it failed. I think it was because my cmake build had a space in the path: command = C:/Users/hoffman/Work/My Builds/cmake-gmake/bin/cmcldeps.exe $in $out.d $out Note: including file: C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe /nologo $FLAGS $DEFINES /Fo$out /Fd$TARGET_PDB -c $in description = Building C object $out ninja gives this: $ ../ninja/ninja [1/437] Building C object Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test.c.obj ninja: FATAL: CreateProcess: %1 is not a valid Win32 application. Dependency parsing is a bit hairy. It also breaks on '(', e.g. Program Files(x86). Could you have a look at the .d files? Best place to debug this is a printf here: https://github.com/syntheticpp/ninja/blob/master/src/graph.cc#L85 I also found that CMAKE_CL_SHOWINCLUDE_PREFIX is not set for different CMakeLists.txt. I assume Windows-cl.cmake is the wrong place for it. How can I make CMAKE_CL_SHOWINCLUDE_PREFIX as visible as CMAKE_C_COMPILER? Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Hi Peter,can you please explain what is the state of your ninja fork.Is is sync with origin ninja?Will it merged later?Can you please apply my time-stamp patch?P.S.I tried to compile it with your CMakeLists.txt file, but it needs love on linux (UNIX) build hosts. //RegardsClaus ninja-use-stat64.patch Description: Binary data CMakeLists.patch Description: Binary data On 07.06.2012, at 23:46, Peter Kümmel wrote:Guessing configuration NoConfigStart 82: BuildDepends1/1 Test #82: BuildDepends . Passed 5.06 sec;)Bill, this was a great idea with cldeps!Only small patches for cldeps and cmake and we now have dependency tracking for msvc.A cldeps binary is here:http://sourceforge.net/projects/cmakescript/files/cldeps.exeCode is in misc/ also a CMakeLists.txthttps://github.com/syntheticpp/ninja/tree/cldepsCMake:http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=1d40729eaa35dd643efdf5e793e6a541e890f33aThe only thing to do is to figure out the prefix of /showIncludes, it's hard coded atm:https://github.com/syntheticpp/ninja/blob/cldeps/misc/cldeps.cc#L150and to pass it to cldeps.Cheers,Peter Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 08.06.2012 21:11, Claus Klein wrote: Hi Peter, can you please explain what is the state of your ninja fork. It only adds cldeps and the CMakeLists.txt, nothing else. Is is sync with origin ninja? Yes, I branched yesterday. Will it merged later? Can you please apply my time-stamp patch? More interesting would be to bring it upstream. P.S. I tried to compile it with your CMakeLists.txt file, but it needs love on linux (UNIX) build hosts. Oh, yes, thanks. The last day I'm only on windows. //Regards Claus On 07.06.2012, at 23:46, Peter Kümmel wrote: Guessing configuration NoConfig Start 82: BuildDepends 1/1 Test #82: BuildDepends . Passed 5.06 sec ;) Bill, this was a great idea with cldeps! Only small patches for cldeps and cmake and we now have dependency tracking for msvc. A cldeps binary is here: http://sourceforge.net/projects/cmakescript/files/cldeps.exe Code is in misc/ also a CMakeLists.txt https://github.com/syntheticpp/ninja/tree/cldeps CMake: http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=1d40729eaa35dd643efdf5e793e6a541e890f33a The only thing to do is to figure out the prefix of /showIncludes, it's hard coded atm: https://github.com/syntheticpp/ninja/blob/cldeps/misc/cldeps.cc#L150 and to pass it to cldeps. Cheers, Peter -- -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
It is not getting that far. It is not even running cmcldeps. :) The command= line is bad, so nothing builds, and we get no .d files. I added parentheses around cmcldeps, it should work now. I also found that CMAKE_CL_SHOWINCLUDE_PREFIX is not set for different CMakeLists.txt. I assume Windows-cl.cmake is the wrong place for it. How can I make CMAKE_CL_SHOWINCLUDE_PREFIX as visible as CMAKE_C_COMPILER? I think it is going to have to go into CMakeCXXPlatform.cmake that gets configured just before the code you just added. Thanks, right direction. I added it to CMakeC*Compiler.cmake.in. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Peter Kümmel syntheti...@gmx.net writes: It is not getting that far. It is not even running cmcldeps. :) The command= line is bad, so nothing builds, and we get no .d files. I added parentheses around cmcldeps, it should work now. With your binaries from 2 hours ago, changes on header files are correctly detected on my C++ projects. Thanks! LLVM builds fine, although re-running ninja results on re-executing all tablegen commands. Even with all those 70 or so tablegen invocations, ninja does a no-op rebuild in 16 seconds, which is faster than a true no-op rebuild with jom and much faster than msbuild. Windows XP SP3 32 bits, Visual Studio 2010. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/8/2012 5:15 PM, Peter Kümmel wrote: It is not getting that far. It is not even running cmcldeps. :) The command= line is bad, so nothing builds, and we get no .d files. I added parentheses around cmcldeps, it should work now. I also found that CMAKE_CL_SHOWINCLUDE_PREFIX is not set for different CMakeLists.txt. I assume Windows-cl.cmake is the wrong place for it. How can I make CMAKE_CL_SHOWINCLUDE_PREFIX as visible as CMAKE_C_COMPILER? I think it is going to have to go into CMakeCXXPlatform.cmake that gets configured just before the code you just added. Thanks, right direction. I added it to CMakeC*Compiler.cmake.in. fails in a new way: http://open.cdash.org/viewConfigure.php?buildid=2345213 FAILED: CMAKE_CMCLDEPS_EXECUTABLE-NOTFOUND testCXXCompiler.cxx CMakeFiles\cmTryCompileExec4166421573.dir\testCXXCompiler.cxx.obj.d CMakeFiles\cmTryCompileExec4166421573.dir\testCXXCompiler.cxx.obj Note: including file: C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /TP /FoCMakeFiles\cmTryCompileExec4166421573.dir\testCXXCompiler.cxx.obj /FdcmTryCompileExec4166421573.pdb -c testCXXCompiler.cxx CreateProcess failed: The system cannot find the file specified. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/6/2012 12:08 PM, Peter Kümmel wrote: On 06.06.2012 16:27, Bill Hoffman wrote: I will change the dashboard to use ninja master. Right now it is still using your branch on git and is failing a bunch of tests. Now cmake prepends cmd.exe /c and the branched ninja also, so we have cmd.exe /c cmd.exe /c cd which makes no sense. I changed the windows dashboard on dash2win64 to use ninja master. Looks better now. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 07.06.2012 16:21, Bill Hoffman wrote: On 6/7/2012 10:08 AM, Peter Kuemmel wrote: I changed the windows dashboard on dash2win64 to use ninja master. Looks better now. Thanks, only 2 left. Do you have an idea why CTestTestTimeout doesn't work? Not sure, might be a random thing. Let's see what it does tomorrow. It has failed 4 times in the last month... As for the depend stuff. Sounds like what we need is the wrapper for cl. https://github.com/sgraham/ninja/commit/1d0908951d3a93e06cf3582a67eada0b942489de Then we could put the command and depfile stuff into the generated files. This would not require a fix in upstream ninja. It could all be done on the CMake side, and we could use ninja master. Yes, I also think a solution on the cmake side make things much easier. What about using cmake's build-in dependency parser. AFAIK there is one. Could it be called by the command line? -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/7/2012 10:43 AM, Peter Kümmel wrote: Yes, I also think a solution on the cmake side make things much easier. What about using cmake's build-in dependency parser. AFAIK there is one. Could it be called by the command line? I think it might be quicker to grab the cldep wrapper and try that. The CMake one works on whole targets and does not forward the call to the compiler. ninja seems to want to call one thing that does depends and the compile. Either way could be done. However, just grabbing the cldep thing from that branch might be the quickest. Although, I suspect that this problem will show up with other non-gnu compilers, and a pure cmake implementation would be nice to have. I don't know enough ninja to know if it has to be done in the same command as the compile to get it to work. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Guessing configuration NoConfig Start 82: BuildDepends 1/1 Test #82: BuildDepends . Passed5.06 sec ;) Bill, this was a great idea with cldeps! Only small patches for cldeps and cmake and we now have dependency tracking for msvc. A cldeps binary is here: http://sourceforge.net/projects/cmakescript/files/cldeps.exe Code is in misc/ also a CMakeLists.txt https://github.com/syntheticpp/ninja/tree/cldeps CMake: http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=1d40729eaa35dd643efdf5e793e6a541e890f33a The only thing to do is to figure out the prefix of /showIncludes, it's hard coded atm: https://github.com/syntheticpp/ninja/blob/cldeps/misc/cldeps.cc#L150 and to pass it to cldeps. Cheers, Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/7/2012 5:46 PM, Peter Kümmel wrote: Guessing configuration NoConfig Start 82: BuildDepends 1/1 Test #82: BuildDepends . Passed 5.06 sec ;) Bill, this was a great idea with cldeps! Only small patches for cldeps and cmake and we now have dependency tracking for msvc. Cool, nice work! A cldeps binary is here: http://sourceforge.net/projects/cmakescript/files/cldeps.exe Code is in misc/ also a CMakeLists.txt https://github.com/syntheticpp/ninja/tree/cldeps CMake: http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=1d40729eaa35dd643efdf5e793e6a541e890f33a The only thing to do is to figure out the prefix of /showIncludes, it's hard coded atm: https://github.com/syntheticpp/ninja/blob/cldeps/misc/cldeps.cc#L150 and to pass it to cldeps. Interesting problem... Maybe just look for the second : or something like that. I am thinking we should port cldeps to use the cmake cmSystemtools so that we can just build/ship the whole binary with cmake itself. Make it use CMakeLib instead of util from ninja. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 6/6/2012 7:14 AM, Peter Kümmel wrote: Here the actual status of the Ninja generator. The generator now uses Ninja's build-in response support. - MSVC10 Dependency checking is still missing as essential feature, but the rest is quite good: The following tests FAILED: 82 - BuildDepends (Failed) 140 - CTestGTMCoverage (Failed) 158 - CTestTestStopTime (Failed) And it is maybe better on the build server (CTestGTMCoverage/CTestTestStopTime) - MinGW 4.7 Because 'ar' has problems with \ in response files currently slashes are used for the patch names, then this ninja patch is needed https://github.com/martine/ninja/pull/322 Maybe there is a better solution, which would automatically fix a lot of unit tests. Can you bring that up on the ninja mailing list? Is that a patch that could go upstream ninja? The RC compiler is set now internally and therefore the unit tests could be run: The following tests FAILED: 36 - CxxOnly (Failed) ... I assume most errors are because of '/' '\' mismatch. I propose to also enable Ninja on Windows this would give as more feedback and maybe we also get some bug fixes. And nobody is forced to use the ninja generator. Sorry, no can do. If it is there, people will expect it to work for their project. Right now it is not working, so I don't want to enable it. The only feedback we will get, is these things are broken. We know what is broken, what more feedback do we need? To move forward on windows, I will change the dashboard to use ninja master. Right now it is still using your branch on git and is failing a bunch of tests. Also, it sounds like we took a step backwards with MinGW and the response files. Maybe until we figure that out we should disable response files for MinGW? Perhaps we can try one of the forks that has depend information for MSVC? If one of those works and the BuildDepends test passes, and we can get MinGW back into working shape, then we can enable ninja for Windows. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 06.06.2012 16:27, Bill Hoffman wrote: Maybe there is a better solution, which would automatically fix a lot of unit tests. Can you bring that up on the ninja mailing list? I tried it with not using slashes: https://github.com/syntheticpp/ninja/commit/262b7b951135eac51023512d2f788727828bac43 https://github.com/syntheticpp/CMake/commit/c95404d65229d1dd37f0579afb29e27f95501e06 but it doesn't help much. I have the impression it's a multi threading problem. Linking is only possible with -j1. Is that a patch that could go upstream ninja? Yes, the link points to a pull request. Sorry, no can do. If it is there, people will expect it to work for Yes, you are right. More testing with mingw shows that it is completely unusable. their project. Right now it is not working, so I don't want to enable it. The only feedback we will get, is these things are broken. We know what is broken, what more feedback do we need? To move forward on windows, I will change the dashboard to use ninja master. Right now it is still using your branch on git and is failing a bunch of tests. Also, it sounds like we took a step backwards with MinGW and the response files. Maybe until we figure that out we should disable response files for MinGW? ninja/master is not usable with mingw regardless what we do. And it has not much to do with the rsp files, most unit tests don't use a response file. Maybe I should switch back to my branch, master is a big mess for mingw. Did you ever run the unit tests before with mingw? Arn't they all broken because of the missing CMAKE_RC_COMPILER? Perhaps we can try one of the forks that has depend information for Seems we are forced to, nothing happen there. MSVC? If one of those works and the BuildDepends test passes, and we can get MinGW back into working shape, then we can enable ninja for Windows. I've hoped to get mingw to pass all tests because there is a dependency check, but it's worth than expected. -Bill -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 06.06.2012 16:27, Bill Hoffman wrote: I will change the dashboard to use ninja master. Right now it is still using your branch on git and is failing a bunch of tests. Now cmake prepends cmd.exe /c and the branched ninja also, so we have cmd.exe /c cmd.exe /c cd which makes no sense. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Hi Peter, Today I have tried to work with ninja on MSYS. I have a view questions: 1. Is cmake build on MSYS or build on windows when you test with it the ninja generator? I tried the windows version, but it fails, 2. MSYS has a bash sh program, why is cmd /c used at a unix like environment? It is not fast to start a a shell the old stupid dos cmd shell again and to have the cmdline length problems again! 3. The gcc, ar, and other binutils I found are quite actual and the @response file options are known But it is a bash, not command, so only posix path separator must be used, '\' and spaces must be quoted! IMO cmake, at least the ninja generator should respect this, than it works. An other question about dependancy generation on Windows and MSYS: I found the Makefile Generator creates dep files on MSYS, but the gcc can do it by the way? He, wait? It is it an open issue for the Nina generator to not create depend files on Windows with cl when cmake know to do it? //Regards Claus That was the result of my test, but the cmake sources are not right sync with yours! CMake Error at c:/Programme/CMake2.8/share/cmake-2.8/Modules/ CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler C:/Wascana/mingw/bin/gcc.exe is not able to compile a simple test program. It fails with the following output: Change Dir: C:/downloads/ftplibpp-2.0.2-ck/build/CMakeFiles/CMakeTmp Run Build Command:C:/Wascana/msys/bin/ninja.exe cmTryCompileExec2945905931 [1/2] Building C object CMakeFiles\cmTryCompileExec2945905931.dir\testCCompiler.c.obj [2/2] Linking C executable cmTryCompileExec2945905931.exe FAILED: cmd.exe /c cd. c:\Programme\CMake2.8\bin\cmake.exe -E remove -f CMakeFiles\cmTryCompileExec2945905931.dir/objects.a C:\Wascana\mingw\bin\ar.exe cr CMakeFiles\cmTryCompileExec2945905931.dir/objects.a @cmTryCompileExec2945905931.exe.rsp C:\Wascana\mingw\bin\gcc.exe -Wl,--whole-archive CMakeFiles\cmTryCompileExec2945905931.dir/ objects.a -Wl,--no-whole-archive -o cmTryCompileExec2945905931.exe -Wl,--out-implib,libcmTryCompileExec2945905931.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 - luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 cd. C:\Wascana\mingw\bin\ar.exe: CMakeFilescmTryCompileExec2945905931.dirtestCCompiler.c.obj: No such file or directory ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): On 06.06.2012, at 18:08, Peter Kümmel wrote: On 06.06.2012 16:27, Bill Hoffman wrote: I will change the dashboard to use ninja master. Right now it is still using your branch on git and is failing a bunch of tests. Now cmake prepends cmd.exe /c and the branched ninja also, so we have cmd.exe /c cmd.exe /c cd which makes no sense. Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
On 06.06.2012 20:21, Claus Klein wrote: Hi Peter, Today I have tried to work with ninja on MSYS. I have a view questions: 1. Is cmake build on MSYS or build on windows when you test with it the ninja generator? I tried the windows version, but it fails, Hi Claus, I only build with MSVC or mingw without MSYS. I never tried MinGW Makefile generator on msys, does this work? 2. MSYS has a bash sh program, why is cmd /c used at a unix like environment? It is not fast to start a a shell the old stupid dos cmd shell again and to have the cmdline length problems again! ATM it ignores MSYS: running cmake.exe == using cmd.exe But after the big mingw failure today, msys is maybe simpler than plain win32 mingw. 3. The gcc, ar, and other binutils I found are quite actual and the @response file options are known But it is a bash, not command, so only posix path separator must be used, '\' and spaces must be quoted! IMO cmake, at least the ninja generator should respect this, than it works. Overall I come to the conclusion, that cross-compiling with ninja and mingw on Linux is better supported than using mingw and ninja on Windows. An other question about dependancy generation on Windows and MSYS: I found the Makefile Generator creates dep files on MSYS, but the gcc can do it by the way? He, wait? It is it an open issue for the Nina generator to not create depend files on Windows with cl when cmake know to do it? With gcc you can produce dependency files, also on Windows. The problem is to use cl as single source for dependency files. cl supports /ShowIncludes but it has not a dependency file generation feature like gcc. But your idea to use gcc to generate dependencies even when the real work is done by cl is interesting. There are already several attempts discussed on the ninja list (or there are pull requests) to fix this issue, but the idea to mix a msvc and a mingw build is new. Would be a challenge. ... C:\Wascana\mingw\bin\ar.exe: CMakeFilescmTryCompileExec2945905931.dirtestCCompiler.c.obj: No such file Feeding MSYS with back-slashes will not work, no surprise. or directory ninja: build stopped: subcommand failed. Cheers, Peter -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] -GNinja on Windows
Yes, without any problem. But it was the MSYS Makefile generator if I remember right. And as I said, cmake generates the dependency file and response files itself while generation I think! The are extra cmake files for that at CMakeFiles tree. (gcc was not used, it seems a regex solution by cmake) //Regards Claus Klein On 06.06.2012, at 21:14, Peter Kümmel wrote: Hi Claus, I only build with MSVC or mingw without MSYS. I never tried MinGW Makefile generator on msys, does this work? -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers