On 08/10/2010 05:29 AM, Verweij, Arjen wrote:
>> The objects1.rsp file is generated by CMake during configuration.  The
>> start/end temp file syntax tells NMake to use response files at build
>> time.
> 
> Why is this scheme only used for shared libs and not static libs?
> For static libs it works automagically somehow.

I think that is historical.  The start/end temp file stuff was added
to help pass long lists of flags (repeated -LIBPATH or -I options).
The librarian tool does not need to do any searching so we never got
long command lines with it until people started creating a large
number of object files.  Then the objects1.rsp approach was added
for that so we do not need the start/end temp file approach.

>> The link rule uses objects1.rsp with cl but not icl because cl.cmake
>> has:
>>
>>  SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
>>  SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
> 
> OK. But in cl.cmake these variables are only set after the definition of
> CMAKE_C_CREATE_STATIC_LIBRARY and CMAKE_CXX_CREATE_STATIC_LIBRARY
> (i.e. for shared libs), so I didn't think of it.

The order does not matter.  The response file options are evaluated
long after this file is loaded, at the time CMake generates the build
files on disk.  The options affect how "<OBJECTS>" is replaced in the
rule variable strings.

> Please find a patch attached.

Applied:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b1e5f01

Thanks,
-Brad
_______________________________________________
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

Reply via email to