[Cmake] Feature added

Bill Hoffman bill.hoffman at kitware.com
Fri, 30 Apr 2004 11:03:24 -0400


Sounds interesting, we are already doing the  at  stuff for nmake and borland.
It should be quite easy to do it for DJGPP.   


If you see Modules/Platform/Windows.cmake, you will find this:

# 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 " at &&|\n")
  SET(CMAKE_END_TEMP_FILE "\n|")
ENDIF(CMAKE_GENERATOR MATCHES "Borland")

# 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 " at <<\n")
  SET(CMAKE_END_TEMP_FILE "\n<<")
ENDIF(CMAKE_GENERATOR MATCHES "NMake")

Then that stuff is used in Platform/Windows-cl.cmake and Platform/Windows-bcc.cmake.
You may be able to do most of the work just by creating the correct platform
file.

-Bill


At 09:54 PM 4/29/2004, Schumacher, Gordon wrote:
>I've added a feature, on my testbed, to allow builds on platforms with
>severe limitations on command line lengths (er, namely, DJGPP DOS.)
>
>In the style of GCC and many tools, I added a "pull parameters from a file"
>command-line option, " at file".  I suspect that I will need this for the Unix
>makefile style of builds under DJGPP, because the CMake calls that get
>generated from the Makefile of the form -S$(CMAKE_CURRENT_SOURCE)
>-O$(CMAKE_CURRENT_BINARY) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
>get far too long once they are expanded into full directory names to be
>allowable within a DOS command-line limit.  The other piece of the puzzle,
>of course, will be for me to create a new DJGPP Makefile generator to
>utilize this new switch.
>
>Yes, I realize that I may be the only person to suffer from this
>limitation... but hey, it wasn't tough to add the feature.
>
>The reason that I bring it up, is that the "args" string vector in
>cmake::SetArgs() was declared const, with good reason.  But the sensible
>way for me to add new args onto it (from the file) is to blow away the
>const-ness...
>
>I can submit a patch of the changes I made in the morning.  For now I want
>to go home :)
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake