Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5e20ab2
[scripts/boost] fix issue #20417
yurybura Sep 29, 2021
48e32a5
add versions
yurybura Sep 29, 2021
7cdf9b2
Merge branch 'master' of https://github.com/microsoft/vcpkg into boos…
yurybura Sep 29, 2021
fc51d8e
[scripts/boost] update port version after #20421
yurybura Sep 29, 2021
fdd2852
[boost-odeint] move boost-mpi dependency to the feature
yurybura Sep 30, 2021
0841f43
add version
yurybura Sep 30, 2021
7ff3352
[boost-modular-build-helper] rework user-config generation
yurybura Oct 2, 2021
789f899
[boost-python] move python3 from explicit dependency to default feature
yurybura Oct 2, 2021
9434a46
[boost-modular-build-helper] update version
yurybura Oct 2, 2021
dce8f35
add verions
yurybura Oct 2, 2021
f599962
[boost-modular-build-helper] fix empty flags
yurybura Oct 4, 2021
bf2efcd
update version
yurybura Oct 4, 2021
5f42a9d
Merge branch 'master' of https://github.com/microsoft/vcpkg into boos…
yurybura Oct 6, 2021
459000e
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Oct 6, 2021
76dcc5a
Fix compilation on Emscripten / WebAssembly (#20551)
tobbi Oct 6, 2021
bd9bf42
[opencv4,opencv3] Control exported protobuf dependency (#20550)
dg0yt Oct 6, 2021
0839cb2
[OpenMVS] restore deprecated cmake scripts for configure, build & fix…
cenit Oct 7, 2021
244402c
[libffi] Don't replace string in file that doesn't exist. (#20554)
larshg Oct 7, 2021
3944561
[json-dto] Update to 0.2.14 (#20570)
eao197 Oct 7, 2021
d2b28a4
[sail] Update to 0.9.0-pre17 (#20562)
Oct 7, 2021
4e2fc1a
[freexl] Update to 1.0.6 (#20520)
dg0yt Oct 7, 2021
1e01203
[dartsim] Update to 6.11.0 (#20566)
Ace314159 Oct 7, 2021
b2b85c4
[scripts/boost] update Boost version in boost-modular-build.cmake to …
yurybura Oct 7, 2021
b40a028
update version
yurybura Oct 7, 2021
799b851
Merge branch 'master' of https://github.com/microsoft/vcpkg into boos…
yurybura Oct 7, 2021
2fe0f0b
[boost-modular-build-helper] fix USER_CONFIG_EXTRA_LINES variable nam…
yurybura Oct 9, 2021
43f23f9
update version
yurybura Oct 9, 2021
9d02f35
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Oct 11, 2021
d682882
Resolve differences from rerunning generate-ports.ps1.
BillyONeal Oct 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ports/boost-config/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ vcpkg_from_github(
REF boost-1.77.0
SHA512 c6df16825b7bb27412667e00b6b6cdecbf56ee0707aa1df3505637c7de5c39c87335fabd7cd4361b29625d71c7664e6af865fc271ad0b3e70cc8872825f6155e
HEAD_REF master
PATCHES
fix-emscripten-compilation.patch
PATCHES fix-emscripten-compilation.patch
)

include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
Expand Down
2 changes: 1 addition & 1 deletion ports/boost-config/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "boost-config",
"version": "1.77.0",
"port-version": 1,
"port-version": 2,
"description": "Boost config module",
"homepage": "https://github.com/boostorg/config",
"dependencies": [
Expand Down
102 changes: 79 additions & 23 deletions ports/boost-iostreams/b2-options.cmake
Original file line number Diff line number Diff line change
@@ -1,30 +1,86 @@
list(APPEND B2_OPTIONS
-sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
-sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
-sLZMA_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
-sZSTD_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)

if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(lib_suffix lib)
set(lib_path_suffix lib)
else()
set(lib_path_suffix debug/lib)
endif()

if("bzip2" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
-sBZIP2_NAME=bz2d
)
endif()
list(APPEND B2_OPTIONS
-sBZIP2_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
list(APPEND B2_OPTIONS
-sNO_BZIP2=1
)
endif()

if("lzma" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sLZMA_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
-sLZMA_NAME=lzmad
)
endif()
list(APPEND B2_OPTIONS
-sLZMA_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
set(lib_suffix debug/lib)
if(WIN32)
set(ZLIB_NAME zlibd)
else()
set(ZLIB_NAME z)
list(APPEND B2_OPTIONS
-sNO_LZMA=1
)
endif()

if("zlib" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(WIN32)
set(ZLIB_NAME zlibd)
else()
set(ZLIB_NAME z)
endif()
list(APPEND B2_OPTIONS
-sZLIB_NAME=${ZLIB_NAME}
)
endif()
list(APPEND B2_OPTIONS
-sZLIB_NAME=${ZLIB_NAME}
-sBZIP2_NAME=bz2d
-sLZMA_NAME=lzmad
-sZSTD_BINARY=zstdd
-sZLIB_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
list(APPEND B2_OPTIONS
-sNO_ZLIB=1
)
endif()

list(APPEND B2_OPTIONS
-sZLIB_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
-sBZIP2_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
-sLZMA_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
-sZSTD_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_suffix}"
)
if("zstd" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sZSTD_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
-sZSTD_NAME=zstdd
)
endif()
list(APPEND B2_OPTIONS
-sZSTD_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
else()
list(APPEND B2_OPTIONS
-sNO_ZSTD=1
)
endif()
37 changes: 33 additions & 4 deletions ports/boost-iostreams/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "boost-iostreams",
"version": "1.77.0",
"port-version": 1,
"description": "Boost iostreams module",
"homepage": "https://github.com/boostorg/iostreams",
"supports": "!uwp",
Expand Down Expand Up @@ -32,13 +33,41 @@
"boost-type-traits",
"boost-utility",
"boost-vcpkg-helpers",
"bzip2",
"liblzma",
{
"name": "vcpkg-cmake",
"host": true
},
}
],
"default-features": [
"bzip2",
"lzma",
"zlib",
"zstd"
]
],
"features": {
"bzip2": {
"description": "Support bzip2 filters",
"dependencies": [
"bzip2"
]
},
"lzma": {
"description": "Support LZMA/xz filters",
"dependencies": [
"liblzma"
]
},
"zlib": {
"description": "Support zlib filters",
"dependencies": [
"zlib"
]
},
"zstd": {
"description": "Support zstd filters",
"dependencies": [
"zstd"
]
}
}
}
99 changes: 64 additions & 35 deletions ports/boost-modular-build-helper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
cmake_minimum_required(VERSION 3.9)
project(boost CXX)

set(B2_OPTIONS)
# The following variables are used in user-config.jam file
set(USER_CONFIG_TOOLSET)
set(USER_CONFIG_TOOLSET_VERSION)
set(USER_CONFIG_TOOLSET_INVOCATION_COMMAND)
set(USER_CONFIG_TOOLSET_OPTIONS)
set(USER_CONFIG_EXTRA_LINES)

if(MSVC)
if(MSVC_VERSION LESS 1900)
math(EXPR BOOST_MSVC_VERSION "${MSVC_VERSION} / 10 - 60")
else()
math(EXPR BOOST_MSVC_VERSION "${MSVC_VERSION} / 10 - 50")
endif()
else()
set(VCPKG_PLATFORM_TOOLSET external)
endif()
set(B2_OPTIONS)

#### Handle ICU
if(WIN32)
Expand All @@ -24,10 +21,8 @@ endif()
# Add build type specific options
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
list(APPEND B2_OPTIONS runtime-link=shared)
set(LIB_RUNTIME_LINK "shared")
else()
list(APPEND B2_OPTIONS runtime-link=static)
set(LIB_RUNTIME_LINK "static")
endif()

if(BUILD_SHARED_LIBS)
Expand Down Expand Up @@ -56,31 +51,28 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND WIN32)
list(APPEND B2_OPTIONS "asmflags=/safeseh")
endif()

file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/nothing.bat" NOTHING_BAT)

if(MSVC)
set(B2_TOOLSET msvc)
set(USER_CONFIG_TOOLSET msvc)
if(MSVC_VERSION LESS 1900)
math(EXPR USER_CONFIG_TOOLSET_VERSION "${MSVC_VERSION} / 10 - 60")
else()
math(EXPR USER_CONFIG_TOOLSET_VERSION "${MSVC_VERSION} / 10 - 50")
endif()
list(APPEND B2_OPTIONS target-os=windows)
elseif(APPLE)
set(B2_TOOLSET clang)
set(USER_CONFIG_TOOLSET clang)
list(APPEND B2_OPTIONS target-os=darwin)
elseif(WIN32)
set(B2_TOOLSET gcc)
set(USER_CONFIG_TOOLSET gcc)
list(APPEND B2_OPTIONS target-os=windows)
elseif(ANDROID)
set(B2_TOOLSET gcc)
set(USER_CONFIG_TOOLSET gcc)
list(APPEND B2_OPTIONS target-os=android)
else()
set(B2_TOOLSET gcc)
set(USER_CONFIG_TOOLSET gcc)
list(APPEND B2_OPTIONS target-os=linux)
endif()

if(WIN32)
list(APPEND B2_OPTIONS threadapi=win32)
else()
list(APPEND B2_OPTIONS threadapi=pthread)
endif()

# Properly handle compiler and linker flags passed by VCPKG
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
Expand Down Expand Up @@ -122,9 +114,12 @@ if(APPLE)
endforeach()
endif()

string(REGEX REPLACE "[ \t\r\n]+" " " CXXFLAGS "${CXXFLAGS}")
string(STRIP "${CXXFLAGS}" CXXFLAGS)
string(STRIP "${CFLAGS}" CFLAGS)
string(STRIP "${LDFLAGS}" LDFLAGS)
string(REGEX REPLACE "[ \t\r\n]+" " " CFLAGS "${CFLAGS}")
string(STRIP "${CFLAGS}" CFLAGS)
string(REGEX REPLACE "[ \t\r\n]+" " " LDFLAGS "${LDFLAGS}")
string(STRIP "${LDFLAGS}" LDFLAGS)

if(NOT CXXFLAGS STREQUAL "")
string(REPLACE " " " <cxxflags>" CXXFLAGS "<cxxflags>${CXXFLAGS}")
Expand Down Expand Up @@ -187,6 +182,39 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND B2_OPTIONS linkflags=WindowsApp.lib)
endif()

set(USER_CONFIG_TOOLSET_INVOCATION_COMMAND "\"${CMAKE_CXX_COMPILER}\"")

if(USER_CONFIG_TOOLSET STREQUAL "msvc")
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/nothing.bat" NOTHING_BAT)
string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <setup>\"${NOTHING_BAT}\"\n"
" ${CXXFLAGS}\n"
" ${CFLAGS}\n"
" ${LDFLAGS}\n"
)
else()
string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <ranlib>\"${CMAKE_RANLIB}\"\n"
" <archiver>\"${CMAKE_AR}\"\n"
" ${CXXFLAGS}\n"
" ${CFLAGS}\n"
" ${LDFLAGS}\n"
)
endif()

if(WIN32 AND NOT USER_CONFIG_TOOLSET STREQUAL "msvc")
# MINGW here causes b2 to not run cygpath
string(APPEND USER_CONFIG_TOOLSET_OPTIONS
" <flavor>mingw\n"
)
endif()

if(WIN32)
list(APPEND B2_OPTIONS threadapi=win32)
else()
list(APPEND B2_OPTIONS threadapi=pthread)
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Release")
list(APPEND B2_OPTIONS variant=release)
else()
Expand All @@ -197,23 +225,23 @@ if(NOT WIN32)
list(APPEND B2_OPTIONS "--layout=system")
endif()

include(ProcessorCount)
ProcessorCount(NUMBER_OF_PROCESSORS)
if(NOT NUMBER_OF_PROCESSORS)
set(NUMBER_OF_PROCESSORS 1)
endif()

# Include port specific CMake fragment
if(DEFINED BOOST_CMAKE_FRAGMENT)
message(STATUS "Including ${BOOST_CMAKE_FRAGMENT}")
include(${BOOST_CMAKE_FRAGMENT})
endif()

configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)

include(ProcessorCount)
ProcessorCount(NUMBER_OF_PROCESSORS)
if(NOT NUMBER_OF_PROCESSORS)
set(NUMBER_OF_PROCESSORS 1)
endif()
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam.in ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)

add_custom_target(boost ALL
COMMAND "${B2_EXE}"
toolset=${B2_TOOLSET}
toolset=${USER_CONFIG_TOOLSET}
--user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.jam
--stagedir=${CMAKE_CURRENT_BINARY_DIR}/stage
--build-dir=${CMAKE_CURRENT_BINARY_DIR}
Expand All @@ -235,6 +263,7 @@ add_custom_target(boost ALL
--hash
-q
debug-symbols=on
# Enable debugging level 2.
-d +2

threading=multi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
constant BOOST_VERSION : 1.77.0 ;
constant BOOST_VERSION_ABI_TAG : 1_77 ;
constant BOOST_VERSION : @BOOST_VERSION@ ;
constant BOOST_VERSION_ABI_TAG : @BOOST_VERSION_ABI_TAG@ ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;

import boostcpp ;
Expand Down
Loading