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
--
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