Closed neumannrf closed 7 years ago
I can not seem to reproduce this bug what OS and compiler are you using?
I am using GCC 5.3 on Ubuntu 14.04 with -GNinja
as generator. If it does not suffice, I can try to provide a minimal example.
Weird I am on GCC 5.4.0 and Ubuntu 16.04 it works for me. The ninja-build package on 14.04 is an old version that must have had a bug in it. Did you check that removing the '-j4' argument fixed the problem? I can't just eliminate the flag without removing it for all targets; there is nothing special about the clean target it is just like all of the rest.
Yes, if I go to the terminal and issue
$> cmake --build build/ --target clean
Cleaning... 23 files.
it works well, as opposed to
$> cmake --build build/ --target clean -- -j4
usage: ninja -t clean [options] [targets]
options:
-g also clean files marked as ninja generator output
-r interpret targets as a list of rules to clean instead
clean: invalid option -- 'j'
To which version of Ninja
do you suggest I upgrade?
@siegelaaron94, I have upgraded to v0.6.2
but the -j4
remains. I am on Ninja v1.3.4
.
Opps, missed a hunk.
The latest version (0.6.3) even improved Atom's ability to catch compilation warnings. Thank you!
Since last update Atom freezes every time I need to recompile 3+ files. It even pops out a window asking me if I want to force close or keep editing. The exact same build in VS Code takes as much time as it would in the terminal.
My project has 13 .cpp
files and as many .hpp
, so not too large I would say.
Did anyone observe a similar behaviour too?
I think that you are one of the very few that uses Ninja build, so I do not have a lot of people testing. On my machine, I do not notice any freezing with 48 .hpp 42 .cpp and like 30 boost headers. It is nice to see that people are adding support for native to VSCode though.
Well, as it turns out, I get the exact same freezing behaviour when I use GNU Make instead of Ninja as generator. It takes ~2 minutes to build via Atom a project that builds in 30/17 seconds in the terminal (or in VS Code for that matter) using GNU Make/Ninja. I have been using Atom + build-cmake as my default tool for months, even before finding and adopting Ninja, and this freeze was unknown to me until I updated to v0.6.3.
Since it is not Ninja-related, would it make more sense to split it into another issue? Is there a log-file I could post here or is it more of a profiling issue?
I am getting this error message
every time I try to run
clean
from thectrl+alt+t
menu inside Atom.Doing so currently invokes
Maybe, besides removing the parallelism option
-j4
from theclean
target directive, there is also a way to add aclean-cmake
target by exploring the-g
option shown above.