Notes |
|
(0040743)
|
Brad King
|
2016-03-22 10:49
|
|
The other generators have several places that they use to collect link flags. See cmLocalGenerator::GetTargetFlags and its call sites. Also see cmMakefileExecutableTargetGenerator::WriteExecutableRule and cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules. |
|
|
(0040749)
|
stw_sesa
|
2016-03-22 12:40
|
|
(Just saw I accidentally included an additional quotation mark in the patch, which shouldn't be there; remove: << "\"") |
|
|
(0040760)
|
geoffviola
|
2016-03-26 19:42
|
|
I tested out the above code with a small Green Hills MULTI CMake project. See LinkFlags.zip. The patch looked close. I adjusted the whitespace, removed the extra quote, and added a const to the pointer. The new patch is 0001-Grenn-Hills-MULTI-linker-flags-implementation.patch. |
|
|
(0040761)
|
geoffviola
|
2016-03-26 23:44
|
|
I went through the code that Brad mentioned. The GetTargetFlags method seemed useful. It has the advantage of interpreting LINK_FLAGS_<CMAKE_BUILD_TYPE>. Also, it makes adding link directories easy to add.
Unfortunately, GetTargetFlags had some limitations. Unlike link directories, There are no extensions for prepending and appending to generated library names. So the previous implementation of linking to libraries was left. Also, since the Green Hills unique target groups concept is considered a cmState::EXECUTABLE, it would warn the user that there is no linker language, because the only files that it would see are .bsp and .int files. So the target groups do not get link directories or link flags.
LinkFlags2.zip was attached to show a build setup that exercises LINK_FLAGS, link_directories, and LINK_FLAGS_RELEASE. The patch is named 0001-GHS-MULTI-lflags-and-dirs-for-non-target-groups.patch. |
|
|
(0040762)
|
Brad King
|
2016-03-28 10:36
|
|
Thanks Geoff. Once the conclusion here is that one of the patches is ready for integration please bring it to the dev list as usual. |
|
|
(0040763)
|
Brad King
|
2016-03-28 13:27
|
|
|
|
(0040767)
|
Brad King
|
2016-03-29 09:21
|
|
|
|
(0041211)
|
Kitware Robot
|
2016-06-10 14:21
|
|
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|