summaryrefslogtreecommitdiffstats
path: root/Modules/UseSWIG.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-01 11:10:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-08-01 11:21:34 (GMT)
commit24ff152aa07d22bda669c74102500d975bf0b257 (patch)
tree3227437c79dcf71729b39b11eeb72a197dad75bf /Modules/UseSWIG.cmake
parent9187d1c41a1349322044c358d99488670da91083 (diff)
parent2f88c177d09b35c838a72139541208fab79b098d (diff)
downloadCMake-24ff152aa07d22bda669c74102500d975bf0b257.zip
CMake-24ff152aa07d22bda669c74102500d975bf0b257.tar.gz
CMake-24ff152aa07d22bda669c74102500d975bf0b257.tar.bz2
Merge topic 'UseSWIG-legacy-user-flags'
2f88c177d0 UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Julien Schueller <schueller@phimeca.com> Merge-request: !2245
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r--Modules/UseSWIG.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index e7aaf32..dc4febc 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -254,7 +254,6 @@ macro(SWIG_MODULE_INITIALIZE name language)
string(TOUPPER "${language}" SWIG_MODULE_${name}_LANGUAGE)
string(TOLOWER "${language}" SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG)
- set(SWIG_MODULE_${name}_EXTRA_FLAGS)
if (NOT DEFINED SWIG_MODULE_${name}_NOPROXY)
set (SWIG_MODULE_${name}_NOPROXY FALSE)
endif()
@@ -262,12 +261,14 @@ macro(SWIG_MODULE_INITIALIZE name language)
set (SWIG_MODULE_${name}_NOPROXY TRUE)
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")
endif()
if(SWIG_MODULE_${name}_LANGUAGE STREQUAL "UNKNOWN")
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")
endif()
endmacro()