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

Ian.Appru at ubs.com Ian.Appru at ubs.com
Mon Feb 20 12:23:49 EST 2006


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




Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.
-------------- next part --------------
Skipped content of type multipart/mixed


More information about the CMake mailing list