如何隐藏 cmake 编译器定义 -D 以防止在终端中打印
我使用 add_compile_definitions(var=value......) 添加了数百个编译器定义到我的根 CMakeLists.txt 中,该定义在构建过程中使用 -Dvar=value 在命令行/终端中打印出来。我想关闭回声以隐藏终端窗口中的打印内容。到目前为止,我已经尝试过使用,
1. set(CMAKE_VERBOSE_MAKEFILE OFF)
2. set(CMAKE_NO_VERBOSE)
3. cmake.definitions["CMAKE_VERBOSE_MAKEFILE"] = False (in conanfile)
4. cmake.verbose = False (in conanfile)
但没有任何帮助,尽管 cmakecache.txt 中的 CMAKE_VERBOSE_MAKEFILE 设置为 False,CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL 以某种方式设置为 1,也在缓存中将此变量更改为“0”以进行调试并没有帮助... ……有人有更好的建议吗?
I have hundreds of compiler definitions added using add_compile_definitions(var=value......) to my root CMakeLists.txt which gets printed out in the commandline/terminal with -Dvar=value during build. I want to turn off the echo to hide the prints from my terminal window. So far I have tried using
1. set(CMAKE_VERBOSE_MAKEFILE OFF)
2. set(CMAKE_NO_VERBOSE)
3. cmake.definitions["CMAKE_VERBOSE_MAKEFILE"] = False (in conanfile)
4. cmake.verbose = False (in conanfile)
but none helped, although CMAKE_VERBOSE_MAKEFILE in cmakecache.txt sets to False, CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL somehow gets set to 1, also changing this var to "0" in the cache for debugging did not help......does anyone have a better suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论