V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
RLib
V2EX  ›  程序员

CMake 禁用 Warning

  •  
  •   RLib ·
    Rprop · 2017-08-01 18:34:29 +08:00 · 5113 次点击
    这是一个创建于 2451 天前的主题,其中的信息可能已经有所发展或是发生改变。

    禁用 CMake 本身生成的 Warning, 比如 CMake Deprecation Warning at CMakeForceCompiler.cmake:83 (message): The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set CMAKE_CXX_COMPILER and allow CMake to identify the compiler.

    除了 1L 的命令行, 还可以 set ( CMAKE_WARN_DEPRECATED 0 )

    2 条回复    2017-08-01 23:11:46 +08:00
    ivechan
        1
    ivechan  
       2017-08-01 18:37:32 +08:00
    -Wno-deprecated = Suppress deprecation warnings.
    owt5008137
        2
    owt5008137  
       2017-08-01 23:11:46 +08:00 via Android
    我一般都会把这种即将被抛弃的接口换掉。而不是仅仅是关掉 warning
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5228 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:17 · PVG 17:17 · LAX 02:17 · JFK 05:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.