[Vxl-users] Re: [Cmake] VXL/cmake cygwin build: link line -l option order

Wheeler, Fred (Research) wheeler at crd.ge.com
Fri May 10 10:59:30 EDT 2002


Here is a simple test that demonstrates the linking problem:

cd /tmp
touch foo.cxx
cat >| CMakeLists.txt <<EOF
ADD_EXECUTABLE( foo foo.cxx )
LINK_LIBRARIES(B)
LINK_LIBRARIES(A)
LINK_LIBRARIES(C)
LINK_LIBRARIES(A) # THIS LINE HAS NO EFFECT
EOF
$HOME/work_vxl/cmake_usr_cyg/bin/cmake .
grep lA Makefile

# I get the following from the above grep command
$(CMAKE_CXX_COMPILER) $(CMAKE_CXX_SHLIB_LINK_FLAGS) $(CMAKE_CXX_FLAGS) $(foo_SRC_OBJS) -lB -lA -lC
-o foo

# I think this should have "-lB -lA -lC -lA"

# I get the same result with LINK_LIBRARIES(B A C A)

Thanks,
Fred Wheeler

-----Original Message-----
From: Ken Martin [mailto:ken.martin at kitware.com]
Sent: Friday, May 10, 2002 10:46 AM
To: Wheeler, Fred (Research); 'Amitha Perera'
Cc: cmake at public.kitware.com; vxl-users at lists.sourceforge.net
Subject: RE: [Vxl-users] Re: [Cmake] VXL/cmake cygwin build: link line
-l option order


Fred, Amitha,

If there is a problem in the library linking then we really need to
track this down. I'd like to branch CMake 4.0 very soon and if there
is a problem then it would be best if we could track it down before
releasing 1.4. So if you have a chance to look into this, that would
be great.

Thanks
Ken

> -----Original Message-----
> From: cmake-admin at public.kitware.com
> [mailto:cmake-admin at public.kitware.com]On Behalf Of Wheeler, Fred
> (Research)
> Sent: Friday, May 10, 2002 10:37 AM
> To: 'Amitha Perera'
> Cc: 'cmake at public.kitware.com'; vxl-users at lists.sourceforge.net
> Subject: RE: [Vxl-users] Re: [Cmake] VXL/cmake cygwin
> build: link line
> -l option order
>
>
> Amitha,
>
> I've been using the CVS sources from 3 days ago.  I just
> updated to today's CVS source.  If I'm still
> having the problem I'll back off the 1.2 or LatestRelease,
> as you suggest.
>
> Can you confirm that the latest CVS version of cmake does
> eliminate duplicate "-l" options?  It sure
> seemed to me to be doing that, but I am not 100% sure.
>
> Thanks,
> Fred
>
> -----Original Message-----
> From: Amitha Perera [mailto:perera at cs.rpi.edu]
> Sent: Friday, May 10, 2002 10:33 AM
> To: Wheeler, Fred (Research)
> Cc: 'cmake at public.kitware.com'; vxl-users at lists.sourceforge.net
> Subject: [Vxl-users] Re: [Cmake] VXL/cmake cygwin build:
> link line -l
> option order
>
>
> Fred,
>
> Which version of CMake are you using? The latest release
> (version 1.2,
> I think) does not go any link line compression.
>
> The next release, version 1.4, will do more than that: it'll do full
> dependency analysis, but needs to be given additional information
> about library dependencies. I'll look into this now.
>
> As an immediate fix, you could use the latest release, by
> updating your CMake sources thus:
>    cvs update -r LatestRelease -Pd
>
> Amitha.
>
> _______________________________________________________________
>
> Have big pipes? SourceForge.net is looking for download
> mirrors. We supply
> the hardware. You get the recognition. Email Us:
> bandwidth at sourceforge.net
> _______________________________________________
> Vxl-users mailing list
> Vxl-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/vxl-users
> _______________________________________________
> Cmake mailing list
> Cmake at public.kitware.com
> http://public.kitware.com/mailman/listinfo/cmake



More information about the CMake mailing list