cpputils-cmake
cpputils-cmake copied to clipboard
cppcm-reload-all yields cryptic error about "flymake Makefile"
it emits an annoying warning message everytime its run even though I have
(setq cppcm-write-flymake-makefile nil) in my .emacs, either that or the message
is wrong.
what message? you want me suppress the message?
(message "Failed to create Makefile for flymake. Continue anyway.")))
Not sure why I even see it flashing sometimes, but I don't think it's actually tied to flymake particularly. Guess it's a relic from before cppcm supported so many diff packages.
got.
I adjusted the wording of warning message and suppress it by default.
fixed at 6d5da7d more log code. suppress warning (Chen Bin)
But can you use cpputil-cmake successfully?
The reason you see the warning message is because somethings happens, you need compile and create the executable successfully for at least once.
I have compiled successfully but it still flashes occasionally. If it's a real error maybe it shouldn't be supressed but only needs to have the message made more accurate.
Whether it works? I actually don't know. All things other then irony were already manually
setup by my .emacs previously. And with irony It doesn't seem to register the build/.json
file, which was the reason I installed it. I submitted https://github.com/Sarcasm/irony-mode/pull/237 to do just that in irony itself.
The reason I'm seeing this error may be that, well, my project looks like this:
build/ # cdb here
src/
vendor/foo1/CMakeLists.txt # 3rd party, without cdb
vendor/foo2/CMakeLists.txt # ...
and I'd like the cdb to be loaded fo code I'm editing in src/. But, it looks like
cppcm sees the CMakeLists.txt projects under vendor/, finds there's
no cdb there and errors without adding the one that does exist.
then how you compile the code in src/? unless there is one CMakeLists.txt in src, my plugin won't work.
sources in src/ build in /build. But I keep 3rd party libs under vendor/ and build them there
straight from tarball/git. If they do not create a cdb by default, it isn't there.
unless there is one CMakeLists.txt in src, my plugin won't work.
exactly.
there must be some CMakeLists.txt in in parent of src/, or else cpputils-cmake will not work
Oh, there is (corrected):
CMakeLists.txt
build/ # cdb here
src/
vendor/foo1/CMakeLists.txt # 3rd party, without cdb
vendor/foo2/CMakeLists.txt # ...
but afaict it still doesn't work, instead I get the cryptic warning message about "flymake makefile".