[cmake-developers] target_link_libraries and --start-group/--end-group ?

Dmitry Polyanitsa dpolyanitsa at nvidia.com
Tue Jan 13 10:47:31 EST 2015


What Nsight Tegra version are you using? The AdditionalDependencies string you've described should be correctly parsed as libraries list with a group in the latest Nsight Tegra release.

Unfortunately, the existence of a declarative-style platform files workaround is unlikely - we do most of the processing in the build tasks DLL, which is written in C#, so you cannot easily alter things there.


-----Original Message-----
From: Robert Goulet [mailto:Robert.Goulet at autodesk.com] 
Sent: Tuesday, January 13, 2015 6:37 PM
To: Brad King
Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers at cmake.org
Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ?

Hi all,

Dmitry suggestion didn't work. It outputs the following in the .vcxproj file:


...and Nsight Tegra interpreted it like this (clang compiler):

-l"c" -l"m" -l"dl" -l"log" -l"android" -l"EGL" -l"GLESv2" -l"OpenSLES" -l"(" -l"foo" -l"bar" -l")"

...which obviously generated a link error (cannot find library '(' and ')').

Using Brad's method of link multiplicity is too much work because we make use of packages and heavy generator expressions, making it a lot more difficult and much less elegant.

Dmitry, is there a work-around I could temporarily implement in the VS files until you issue a new version of Nsight Tegra? i.e. the files found under "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Tegra-Android" ?


-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com]
Sent: Tuesday, January 13, 2015 9:11 AM
To: Robert Goulet
Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers at cmake.org
Subject: Re: [cmake-developers] target_link_libraries and --start-group/--end-group ?

On 1/13/2015 6:19 AM, Dmitry Polyanitsa wrote:
> you could try using parentheses instead of 
> -Wl,--start-group/-Wl,--end-group
> it should serve as a workaround while we fix the prefix addition to 
> the -Wl flags in Nsight Tegra.

Thanks, Dmitry.

Robert, the linker group flags are platform-specific so the approach CMake offers for doing this in general is the "link multiplicity"
approach Robert Maynard mentioned earlier in this thread:

On 1/6/2015 3:50 PM, Robert Goulet wrote:
> But it doesn't seems to work when building for NVidia NSight Android 
> platform using Visual Studio IDE.

With IMPORTED_LINK_INTERFACE_MULTIPLICITY and circular settings for INTERFACE_LINK_LIBRARIES the libraries should show up repeated in the .vcxproj file.


This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

More information about the cmake-developers mailing list