[vtkusers] CMake generates too long commands for Win7X64 RAD Studio XE4

Bo Berglund bo.berglund at gmail.com
Wed Aug 7 19:16:19 EDT 2013


On Wed, 7 Aug 2013 10:02:31 -0600, David Gobbi <david.gobbi at gmail.com>
wrote:

>On Wed, Aug 7, 2013 at 9:34 AM, Bo Berglund <bo.berglund at gmail.com> wrote:
>>
>> I also found a thread dealing with VTK on C++Builder named:
>> "Recipe for building VTK-5.6.1 with C++ Builder XE (bcc32 6.31)"
>> http://vtk.1045678.n5.nabble.com/Recipe-for-building-VTK-5-6-1-with-C-Builder-XE-bcc32-6-31-td3337807.html
>> (See Oliver W's reply from Dec 07, 2011 14:48) where he outlines steps
>> to take).
>>
>> So I tried to apply these changes to the VTK sources (ouch!!! I don't
>> like modifying code I don't understand...) to get past some of the
>> other errors that appear when building ver 5.10.1:
>> I applied:
>> a) change struct name from _stati64 to stati64
>> b) comment out the timezone lines
>> c) change stryct name from _stati64 to stati64
>>
>> These three solved the stops caused by some errors but when I got the
>> next error (Command argumenst too long) using the next modification
>> tip d) did not help...
>>
>> I still have the command argument too long error.
>>
>> Maybe this is not caused by CMake but is some VTK code failure????
>> I am in a total loss here on what to do next.
>
>I am surprised by the super-long command line, because CMake should be
>generating response files instead of putting all of the options on the
>command line.  But then again, as far as I remember, the command lines
>for VTK 5.0.2 were always short enough for the compilers to handle,
>even before CMake supported response files.  I have no experience at
>all with bcc, however.
>
I have looked in the configuration files for CMake (the version I use
is 2.8.11.2 and I found this:

Windows.cmake:
--------------
# for borland make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use
if(CMAKE_GENERATOR MATCHES "Borland")
  set(CMAKE_START_TEMP_FILE "@&&|\n")
  set(CMAKE_END_TEMP_FILE "\n|")
endif()

Windows-Embarcadero.cmake:
--------------------------
  # create a static library
  set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
    "tlib ${CMAKE_START_TEMP_FILE}/p512 <LINK_FLAGS> /a
<TARGET_QUOTED> <OBJECTS>${CMAKE_END_TEMP_FILE}"
    )

Based on this I assume that the response files should have activated,
unless there is some way to deactivate for the VTK project....
But I really do not understand how these settings are actually used by
CMake :-(

I get the argument length error on the tlib command.
Not seen for bcc32 commands.


-- 
Bo Berglund
Developer in Sweden




More information about the vtkusers mailing list