# Complete compiler path in compile commands.

**URL:** https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127
**Category:** Usage
**Created:** [April 12, 2021, 4:57pm UTC](https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127 "2021-04-12T16:57:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![TummalaManish](https://discourse.cmake.org/user_avatar/discourse.cmake.org/tummalamanish/32/1360_2.png) [@TummalaManish](https://discourse.cmake.org/u/TummalaManish)
#### Post date: [April 12, 2021, 4:57pm UTC](https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127/1 "2021-04-12T16:57:34Z")

</div>

In the compile commands json the path to the compiler is truncated as follows.

 ![image](https://discourse.cmake.org/uploads/default/original/2X/2/26cb832df30f42418c8d7aa69ff7c016ad590988.png)  
Is there an option to get the full compiler path?.

---

<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: [April 12, 2021, 5:00pm UTC](https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127/2 "2021-04-12T17:00:45Z")

</div>

How do you mean “truncated”? That looks like a standard [8.3 filename](https://en.wikipedia.org/wiki/8.3_filename) format for “overlong” file path components on Windows to me.

---

<div class="post-metadata">

### Author: ![TummalaManish](https://discourse.cmake.org/user_avatar/discourse.cmake.org/tummalamanish/32/1360_2.png) [@TummalaManish](https://discourse.cmake.org/u/TummalaManish)
#### Post date: [April 12, 2021, 5:39pm UTC](https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127/3 "2021-04-12T17:39:46Z")

</div>

That might be a standard. However, is there a option to get the full compiler path?

---

<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: [April 12, 2021, 5:52pm UTC](https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127/4 "2021-04-12T17:52:07Z")

</div>

I’m not 100% familiar with how IAR works or is discovered. What is the compiler path in `CMakeCache.txt`? What generator are you using?

---

<div class="post-metadata">

### Author: ![TummalaManish](https://discourse.cmake.org/user_avatar/discourse.cmake.org/tummalamanish/32/1360_2.png) [@TummalaManish](https://discourse.cmake.org/u/TummalaManish)
#### Post date: [April 12, 2021, 6:35pm UTC](https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127/5 "2021-04-12T18:35:54Z")

</div>

The compiler in the CMakeCache.txt file is correct. However, it is the compile\_commands.json that I’m having issue with. I’m using MinGW make. generator

---

<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: [April 12, 2021, 7:02pm UTC](https://discourse.cmake.org/t/complete-compiler-path-in-compile-commands/3127/6 "2021-04-12T19:02:20Z")

</div>

Hmm. That means that CMake is doing the path shortening somewhere internally since (IIRC) CMake implements `compile_commands.json` for that generator itself. Could you please file [an issue](https://gitlab.kitware.com/cmake/cmake/-/issues) about this? Thanks.
