summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-06 12:31:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-06 12:31:40 (GMT)
commit2d6a3fd626ad154d92d9345aa3fcb218d188d7ca (patch)
treef5b44da25097ad2f0882af86e0d32d3712236601 /Modules
parentc755fd166d353f6f4861ac9136515ce3586957d4 (diff)
parentc3d0b25514bef51f6f17da15470c852194a99b68 (diff)
downloadCMake-2d6a3fd626ad154d92d9345aa3fcb218d188d7ca.zip
CMake-2d6a3fd626ad154d92d9345aa3fcb218d188d7ca.tar.gz
CMake-2d6a3fd626ad154d92d9345aa3fcb218d188d7ca.tar.bz2
Merge topic 'UseSWIG-policies' into release-3.20
c3d0b25514 UseSWIG: Transform swig depfile to match Ninja generator paths 8c525d7e16 UseSWIG: Run using policy settings from includer Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5983
Diffstat (limited to 'Modules')
-rw-r--r--Modules/UseSWIG.cmake25
1 files changed, 10 insertions, 15 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 7d7f737..6073125 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -338,20 +338,13 @@ as well as ``SWIG``:
initialized with the value of this variable.
#]=======================================================================]
-cmake_policy(GET CMP0078 target_name_policy)
-cmake_policy(GET CMP0086 module_name_policy)
-
-cmake_policy (VERSION 3.12)
-if (target_name_policy)
- # respect user choice regarding CMP0078 policy
- cmake_policy(SET CMP0078 ${target_name_policy})
-endif()
-if (module_name_policy)
- # respect user choice regarding CMP0086 policy
- cmake_policy(SET CMP0086 ${module_name_policy})
-endif()
-unset(target_name_policy)
-unset(module_name_policy)
+cmake_policy(PUSH)
+# numbers and boolean constants
+cmake_policy (SET CMP0012 NEW)
+# IN_LIST operator
+cmake_policy (SET CMP0057 NEW)
+# Ninja generator normalizes custom command depfile paths
+cmake_policy (SET CMP0116 NEW)
set(SWIG_CXX_EXTENSION "cxx")
set(SWIG_EXTRA_LIBRARIES "")
@@ -911,7 +904,7 @@ function(SWIG_ADD_LIBRARY name)
if (APPLE)
set_target_properties (${target_name} PROPERTIES SUFFIX ".jnilib")
endif()
- if ((WIN32 AND MINGW) OR CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL MSYS)
+ if ((WIN32 AND MINGW) OR CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL "MSYS")
set_target_properties(${target_name} PROPERTIES PREFIX "")
endif()
elseif (swig_lowercase_language STREQUAL "lua")
@@ -1007,3 +1000,5 @@ function(SWIG_LINK_LIBRARIES name)
endif()
endif()
endfunction()
+
+cmake_policy(POP)