[cmake-developers] [CMake] Nina Generator on Windows generates too long link cmd lines
Bill Hoffman
bill.hoffman at kitware.com
Mon Jun 4 17:13:14 EDT 2012
On 6/4/2012 2:22 PM, Peter Kümmel wrote:
> We use ninja's response files:
>
> # Rule for linking CXX static library.
> rule CXX_STATIC_LIBRARY_LINKER
> command = E:\sandbox\MinGW32\bin\ar.exe cr $out $LINK_FLAGS @$out.rsp
> description = Linking CXX static library $out
> rspfile = $out.rsp
> rspfile_content = $in
>
> But the problem is, that ar under windows doesn't like paths with one single '\'
>
> and on some UNIXs doesn't support response files at all.
OK, my mistake. The tool has to support response files. So, currently
with nmake files we do something like this:
Platform/Windows.cmake:
# for nmake make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use
IF(CMAKE_GENERATOR MATCHES "NMake")
SET(CMAKE_START_TEMP_FILE "@<<\n")
SET(CMAKE_END_TEMP_FILE "\n<<")
ENDIF(CMAKE_GENERATOR MATCHES "NMake")
Does MinGW32 ar use a different format response file than MS link.exe?
Seems like this should go in the Platform file. Maybe we don't use it
on UNIX?
-Bill
More information about the cmake-developers
mailing list