Ugh, apologies. The first patch got mangled in transit. Resending as an
attachment, best I can do for the moment.


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]   
From 3bdba7435d68891044552214c8b9fddbd464975f Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <[email protected]>
Date: Thu, 26 Sep 2019 14:57:25 -0400
Subject: [PATCH] Simplify CMake policy guard

Signed-off-by: FeRD (Frank Dana) <[email protected]>
---
 python/CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 494f6ff..4f758d5 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -1,7 +1,7 @@
-# swig_add_library behavior changed in cmake 3.13 and SWIG_MODULE_<target>_REAL_NAME
-# is no longer set by default so set policy to the old behavior.
-if(NOT CMAKE_VERSION VERSION_LESS 3.13.0)
-  cmake_policy(SET CMP0078 OLD)
+# swig_add_library behavior changed in cmake 3.13 to no longer set
+# SWIG_MODULE_<target>_REAL_NAME, so restore the old behavior.
+if ( POLICY CMP0078 )
+  cmake_policy( SET CMP0078 OLD )
 endif ()
 
 # workaround for cmake bug #0013449
-- 
2.21.0

Reply via email to