[CMake] Can CMake confgure shorter cmmand argments?

Bo Berglund bo.berglund at gmail.com
Thu Aug 8 01:45:56 EDT 2013


On Wed, 07 Aug 2013 19:15:43 -0400, Bill Hoffman
<bill.hoffman at kitware.com> wrote:

>On 8/7/2013 7:04 PM, Bo Berglund wrote:
>> I cannot claim that I understand what this does but it seems to refer
>> to the redirect settings shown above.
>> But maybe this is not activated for some reason?
>>
>> Is there something to be done to activate it for the tlib command?
>You could run cmake --trace and see why it is not working.  Also look in 
>the generated makefiles and see what is going on.
>

I looked in the binary dir tree for anything that can be related and
finally found this:

C:\Engineering\VTKBIN5.10.1\Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\build.make

In this file towards the end I found the following section that smells
of having to do with my error (some lines are wrapped by newsreader):

	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red
--bold "Linking C static library ..\..\..\bin\vtkhdf5.lib"
	cd C:\Engineering\VTKBIN5.10.1\Utilities\vtkhdf5\src
	$(CMAKE_COMMAND) -P
CMakeFiles\vtkhdf5.dir\cmake_clean_target.cmake
	cd C:\Engineering\VTKBIN5.10.1
	cd C:\Engineering\VTKBIN5.10.1\Utilities\vtkhdf5\src
	tlib /p512  /a "..\..\..\bin\vtkhdf5.lib" $(vtkhdf5_OBJECTS)
$(vtkhdf5_EXTERNAL_OBJECTS)
	cd C:\Engineering\VTKBIN5.10.1

# Rule to build all files generated by this target.
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\build: bin\vtkhdf5.lib
.PHONY : Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\build

Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\requires:
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\H5.c.obj.requires
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\requires:
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\H5checksum.c.obj.requires
.... LOTS of more references ....
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\requires:
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\H5FDwindows.c.obj.requires
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\requires:
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\__\H5Tinit.c.obj.requires
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\requires:
Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\__\H5lib_settings.c.obj.requires
.PHONY : Utilities\vtkhdf5\src\CMakeFiles\vtkhdf5.dir\requires


Note that the requires: lines correspond to the files listed on the
command line in the make that fails:

        tlib /p512 /a "..\..\..\bin\vtkhdf5.lib"
"CMakeFiles\vtkhdf5.dir\H5.c.obj"
"CMakeFiles\vtkhdf5.dir\H5checksum.c.obj"
....
"CMakeFiles\vtkhdf5.dir\H5FDwindows.c.obj"
"CMakeFiles\vtkhdf5.dir\__\H5Tinit.c.obj"
"CMakeFiles\vtkhdf5.dir\__\H5lib_settings.c.obj"
Fatal: Command arguments too long

How this relates to using the response files is above me, but maybe
one of you can decode it??
Should the tlib arguments not be moved to a response file here?


-- 
Bo Berglund
Developer in Sweden



More information about the CMake mailing list