Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Add pthread library for Windows ext + link statically
Browse files Browse the repository at this point in the history
Try to get the pthread library included in the Windows wheel.

Limiting to two platforms for initial testing.
  • Loading branch information
ajoubertza committed May 26, 2020
1 parent 70ef4df commit 0343ee9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 39 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC $ENV{TANGO_ROOT}/lib/libtango.lib
$ENV{TANGO_ROOT}/lib/omnithread.lib
$ENV{TANGO_ROOT}/lib/msvcstub.lib)
target_link_libraries(${PROJECT_NAME} PUBLIC ws2_32 mswsock advapi32 comctl32 odbc32)
target_link_libraries(${PROJECT_NAME} PUBLIC $ENV{TANGO_ROOT}/lib/pthreadVC2.lib)
target_link_libraries(${PROJECT_NAME} PUBLIC $ENV{TANGO_ROOT}/lib/pthreadVC2-s.lib)
target_link_libraries(${PROJECT_NAME} PUBLIC $ENV{TANGO_ROOT}/lib/libzmq-v${VCSTR}-mt-s-${ZMQ_VERSION_}.lib)
target_link_libraries(${PROJECT_NAME} PUBLIC $ENV{BOOST_ROOT}/lib/libboost_python$ENV{PYTHON_VER}-vc${VCSTR}-mt-s-x${PY_TARGET}-${BOOST_VERSION_}.lib)
target_link_libraries(${PROJECT_NAME} PUBLIC $ENV{PYTHON_ROOT}/libs/python$ENV{PYTHON_VER}.lib)
76 changes: 38 additions & 38 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ environment:
boost_download_base: https://github.com/tango-controls/boost-ci/releases/download/
boost_version: 1.70.0
matrix:
- platform: win32
configuration: Release
ARCH: win32-msvc9
ARCH_PY: win32-msvc9-py27
VC_VER: 9.0
MSVCVERSION: v90
PYTHON_VER: 27
PYTHON_ROOT: c:\Python27\
CMAKE_GENERATOR: "Visual Studio 9 2008"
# - platform: win32
# configuration: Release
# ARCH: win32-msvc9
# ARCH_PY: win32-msvc9-py27
# VC_VER: 9.0
# MSVCVERSION: v90
# PYTHON_VER: 27
# PYTHON_ROOT: c:\Python27\
# CMAKE_GENERATOR: "Visual Studio 9 2008"
- platform: x64
configuration: Release
ARCH: x64-msvc9
Expand All @@ -27,34 +27,34 @@ environment:
PYTHON_ROOT: c:\Python27-x64\
CMAKE_GENERATOR: "Visual Studio 9 2008 Win64"

- platform: win32
configuration: Release
ARCH: win32-msvc14
ARCH_PY: win32-msvc14-py36
VC_VER: 14.0
MSVCVERSION: v140
PYTHON_VER: 36
PYTHON_ROOT: c:\Python36\
CMAKE_GENERATOR: "Visual Studio 14 2015"
- platform: x64
configuration: Release
ARCH: x64-msvc14
ARCH_PY: x64-msvc14-py36
VC_VER: 14.0
MSVCVERSION: v140
PYTHON_VER: 36
PYTHON_ROOT: c:\Python36-x64\
CMAKE_GENERATOR: "Visual Studio 14 2015 Win64"

- platform: win32
configuration: Release
ARCH: win32-msvc14
ARCH_PY: win32-msvc14-py37
VC_VER: 14.0
MSVCVERSION: v140
PYTHON_VER: 37
PYTHON_ROOT: c:\Python37\
CMAKE_GENERATOR: "Visual Studio 14 2015"
# - platform: win32
# configuration: Release
# ARCH: win32-msvc14
# ARCH_PY: win32-msvc14-py36
# VC_VER: 14.0
# MSVCVERSION: v140
# PYTHON_VER: 36
# PYTHON_ROOT: c:\Python36\
# CMAKE_GENERATOR: "Visual Studio 14 2015"
# - platform: x64
# configuration: Release
# ARCH: x64-msvc14
# ARCH_PY: x64-msvc14-py36
# VC_VER: 14.0
# MSVCVERSION: v140
# PYTHON_VER: 36
# PYTHON_ROOT: c:\Python36-x64\
# CMAKE_GENERATOR: "Visual Studio 14 2015 Win64"
#
# - platform: win32
# configuration: Release
# ARCH: win32-msvc14
# ARCH_PY: win32-msvc14-py37
# VC_VER: 14.0
# MSVCVERSION: v140
# PYTHON_VER: 37
# PYTHON_ROOT: c:\Python37\
# CMAKE_GENERATOR: "Visual Studio 14 2015"
- platform: x64
configuration: Release
ARCH: x64-msvc14
Expand Down Expand Up @@ -85,7 +85,7 @@ init:
- appveyor DownloadFile %boost_download_base%/%boost_version%/boost-python-%boost_version%_%ARCH%_py%PYTHON_VER%.zip
- cmd: 7z -y x boost-python-%boost_version%_%ARCH%_py%PYTHON_VER%.zip -oC:\projects\

#Pthread-Win32
#Pthread-Win32 (note: we just need the include files, since library is in libtango download)
- cmd: cd "C:\projects\"
- cmd: md pthreads-win32
- cmd: cd "C:\projects\"
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ def setup_args():
add_lib('omni', directories, sys_libs, lib_name='omniORB4')
add_lib('zmq', directories, sys_libs, lib_name='libzmq')
add_lib('tango', directories, sys_libs, inc_suffix='tango')
if WINDOWS:
add_lib('pthread', directories, sys_libs, lib_name='pthreadVC2')
add_lib_boost(directories)

# special numpy configuration
Expand Down

0 comments on commit 0343ee9

Please sign in to comment.