[cfe-dev] Should we stop supporting building with Visual Studio?
Zachary Turner via cfe-dev
cfe-dev at lists.llvm.org
Tue Oct 9 02:47:21 PDT 2018
On Tue, Oct 9, 2018 at 12:49 AM Csaba Raduly <rcsaba at gmail.com> wrote:
> On Sun, Oct 7, 2018 at 10:51 PM Zachary Turner via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> > 1) Run CMake twice, generating to separate output directories. Once
> using -G "Visual Studio 15 2017" and once using -G Ninja, each to different
> > 2) Open the VS one. You have full IDE support.
> > 3) Instead of hitting Ctrl+Shift+B to build, have a command prompt
> window open and type ninja. Wait for it to complete.
> If there were errors, eyeball-grep the console output and manually
> navigate to the affected file/line. No thanks.
I don’t find this to be a problem in practice. You have to eyeball grep
the output anyway to figure out which line to double click in the build
output window. Usually it’s a file you have open in which case you don’t
have to manually navigate to it. If it’s not then yes you have to manually
open the file, but you don’t have to manually navigate to the line. You
can hit Ctrl+F7 to compile just that file in VS and then double click.
Since the ninja build is faster anyway though, the whole process doesn’t
actually end up taking that much more time. Note that if you were to add a
custom tool command to do your build for you and output to the VS console
window, you could still double click lines there and it would be exactly
the same as if you built from inside VS
> > If you want to you can make a custom tool command in Visual Studio so
> that you can access this from a keyboard shortcut.
> > 4) When you want to debug, set your startup project (as you normally
> would), right click and hit properties, go to Debugging, change Command
> from $(TargetPath) to <type the full path to bin/foo.exe of the program you
> want to debug>.
> Make some changes in the source, hit build, and wonder why the changes
> don't appear in the debuggee. (because they got compiled into the VS
> dir, not the ninja dir).
This will never happen. An incremental build takes about 10-20 seconds,
compared to 5-10 minutes for a full build. If you hit Build in VS you will
notice because you probably don’t want to sit around for 5-10 minutes.
Moreover, this is just muscle memory which would cause you to accidentally
hit build in VS. I’ve probably only done this 3-4 times in as many years.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev