[cmake-developers] target_link_libraries and --start-group/--end-group ?
Robert Goulet
Robert.Goulet at autodesk.com
Tue Jan 13 10:36:45 EST 2015
Hi all,
Dmitry suggestion didn't work. It outputs the following in the .vcxproj file:
<AdditionalDependencies>c;m;dl;log;android;EGL;GLESv2;OpenSLES;(;foo;bar;)</AdditionalDependencies>
...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" ?
Thanks.
-----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
[snip]
> 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.
-Brad
More information about the cmake-developers
mailing list