[CMake] LINK_FLAGS works incorrectly,

Hendrik Sattler post at hendrik-sattler.de
Mon Apr 18 12:28:43 EDT 2011


Am Montag 18 April 2011, 15:25:24 schrieb Łukasz Tasz:
> Hi all,
> 
> I got a simple question,
> 
> What is idea behind target property LINK_FLAGS?
> 
> When I add linker flag e.g --no-undefined then cmake is not alligning
> it to real linker that will be used during linking.
> 
> for example --no-undefined is a valid ld switch, but when I specify it
> LINK_FLAGS it will not reach linker since cmake is deciding to use g++
> and is forgeting about adding -Wl, at the begining.

However, there are flags for the linking stage of the compiler that do not 
directly translate to -Wl,--somthing but e.g. instruct gcc what libraries to 
use (or not) for linking.
Just look at "Options for Linking" in  "man gcc".

HS


More information about the CMake mailing list