[CMake] Problem linking libs with filename length=1 char

William A. Hoffman billlist at nycap.rr.com
Mon Feb 20 12:30:04 EST 2006


At 12:23 PM 2/20/2006, Ian.Appru at ubs.com wrote:
>Content-class: urn:content-classes:message
>Content-Type: multipart/alternative;
>        boundary="----_=_NextPart_001_01C63642.6A02991E"
>
>Hi,
>
>I have been having difficulty linking libs with a 1 char filename.
>On my solaris build there are a number of them which I would expect to
>appear as say -lc -lw -lm on the link command.
>
>Instead they are ignored altogether.
>
>I tracked the problem down to function
>cmLocalGenerator::ComputeLinkInformation(), where the following code
>appears - 
>
>    pos = lib.find_last_not_of(" \t\r\n");
>    if(pos != lib.npos)
>      {
>      lib = lib.substr(0, pos);
>      }
>    if(lib.empty())
>      {
>      continue;
>      }
>
>
>I believe
>>lib = lib.substr(0, pos);
>should be
>>lib = lib.substr(0, pos+1);
>
>I am using a cut of cmake from cvs - a couple of weeks old now so excuse
>if you have already spotted and fixed this issue.
>If not I can raise a bug and post the fix.
>
>Regards
>Ian

I fixed this in cvs about a week ago.

-Bill



More information about the CMake mailing list