mirror of
https://github.com/reactos/CMake.git
synced 2024-12-11 21:34:32 +00:00
4db31095e5
Since commit v3.1.0-rc1~227^2~1 (De-duplicate shared library targets in generated link lines, 2014-07-30) we de-duplicate shared library targets on the link line. However, some toolchains will fail linking if an executable is linking to a shared library that is not used directly and a static library that depends on the shared one. The linker may not keep the reference to the shared library the first time and then the symbols needed by the static library may not be found. Fix this by reversing the direction of the for loop that removes the duplicate shared libraries, in order to ensure that the last occurrence of the library is left instead of the first one. Extend Tests/Dependency with a case covering this behavior. Create an executable that links to a shared library and a static library but only needs the shared library as a dependency of the static library. Co-Author: Brad King <brad.king@kitware.com> |
||
---|---|---|
.. | ||
1 | ||
Case1 | ||
Case2 | ||
Case3 | ||
Case4 | ||
Case5 | ||
Eight | ||
Exec | ||
Exec2 | ||
Exec3 | ||
Exec4 | ||
Five | ||
Four | ||
NoDepA | ||
NoDepB | ||
NoDepC | ||
Seven | ||
Six | ||
Three | ||
Two | ||
CMakeLists.txt |