如何查看由运行 cmake 生成的 makefile 引起的调用?
如何查看运行 make 引起的 g++ 调用?我使用 cmake 生成 makefile,因此它相当大。
使用 verbose=1,cmake 仍然隐藏 g++ 调用:
[ 0%] Building CXX object ui/CMakeFiles/ui.dir/mainwindow.cc.o
In file included from /Users/neil/nn/src/ui/mainwindow.h:6,
from /Users/neil/nn/src/ui/mainwindow.cc:9:
/Users/neil/nn/src/./core/globals.h:8:26: error: glog/logging.h: No such file or directory
我想看看它是否将正确的包含目录传递给 g++,因为它没有找到 glog/logging.h
How do I see the g++ invocations caused by running make? I am generating my makefile using cmake, so it is quite large.
Using verbose=1, cmake is still hiding the g++ invocations:
[ 0%] Building CXX object ui/CMakeFiles/ui.dir/mainwindow.cc.o
In file included from /Users/neil/nn/src/ui/mainwindow.h:6,
from /Users/neil/nn/src/ui/mainwindow.cc:9:
/Users/neil/nn/src/./core/globals.h:8:26: error: glog/logging.h: No such file or directory
I want to see if it's passing the right include directors to g++ because it's not finding glog/logging.h
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
尝试:
使 VERBOSE=TRUE
Try:
make VERBOSE=TRUE
查看
CMakeFiles/ui.dir/
目录;您可能会对flags.make
文件感兴趣,尽管g++
调用的非包含部分存储在build.make
中。Peek in the
CMakeFiles/ui.dir/
directory; you'll probably be interested in theflags.make
file, though the non-includes portion of theg++
invocation is stored inbuild.make
.您可以使用
make VERBOSE=""
设置详细级别 (来源)。You can set the verbosity level with
make VERBOSE=""
(source).使用 -DCMAKE_VERBOSE_MAKEFILE="ON" 运行 CMake
但仍然有很多噪音,因此您可能需要转储 stdout & stderr 到文件并 grep 获取编译器的名称......
Run CMake with -DCMAKE_VERBOSE_MAKEFILE="ON"
There is still a lot of noise though, so you may need to dump stdout & stderr to a file and grep for the name of the compiler...
从 shell 提示符处:(
即运行
make
,并将VERBOSE
环境变量设置为1
)。From the shell prompt:
(that is, run
make
withVERBOSE
environment variable set to1
).