deps: Fix windows build.
Broken by PR#134221 - Couple of missing deps - Windows is not happy with -J when building python deps as multiple processes will try to write to the same .pdb - Wrong .lib file name for the zstandard python module.
This commit is contained in:
@@ -28,7 +28,7 @@ ExternalProject_Add(external_cython
|
||||
|
||||
BUILD_COMMAND
|
||||
${PYTHON_BINARY} setup.py
|
||||
build ${CYTHON_BUILD_OPTION} -j${MAKE_THREADS}
|
||||
build ${CYTHON_BUILD_OPTION} -j${PYTHON_MAKE_THREADS}
|
||||
install
|
||||
--old-and-unmanageable
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ ExternalProject_Add(external_numpy
|
||||
|
||||
BUILD_COMMAND
|
||||
${PYTHON_BINARY} setup.py
|
||||
build ${NUMPY_BUILD_OPTION} -j${MAKE_THREADS}
|
||||
build ${NUMPY_BUILD_OPTION} -j${PYTHON_MAKE_THREADS}
|
||||
install
|
||||
--old-and-unmanageable
|
||||
|
||||
|
||||
@@ -11,6 +11,15 @@ option(FORCE_CHECK_HASH "Force a check of all hashses during CMake the configure
|
||||
cmake_host_system_information(RESULT NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
||||
set(MAKE_THREADS ${NUM_CORES} CACHE STRING "Number of threads to run make with")
|
||||
|
||||
# Any python module building with setup.py cannot use multiple theads on windows
|
||||
# as they will try to write to the same .pdb file simultaniously which causes
|
||||
# build errors.
|
||||
if(WIN32)
|
||||
set(PYTHON_MAKE_THREADS 1)
|
||||
else()
|
||||
set(PYTHON_MAKE_THREADS ${MAKE_THREADS})
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_MODE)
|
||||
set(BUILD_MODE "Release")
|
||||
message(STATUS "Build type not specified: defaulting to a release build.")
|
||||
|
||||
@@ -48,6 +48,8 @@ if(MSVC)
|
||||
external_python
|
||||
external_numpy
|
||||
external_python_site_packages
|
||||
external_zstandard
|
||||
external_cython
|
||||
OUTPUT
|
||||
${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS}/bin/python${PYTHON_POSTFIX}.exe
|
||||
)
|
||||
@@ -92,7 +94,11 @@ if(MSVC)
|
||||
add_custom_target(Package_Python
|
||||
ALL
|
||||
DEPENDS
|
||||
external_python external_numpy external_python_site_packages
|
||||
external_python
|
||||
external_numpy
|
||||
external_python_site_packages
|
||||
external_zstandard
|
||||
external_cython
|
||||
OUTPUT
|
||||
${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ ExternalProject_Add(external_zstandard
|
||||
|
||||
BUILD_COMMAND
|
||||
${PYTHON_BINARY} setup.py
|
||||
build ${ZSTANDARD_BUILD_OPTION} -j${MAKE_THREADS}
|
||||
build ${ZSTANDARD_BUILD_OPTION} -j${PYTHON_MAKE_THREADS}
|
||||
install
|
||||
--old-and-unmanageable
|
||||
|
||||
@@ -38,4 +38,5 @@ ExternalProject_Add(external_zstandard
|
||||
add_dependencies(
|
||||
external_zstandard
|
||||
external_python
|
||||
external_zstd
|
||||
)
|
||||
|
||||
@@ -40,7 +40,18 @@ if(WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${LIBDIR}/zstd/include/
|
||||
${HARVEST_TARGET}/zstd/include/
|
||||
|
||||
# The zstandard python extention hardcoded links to ztsd.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/zstd/lib/zstd_static${LIBEXT}
|
||||
${LIBDIR}/zstd/lib/zstd${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add_Step(external_zstd after_install
|
||||
# The zstandard python extention hardcoded links to ztsd.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/zstd/lib/zstd_static${LIBEXT}
|
||||
${LIBDIR}/zstd/lib/zstd${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user