# Correct linkage library name generation for TI compilers

**URL:** https://discourse.cmake.org/t/correct-linkage-library-name-generation-for-ti-compilers/1910
**Category:** Usage
**Tags:** os:linux, comp:ti
**Created:** [September 25, 2020, 7:29am UTC](https://discourse.cmake.org/t/correct-linkage-library-name-generation-for-ti-compilers/1910 "2020-09-25T07:29:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AJIOB](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ajiob/32/852_2.png) [@AJIOB](https://discourse.cmake.org/u/AJIOB)
#### Post date: [September 25, 2020, 7:29am UTC](https://discourse.cmake.org/t/correct-linkage-library-name-generation-for-ti-compilers/1910/1 "2020-09-25T07:29:20Z")

</div>

Hello

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,  
Alex

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 22, 2020, 7:41pm UTC](https://discourse.cmake.org/t/correct-linkage-library-name-generation-for-ti-compilers/1910/2 "2020-11-22T19:41:56Z")

</div>

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

Cc: @brad.king

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [November 23, 2020, 1:10pm UTC](https://discourse.cmake.org/t/correct-linkage-library-name-generation-for-ti-compilers/1910/3 "2020-11-23T13:10:41Z")

</div>

CMake 3.19 includes some updates to the TI compiler support from [MR 5010](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5010).

---

<div class="post-metadata">

### Author: ![AJIOB](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ajiob/32/852_2.png) [@AJIOB](https://discourse.cmake.org/u/AJIOB)
#### Post date: [March 13, 2021, 5:30pm UTC](https://discourse.cmake.org/t/correct-linkage-library-name-generation-for-ti-compilers/1910/4 "2021-03-13T17:30:37Z")

</div>

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