mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
[boost-python] Try to fix build issue on Linux (#9780)
* [boost-python] Try to fix build issue on Linux * Update baseline: enable boost-python:x64-linux * Fix number of processor detection on Linux: use CMake module * Fix user-config.jam configuration on Linux * Update baseline: enable boost-mpi:x64-linux * Fix build boost-regex[icu] on Linux, issue #4962
This commit is contained in:
parent
1e697e97da
commit
1c414f9192
@ -122,17 +122,8 @@ endif()
|
|||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)
|
||||||
|
|
||||||
set(NUMBER_OF_PROCESSORS 1)
|
include(ProcessorCount)
|
||||||
if(DEFINED ENV{NUMBER_OF_PROCESSORS})
|
ProcessorCount(NUMBER_OF_PROCESSORS)
|
||||||
set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS})
|
|
||||||
elseif(CMAKE_HOST_LINUX)
|
|
||||||
execute_process(
|
|
||||||
COMMAND nproc
|
|
||||||
OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
|
|
||||||
)
|
|
||||||
string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
|
|
||||||
string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
|
|
||||||
endif()
|
|
||||||
if(NOT NUMBER_OF_PROCESSORS)
|
if(NOT NUMBER_OF_PROCESSORS)
|
||||||
set(NUMBER_OF_PROCESSORS 1)
|
set(NUMBER_OF_PROCESSORS 1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -75,17 +75,35 @@ function(boost_modular_build)
|
|||||||
# endif()
|
# endif()
|
||||||
|
|
||||||
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||||
|
set(configure_option)
|
||||||
if(DEFINED _bm_BOOST_CMAKE_FRAGMENT)
|
if(DEFINED _bm_BOOST_CMAKE_FRAGMENT)
|
||||||
set(fragment_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}")
|
list(APPEND configure_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}")
|
||||||
|
endif()
|
||||||
|
if(DEFINED VCPKG_PYTHON_EXECUTABLE)
|
||||||
|
list(APPEND configure_option "-DVCPKG_PYTHON_EXECUTABLE=${VCPKG_PYTHON_EXECUTABLE}")
|
||||||
|
endif()
|
||||||
|
if(DEFINED VCPKG_PYTHON_INCLUDE)
|
||||||
|
list(APPEND configure_option "-DVCPKG_PYTHON_INCLUDE=${VCPKG_PYTHON_INCLUDE}")
|
||||||
|
endif()
|
||||||
|
if(DEFINED VCPKG_PYTHON_LIBS_RELEASE)
|
||||||
|
list(APPEND configure_option "-DVCPKG_PYTHON_LIBS_RELEASE=${VCPKG_PYTHON_LIBS_RELEASE}")
|
||||||
|
endif()
|
||||||
|
if(DEFINED VCPKG_PYTHON_LIBS_DEBUG)
|
||||||
|
list(APPEND configure_option "-DVCPKG_PYTHON_LIBS_DEBUG=${VCPKG_PYTHON_LIBS_DEBUG}")
|
||||||
|
endif()
|
||||||
|
if(DEFINED VCPKG_PYTHON_VERSION)
|
||||||
|
list(APPEND configure_option "-DVCPKG_PYTHON_VERSION=${VCPKG_PYTHON_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build
|
SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
"-DPORT=${PORT}"
|
||||||
|
"-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}"
|
||||||
"-DB2_EXE=${B2_EXE}"
|
"-DB2_EXE=${B2_EXE}"
|
||||||
"-DSOURCE_PATH=${_bm_SOURCE_PATH}"
|
"-DSOURCE_PATH=${_bm_SOURCE_PATH}"
|
||||||
"-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}"
|
"-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}"
|
||||||
${fragment_option}
|
${configure_option}
|
||||||
)
|
)
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
@ -126,15 +144,10 @@ function(boost_modular_build)
|
|||||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DEFINED ENV{NUMBER_OF_PROCESSORS})
|
include(ProcessorCount)
|
||||||
set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS})
|
ProcessorCount(NUMBER_OF_PROCESSORS)
|
||||||
else()
|
if(NOT NUMBER_OF_PROCESSORS)
|
||||||
execute_process(
|
set(NUMBER_OF_PROCESSORS 1)
|
||||||
COMMAND nproc
|
|
||||||
OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
|
|
||||||
)
|
|
||||||
string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
|
|
||||||
string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
######################
|
######################
|
||||||
@ -195,7 +208,6 @@ function(boost_modular_build)
|
|||||||
list(APPEND _bm_OPTIONS_DBG "cxxflags=${VCPKG_CXX_FLAGS_DEBUG}")
|
list(APPEND _bm_OPTIONS_DBG "cxxflags=${VCPKG_CXX_FLAGS_DEBUG}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(VCPKG_C_FLAGS)
|
if(VCPKG_C_FLAGS)
|
||||||
list(APPEND _bm_OPTIONS "cflags=${VCPKG_C_FLAGS}")
|
list(APPEND _bm_OPTIONS "cflags=${VCPKG_C_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
@ -208,7 +220,6 @@ function(boost_modular_build)
|
|||||||
list(APPEND _bm_OPTIONS_DBG "cflags=${VCPKG_C_FLAGS_DEBUG}")
|
list(APPEND _bm_OPTIONS_DBG "cflags=${VCPKG_C_FLAGS_DEBUG}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(VCPKG_LINKER_FLAGS)
|
if(VCPKG_LINKER_FLAGS)
|
||||||
list(APPEND _bm_OPTIONS "linkflags=${VCPKG_LINKER_FLAGS}")
|
list(APPEND _bm_OPTIONS "linkflags=${VCPKG_LINKER_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
@ -221,7 +232,6 @@ function(boost_modular_build)
|
|||||||
list(APPEND _bm_OPTIONS_DBG "linkflags=${VCPKG_LINKER_FLAGS_DEBUG}")
|
list(APPEND _bm_OPTIONS_DBG "linkflags=${VCPKG_LINKER_FLAGS_DEBUG}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Add build type specific options
|
# Add build type specific options
|
||||||
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
|
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
|
||||||
list(APPEND _bm_OPTIONS runtime-link=shared)
|
list(APPEND _bm_OPTIONS runtime-link=shared)
|
||||||
|
@ -2,7 +2,8 @@ import toolset ;
|
|||||||
|
|
||||||
if "@VCPKG_PLATFORM_TOOLSET@" != "external"
|
if "@VCPKG_PLATFORM_TOOLSET@" != "external"
|
||||||
{
|
{
|
||||||
using msvc : : cl.exe :
|
using msvc : : cl.exe
|
||||||
|
:
|
||||||
<setup>"@NOTHING_BAT@"
|
<setup>"@NOTHING_BAT@"
|
||||||
@TOOLSET_OPTIONS@
|
@TOOLSET_OPTIONS@
|
||||||
;
|
;
|
||||||
@ -23,8 +24,8 @@ else
|
|||||||
|
|
||||||
if "@PORT@" = "boost-python"
|
if "@PORT@" = "boost-python"
|
||||||
{
|
{
|
||||||
using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ;
|
using python : @VCPKG_PYTHON_VERSION@ : "@VCPKG_PYTHON_EXECUTABLE@" : "@VCPKG_PYTHON_INCLUDE@" : "@VCPKG_PYTHON_LIBS_RELEASE@" ;
|
||||||
using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : <python-debugging>on ;
|
using python : @VCPKG_PYTHON_VERSION@ : "@VCPKG_PYTHON_EXECUTABLE@" : "@VCPKG_PYTHON_INCLUDE@" : "@VCPKG_PYTHON_LIBS_DEBUG@" : <python-debugging>on ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if "@PORT@" = "boost-mpi"
|
if "@PORT@" = "boost-mpi"
|
||||||
@ -37,6 +38,8 @@ if "@PORT@" = "boost-mpi"
|
|||||||
|
|
||||||
project user-config : ;
|
project user-config : ;
|
||||||
|
|
||||||
|
if "@VCPKG_PLATFORM_TOOLSET@" != "external"
|
||||||
|
{
|
||||||
lib advapi32 ;
|
lib advapi32 ;
|
||||||
|
|
||||||
lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" <variant>release : : <library>advapi32 ;
|
lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" <variant>release : : <library>advapi32 ;
|
||||||
@ -47,6 +50,18 @@ lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" <variant>debu
|
|||||||
|
|
||||||
lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/lib/icudt.lib" <variant>release : : ;
|
lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/lib/icudt.lib" <variant>release : : ;
|
||||||
lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" <variant>debug : : ;
|
lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" <variant>debug : : ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/lib/libicuuc.a" <variant>release : : ;
|
||||||
|
lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/libicuuc.a" <variant>debug : : ;
|
||||||
|
|
||||||
|
lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/lib/libicui18n.a" <variant>release : : ;
|
||||||
|
lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/libicui18n.a" <variant>debug : : ;
|
||||||
|
|
||||||
|
lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/lib/libicudata.a" <variant>release : : ;
|
||||||
|
lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/libicudata.a" <variant>debug : : ;
|
||||||
|
}
|
||||||
|
|
||||||
lib iconv : : <file>"@LIBICONV_LIBRARY@" <link>shared <runtime-link>shared <variant>release : : ;
|
lib iconv : : <file>"@LIBICONV_LIBRARY@" <link>shared <runtime-link>shared <variant>release : : ;
|
||||||
lib iconv : : <file>"@LIBICONV_LIBRARY@" <link>shared <runtime-link>shared <variant>debug : : ;
|
lib iconv : : <file>"@LIBICONV_LIBRARY@" <link>shared <runtime-link>shared <variant>debug : : ;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
|
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
|
||||||
Source: boost-python
|
Source: boost-python
|
||||||
Version: 1.72.0
|
Version: 1.72.0-1
|
||||||
Build-Depends: boost-bind, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, python3 (!osx&!linux)
|
Build-Depends: boost-bind, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, python3
|
||||||
Homepage: https://github.com/boostorg/python
|
Homepage: https://github.com/boostorg/python
|
||||||
Description: Boost python module
|
Description: Boost python module
|
||||||
|
@ -10,11 +10,14 @@ vcpkg_from_github(
|
|||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
)
|
)
|
||||||
|
|
||||||
# Find Python. Can't use find_package here, but we already know where everything is
|
# Find Python3 executable
|
||||||
file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python3.*")
|
vcpkg_find_acquire_program(PYTHON3)
|
||||||
set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
|
set(VCPKG_PYTHON_EXECUTABLE "${PYTHON3}")
|
||||||
set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
|
# Find Python3 libraries. Can't use find_package here, but we already know where everything is
|
||||||
string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}")
|
file(GLOB VCPKG_PYTHON_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python3.*")
|
||||||
|
set(VCPKG_PYTHON_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
|
||||||
|
set(VCPKG_PYTHON_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
|
||||||
|
string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON_VERSION "${VCPKG_PYTHON_INCLUDE}")
|
||||||
include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)
|
include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)
|
||||||
boost_modular_build(SOURCE_PATH ${SOURCE_PATH})
|
boost_modular_build(SOURCE_PATH ${SOURCE_PATH})
|
||||||
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
|
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
|
||||||
|
@ -46,9 +46,9 @@ function Generate()
|
|||||||
$controlDeps = ($Depends | sort) -join ", "
|
$controlDeps = ($Depends | sort) -join ", "
|
||||||
|
|
||||||
$versionSuffix = ""
|
$versionSuffix = ""
|
||||||
if ($Name -eq "iostreams")
|
if ($PortName -eq "iostreams" -or $PortName -eq "python")
|
||||||
{
|
{
|
||||||
$versionsuffix = "-1"
|
$versionSuffix = "-1"
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null
|
mkdir "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null
|
||||||
@ -363,7 +363,7 @@ foreach ($library in $libraries)
|
|||||||
|
|
||||||
if ($library -eq "python")
|
if ($library -eq "python")
|
||||||
{
|
{
|
||||||
$deps += @("python3 (!osx&!linux)")
|
$deps += @("python3")
|
||||||
$needsBuild = $true
|
$needsBuild = $true
|
||||||
}
|
}
|
||||||
elseif ($library -eq "iostreams")
|
elseif ($library -eq "iostreams")
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# Find Python. Can't use find_package here, but we already know where everything is
|
# Find Python3 executable
|
||||||
file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python3.*")
|
vcpkg_find_acquire_program(PYTHON3)
|
||||||
set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
|
set(VCPKG_PYTHON_EXECUTABLE "${PYTHON3}")
|
||||||
set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
|
# Find Python3 libraries. Can't use find_package here, but we already know where everything is
|
||||||
string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}")
|
file(GLOB VCPKG_PYTHON_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python3.*")
|
||||||
|
set(VCPKG_PYTHON_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
|
||||||
|
set(VCPKG_PYTHON_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
|
||||||
|
string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON_VERSION "${VCPKG_PYTHON_INCLUDE}")
|
||||||
|
@ -171,8 +171,6 @@ boost-locale:arm-uwp=fail
|
|||||||
boost-locale:x64-uwp=fail
|
boost-locale:x64-uwp=fail
|
||||||
boost-log:arm-uwp=fail
|
boost-log:arm-uwp=fail
|
||||||
boost-log:x64-uwp=fail
|
boost-log:x64-uwp=fail
|
||||||
boost-python:x64-linux=ignore
|
|
||||||
boost-mpi:x64-linux=fail
|
|
||||||
boost-mpi:x64-osx=fail
|
boost-mpi:x64-osx=fail
|
||||||
boost-stacktrace:arm-uwp=fail
|
boost-stacktrace:arm-uwp=fail
|
||||||
boost-stacktrace:x64-uwp=fail
|
boost-stacktrace:x64-uwp=fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user