Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find the exact compiler executable Visual Studio is calling?

I am using Visual Studio with C++.

For a particular reason, I now need to use CMake to build a piece of the project. I would like to tell CMake to use the same compiler I normally use with Visual Studio.

How can I find the exact cl.exe compiler executable path used by Visual Studio? There are a few of these on my machine.

like image 486
Aviv Cohn Avatar asked Oct 21 '25 04:10

Aviv Cohn


1 Answers

Inside VS in menu Tools > Command Line select Developer Command Prompt then run where cl. You can also select Developer PowerShell and run Get-Command cl, gcm cl or specifically (Get-Command cl).Source

Example developer powershell console

You can also open start menu, type developer and open the desired terminal

like image 116
phuclv Avatar answered Oct 22 '25 19:10

phuclv