diff options
author | Brad King <brad.king@kitware.com> | 2018-07-31 18:01:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-07-31 18:01:14 (GMT) |
commit | 3bab41f8f2971d3aa9fa40beb7263de8f340f1e9 (patch) | |
tree | 47f4430a80500e8590ea77ef26a3491ff5bb0ffe | |
parent | 2af530731707491c8da7c76cfe6ecd35d7c36e57 (diff) | |
parent | 2f88c177d09b35c838a72139541208fab79b098d (diff) | |
download | CMake-3bab41f8f2971d3aa9fa40beb7263de8f340f1e9.zip CMake-3bab41f8f2971d3aa9fa40beb7263de8f340f1e9.tar.gz CMake-3bab41f8f2971d3aa9fa40beb7263de8f340f1e9.tar.bz2 |
Merge branch 'UseSWIG-legacy-user-flags' into release-3.12
Merge-request: !2245
-rw-r--r-- | Modules/UseSWIG.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index b74ba9f..b7b9fe1 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -241,7 +241,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() @@ -249,12 +248,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() |