It is a command line option for SWIG.
Basically what I did on a linux-box to test it :
- run cmake to generate the makefiles
- in the build/bindings/CMakeFiles/_ftdi1.dir/build.make file, I just added
-threads to the swig call like below: (think away ***svhb***)
(approx. line 73):
bindings/ftdi1PYTHON_wrap.c: ../bindings/ftdi1.i
***svhb***echo "modified version"***svhb***
$(CMAKE_COMMAND) -E cmake_progress_report
/home/svhb/Desktop/dev/S1K/FpgaComms/libftdi1.0/linux/libftdi1-1.0/build/CMakeFiles
$(CMAKE_PROGRESS_2)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold
"Swig source"
cd
/home/svhb/Desktop/dev/S1K/FpgaComms/libftdi1.0/linux/libftdi1-1.0/build/bindings
&& /usr/bin/swig -python ***svhb*** -threads***svhb*** -outdir
/home/svhb/Desktop/dev/S1K/FpgaComms/libftdi1.0/linux/libftdi1-1.0/build/bindings
-I/home/svhb/Desktop/dev/S1K/FpgaComms/libftdi1.0/linux/libftdi1-1.0/src
-I/usr/include/libusb-1.0 -I/usr/include/python2.6 -o
/home/svhb/Desktop/dev/S1K/FpgaComms/libftdi1.0/linux/libftdi1-1.0/build/bindings/ftdi1PYTHON_wrap.c
/home/svhb/Desktop/dev/S1K/FpgaComms/libftdi1.0/linux/libftdi1-1.0/bindings/ftdi1.i
I added the echo to verify this modification build like expected.
Then
->make clean
->make
I know it's a quick and dirty, but if I can verify the behavior like this, we
can fix in a proper way... (I don't know cmake, ...)
-----Original Message-----
From: Xiaofan Chen [mailto:xiaofanc@xxxxxxxxx]
Sent: donderdag 22 augustus 2013 10:24
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: : adding -threads to SWIG build step?
On Thu, Aug 22, 2013 at 3:17 PM, Vanheesbeke Stefaan
<Stefaan.Vanheesbeke@xxxxxxxxxxxxxx> wrote:
> If you can provide the compiled results with -threads for python 2.7,
> I can do my tests. I can come back to you later for compiling this myself if
> needed.
> I think I need only _ftdi1.pyd and ftdi1.py
Okay. But again I am wondering how I can add -threads for the Python binding.
I do not know much about Python and swig myself. I am not a programmer myself
-- I use libftdi mainly as a test bed for libusb/libusbx/libusb-win32 where I
am one of the admins on the support/testing side.
Supposedly I need to modify one of the files here, right? You need to tell me
what is the change required.
http://developer.intra2net.com/git/?p=libftdi;a=tree;f=python
--
Xiaofan
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|