Commit 24ff152a authored by Brad King's avatar Brad King 💬 Committed by Kitware Robot
Browse files

Merge topic 'UseSWIG-legacy-user-flags'

2f88c177

 UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Julien Schueller's avatarJulien Schueller <schueller@phimeca.com>
Merge-request: !2245
parents 9187d1c4 2f88c177
...@@ -254,7 +254,6 @@ macro(SWIG_MODULE_INITIALIZE name language) ...@@ -254,7 +254,6 @@ macro(SWIG_MODULE_INITIALIZE name language)
string(TOUPPER "${language}" SWIG_MODULE_${name}_LANGUAGE) string(TOUPPER "${language}" SWIG_MODULE_${name}_LANGUAGE)
string(TOLOWER "${language}" SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG) string(TOLOWER "${language}" SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG)
set(SWIG_MODULE_${name}_EXTRA_FLAGS)
if (NOT DEFINED SWIG_MODULE_${name}_NOPROXY) if (NOT DEFINED SWIG_MODULE_${name}_NOPROXY)
set (SWIG_MODULE_${name}_NOPROXY FALSE) set (SWIG_MODULE_${name}_NOPROXY FALSE)
endif() endif()
...@@ -262,12 +261,14 @@ macro(SWIG_MODULE_INITIALIZE name language) ...@@ -262,12 +261,14 @@ macro(SWIG_MODULE_INITIALIZE name language)
set (SWIG_MODULE_${name}_NOPROXY TRUE) set (SWIG_MODULE_${name}_NOPROXY TRUE)
endif () endif ()
if (SWIG_MODULE_${name}_NOPROXY AND NOT "-noproxy" IN_LIST CMAKE_SWIG_FLAGS) if (SWIG_MODULE_${name}_NOPROXY AND
NOT ("-noproxy" IN_LIST CMAKE_SWIG_FLAGS OR "-noproxy" IN_LIST SWIG_MODULE_${name}_EXTRA_FLAGS))
list (APPEND SWIG_MODULE_${name}_EXTRA_FLAGS "-noproxy") list (APPEND SWIG_MODULE_${name}_EXTRA_FLAGS "-noproxy")
endif() endif()
if(SWIG_MODULE_${name}_LANGUAGE STREQUAL "UNKNOWN") if(SWIG_MODULE_${name}_LANGUAGE STREQUAL "UNKNOWN")
message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found") message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
elseif(SWIG_MODULE_${name}_LANGUAGE STREQUAL "PERL") elseif(SWIG_MODULE_${name}_LANGUAGE STREQUAL "PERL" AND
NOT "-shadow" IN_LIST SWIG_MODULE_${name}_EXTRA_FLAGS)
list(APPEND SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow") list(APPEND SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
endif() endif()
endmacro() endmacro()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment