title: How to convert IAR .ewp to LSP compile_commands.json database
body: <p>I am on the quest of creating a <code>compile_commands.json</code> database from my IAR .ewp project. This would allow me to use intelligent LSP autocompletion (<a href="https://github.com/MaskRay/ccls" rel="nofollow noreferrer">ccls</a>) and proper semantic highlighting (<a href="https://github.com/jackguo380/vim-lsp-cxx-highlight" rel="nofollow noreferrer">vim-lsp-cxx-highlight</a>) from my vim setup.</p>
  
  <p>I understand that I could manually create a CMake file with the same setup as in the .ewp project file, but unfortunately all my co-workers use the IAR IDE. I would risk missing some important project setup changes made by my co-workers and me failing to update the .ewp. It'd be great if I could automatically parse the .ewp file to CMake, and hence create the commands database.</p>
  
  <p>Anybody knows of a clever way of doing this? If not, how would I go creating a tool that does exactly that? It appears that by <a href="https://github.com/MaskRay/ccls/issues/476" rel="nofollow noreferrer">undefining the Clang compiler defines</a> one could make ccls use of the IAR code-base at full strenght.</p>