[CMake] CMake 2.6.0 RC 6 ready for testing

Bill Hoffman bill.hoffman at kitware.com
Fri Apr 4 09:56:53 EDT 2008


Hendrik Sattler wrote:
> Zitat von Bill Hoffman <bill.hoffman at kitware.com>:
> 
>> I am happy to announce that CMake 2.6.0 RC6 is ready for testing.
>> You can find the source and binaries here: 
>> http://www.cmake.org/files/v2.6/.
> 
> I tried it with a cross-compilation setup. Works really great except 
> that an _executable_ that links against two _static_ libraries (found 
> with find_library) gets a -rdynamic on the command line. That doesn't 
> make sense for an executable and the resulting binary is bigger than is 
> should be.
> In Modules/Platform/Linux.cmake (yes, the cross-compilation target is 
> also a Linux) "-rdynamic" is only listed for 
> CMAKE_SHARED_LIBRARY_LINK_C_FLAGS. This is definitely not wanted, 
> especially not in a Release build.
> 
> Shouldn't this flag only be set for a MODULE on a add_library?
> 
> If this is the right behaviour: how do I get rid of this flag 
> (preferrably in the Toolchain file) for add_executable targets?
> 

You should be able to set the variable to empty in the toolchain file.

set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS )
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS )

-Bill


More information about the CMake mailing list