如何避免SWIG的“弃用的命令行选项:-modern。此选项现在始终处于启用状态。”

问题描述 投票:0回答:1

由于我正在运行更新的系统,所以我的构建日志(在本例中为GNU Radio)充满了

Deprecated command line option: -modern. This option is now always on.

我把这归结为SWIG的罪魁祸首。但是(与往常一样),SWIG文档和更改日志未指定添加的时间,因此,根据所使用的SWIG版本,我很难禁用-command参数。

由于该选项始终处于哪个SWIG版本?

python c++ swig
1个回答
1
投票

强烈谴责巨大的swig/Source/Modules/Python.cxx导致意识到这是在git commit e4fceee12中发生的; git describe e4fceee12产生rel-3.0.12-1146-ge4fceee12,即SWIG版本3.0.12。

我已经可以使用]禁用它>

    set(modern_keyword "-modern")
    if("${SWIG_VERSION}" VERSION_GREATER "3.0.11")
      set(modern_keyword "")
    endif()
    set(CMAKE_SWIG_FLAGS … ${modern_keyword} …)

在我的CMake基础结构中。

© www.soinside.com 2019 - 2024. All rights reserved.