title: Vim quickfix: How to open :make entries that were compiled in different directory than vim working directory?
body: <p>I'm diving into the quickfix list of Vim that looks quite awesome, however I am not being able to exploit this because of a relative path problem. Explanation:</p>
  <p>My Vim window path is <strong>.</strong></p>
  <p>I have a custom make command in Vim:</p>
  <pre><code>:set makeprg=west\ build\ -b\ nucleo_l552ze_q\ .\
  </code></pre>
  <p>The west program will use CMake and gcc to compile my project. But here is the thing: it changes the current directory to <strong>./build</strong>.</p>
  <p>So, in Vim, when I run</p>
  <pre><code>:make
  </code></pre>
  <p>the quickfix list is filled with references like <strong>../src/main.c</strong> instead of <strong>src/main.c</strong></p>
  <p>As a result, when I try to open a file from the quickfix list, Vim creates a new file using <code>make</code>'s relative path instead of opening the file I wanted based on the Vim working directory.</p>
  <p><a href="https://i.stack.imgur.com/fQZmx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fQZmx.png" alt="enter image description here" /></a></p>
  <p>My question is: How do I open :make entries that were compiled in different directory than the vim working directory?</p>
  <p>Is it possible to change the root path of the quickfix list after running the make command ?</p>