diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2020-04-11 02:24:22 +0200 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2020-04-11 15:01:52 -0700 |
commit | 44525cfe931c7f102e7bae667e5f37c8b964a806 (patch) | |
tree | 2bab1949d8a0e5e74575ae4a5df7c12c8e40bb48 /cmake/Modules | |
parent | 3dfea93af0f6aa82cb226e2db7ef6da131aea3ab (diff) |
CMake/SWIG: Remove SWIG flag superfluous after 3.0.12, suppress warning
SWIG complains about "Deprecated command line option: -modern. This
option is now always on.".
As traditional with SWIG, policy changes don't appear in any
documentation; with a bit of git blaming, I found the change to have
been introduced after SWIG 3.0.12.
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/GrSwig.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake index 7142a3dee3..950884fa27 100644 --- a/cmake/Modules/GrSwig.cmake +++ b/cmake/Modules/GrSwig.cmake @@ -107,7 +107,11 @@ macro(GR_SWIG_MAKE name) list(INSERT GR_SWIG_INCLUDE_DIRS 0 "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>") #setup the swig flags with flags and include directories - set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -w314 -relativeimport -py3 -module ${name} ${GR_SWIG_FLAGS}) + set(modern_keyword "-modern") + if("${SWIG_VERSION}" VERSION_GREATER "3.0.12") + set(modern_keyword "") + endif() + set(CMAKE_SWIG_FLAGS -fvirtual ${modern_keyword} -keyword -w511 -w314 -relativeimport -py3 -module ${name} ${GR_SWIG_FLAGS}) #set the C++ property on the swig .i file so it builds set_source_files_properties(${ifiles} PROPERTIES CPLUSPLUS ON) |