libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.4-25-gbd82587

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 1 Oct 2019 16:04:35 +0200 (CEST)
The branch, master has been updated
       via  bd825872f55f060073b25f53c589d22db70cf338 (commit)
       via  41871ae234838d2540fc4297295fbec71f57067d (commit)
      from  5b110dec90393f6951624fe9a9e58c9ae9e43127 (commit)


- Log -----------------------------------------------------------------
commit bd825872f55f060073b25f53c589d22db70cf338
Author: Frank Dana <ferdnyc@xxxxxxxxx>
Date:   Thu Sep 26 14:57:25 2019 -0400

    Simplify CMake policy guard
    
    Signed-off-by: FeRD (Frank Dana) <ferdnyc@xxxxxxxxx>

commit 41871ae234838d2540fc4297295fbec71f57067d
Author: Richard Shaw <hobbes1069@xxxxxxxxx>
Date:   Mon Feb 18 19:42:30 2019 +0100

    CMake/Swig updates for python wrapper
    
    libftdi was FTBFS[1] in Fedora Rawhide after a GCC 9.0.X mass rebuild but
    the problem turned out to be behavior changes[2] in CMake with regards to
    SWIG[3].
    
    The UseSWIG module in cmake 3.13+ will now use standard target names and not
    generate the SWIG_MODULE_<target>_REAL_NAME variable.
    
    Replace the deprecated swig_add_module with swig_add_library.
    
    [Refinements from Intra2net:
    - Use swig_add_library for cmake 3.8+ only
    - Add cmake version guard for the new CMP0078 policy
    - Use "NOT CMAKE_VERSION VERSION_LESS" construct to
      support cmake versions below 3.7.0]
    
    [1] https://bugzilla.redhat.com/show_bug.cgi?id=1675275
    [2] 
https://cmake.org/cmake/help/latest/policy/CMP0078.html?highlight=cmp0078
    [3] https://cmake.org/cmake/help/latest/module/UseSWIG.html

-----------------------------------------------------------------------

Summary of changes:
 python/CMakeLists.txt |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 376dae6..4f758d5 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -1,3 +1,9 @@
+# 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
 if ( NOT DEFINED CMAKE_FIND_ROOT_PATH OR NOT CMAKE_VERSION VERSION_LESS 3.0.0 )
   find_package ( SWIG REQUIRED )
@@ -19,7 +25,11 @@ link_directories ( ${CMAKE_CURRENT_BINARY_DIR}/../src )
 if ( DOCUMENTATION )
   set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND})
 endif()
-swig_add_module ( ftdi1 python ftdi1.i )
+if(NOT CMAKE_VERSION VERSION_LESS 3.8.0)
+  swig_add_library ( ftdi1 LANGUAGE python SOURCES ftdi1.i )
+else ()
+  swig_add_module ( ftdi1 python ftdi1.i )
+endif()
 swig_link_libraries ( ftdi1 ftdi1 )
 
 if ( LINK_PYTHON_LIBRARY )


hooks/post-receive
-- 
A library to talk to FTDI chips

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v1.4-25-gbd82587, libftdi-git <=