Thank you Marc, here we have to put " -Wl,-start-group" and " -Wl,-end-group"
in target_link_libraries because these two link flags are special, must
used between link targets.
Now my way to fix is to use "-Xlinker -start-group" and "-Xlinker
-end-group" instead.
Thanks.
Alvin
On Fri, Sep 7,
Hi,
To avoid this, put link flags in ‘LINK_FLAGS’ target properly.
´target_link_libraries’ is populating ´LINK_LIBRARIES’ target property.
Le sam. 8 sept. 2018 à 01:40, Alvin Chu a écrit :
> Hi cmake team,
> I'm using cmake 3.12.1, and building a project which has cuda codes, the
> cmake file
Hi cmake team,
I'm using cmake 3.12.1, and building a project which has cuda codes, the
cmake file looks like,
list(APPEND ALL_OBJECTS $)
list(APPEND ALL_OBJECTS $)
add_library(lib1 SHARED ${ALL_OBJECTS})
list(APPEND ALL_LIBRARIES -Wl,-start-group)
list(APPEND ALL_LIBRARIES ${SOME_LIBS})