<div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 12:49 AM Csaba Raduly <<a href="mailto:rcsaba@gmail.com">rcsaba@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Oct 7, 2018 at 10:51 PM Zachary Turner via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
<br>
> 1) Run CMake twice, generating to separate output directories. Once using -G "Visual Studio 15 2017" and once using -G Ninja, each to different directories.<br>
><br>
> 2) Open the VS one. You have full IDE support.<br>
><br>
> 3) Instead of hitting Ctrl+Shift+B to build, have a command prompt window open and type ninja. Wait for it to complete.<br>
<br>
If there were errors, eyeball-grep the console output and manually<br>
navigate to the affected file/line. No thanks.</blockquote><div dir="auto">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</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> If you want to you can make a custom tool command in Visual Studio so that you can access this from a keyboard shortcut.<br>
><br>
> 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>.<br>
><br>
<br>
Make some changes in the source, hit build, and wonder why the changes<br>
don't appear in the debuggee. (because they got compiled into the VS<br>
dir, not the ninja dir).</blockquote><div dir="auto"><br></div><div dir="auto">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.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>