Correct linkage library name generation for TI compilers


I’m using TI ARM CGT and TI C6000 CGT.

After calling link_libraries function (by myself or by conan tool) for linking mylibrary lib, linker flag --library=mylibrary was generated.

But that two compilers (and I think other TI CGT) requires full library name with extension (it should be --library=libmylibrary.a).

I can remove the default prefix lib for Unix systems by defining CMAKE_STATIC_LIBRARY_PREFIX variable, but that doesn’t work with an extension (suffix).

mylibrary was also created by CMake with the same toolchain settings.

My environment: CMake 3.18.0, Ubuntu 16.04 LTS, TI ARM CGT 18.12.5, TI C6000 CGT 8.3.2

With regards,

I suspect we might need to update our TI support for this.

Cc: @brad.king

CMake 3.19 includes some updates to the TI compiler support from MR 5010.

That bag was also reproduced by CMake 3.19.6 on Ubuntu 16.04 LTS with TI ARM CGT 18.12.5