Hi Bill, I have tried to prepare a patch. It generates links rules like that:
# Rule for linking CXX executable. rule CXX_EXECUTABLE_LINKERcommand = $PRE_LINK && /opt/local/libexec/ccache/g++ $FLAGS -Wl,- search_paths_first -Wl,-headerpad_max_install_names $LINK_FLAGS -Wl,@ $out.rsp -o $out $LINK_LIBRARIES && $POST_BUILD
description = Linking CXX executable $out rspfile = $out.rsp rspfile_content = $in Please read carefully my comments, not all may be right now.It may used as a prototype. I dit basic test only, it works at least on win32 and on my macbook. Pleas check.
Claus
NinjaGeneratorBuildCommandLine.patch
Description: Binary data
NinjaUseResponseFile.patch
Description: Binary data
On 30.05.2012, at 19:50, Bill Hoffman wrote:
On 5/30/2012 1:07 PM, Peter Kuemmel wrote:The cmake code needs to be updated to use the native ninja responsefiles. If you are interested in this work, I can help you figure outwhere to make the changes. -BillHave you started working on this? And is there somewhere already a branch?If not, where is the best place for such a branch, github or stage? PeterNo, no not much actual work... However, what needs to be done is this: http://martine.github.com/ninja/manual.html#_rule_variables rspfile, rspfile_content rule link command = link.exe /OUT$out [usual link flags here] @$out.rsp rspfile = $out.rsp rspfile_content = $in We have to add this code to the cmNinjaNormalTargetGenerator.cxxI think this method will also have to be updated to know about rspfiles:cmGlobalNinjaGenerator::WriteRule Claus did this by hand and it worked: rule CXX_EXECUTABLE_LINKER#XXX command = cmd.exe /c $PRE_LINK && C:\Programme\CMake2.8\bin \cmake.exe -E vs_link_exe c:\PROGRA~1\MICROS~4\VC\bin\link.exe / nologo /OUT:$out /DEBUG /PDB:$TARGET_PDB /IMPLIB:$TARGET_IMPLIB / version:0.0 @$out.rsp && $POST_BUILD command = cmd.exe /c $PRE_LINK && C:\PROGRA~1\MICROS~4\VC\bin \link.exe /nologo /OUT:$out /DEBUG /PDB:$TARGET_PDB /IMPLIB: $TARGET_IMPLIB /version:0.0 @$out.rsp && $POST_BUILDdescription = Linking CXX executable $out rspfile = $out.rsp rspfile_content = $FLAGS $LINK_FLAGS $LINK_LIBRARIES $in -- Bill Hoffman Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 [email protected] 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://www.cmake.org/mailman/listinfo/cmake
-- 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://www.cmake.org/mailman/listinfo/cmake
