Skip to content

Commit

Permalink
[boost] MinGW build fixes (#11427)
Browse files Browse the repository at this point in the history
  • Loading branch information
koprok authored Jun 5, 2020
1 parent b800df0 commit cb8a9fe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ports/boost-build/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: boost-build
Version: 1.73.0
Version: 1.73.0-1
Homepage: https://github.com/boostorg/build
Description: Boost.Build
9 changes: 7 additions & 2 deletions ports/boost-build/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
return()
elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW")
return()
endif()

Expand Down Expand Up @@ -52,8 +52,13 @@ file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_co

message(STATUS "Bootstrapping...")
if(CMAKE_HOST_WIN32)
if(VCPKG_TARGET_IS_MINGW)
set(TOOLSET mingw)
else()
set(TOOLSET msvc)
endif()
vcpkg_execute_required_process(
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET}
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
LOGNAME bootstrap-${TARGET_TRIPLET}
)
Expand Down
2 changes: 1 addition & 1 deletion ports/boost-modular-build-helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if(NOT LDLAGS STREQUAL "")
endif()

#set(CXXFLAGS "${CXXFLAGS} <compileflags>-Wno-error=unused-command-line-argument")
if(CMAKE_CXX_COMPILER_TARGET)
if(CMAKE_CXX_COMPILER_TARGET AND CMAKE_CXX_COMPILE_OPTIONS_TARGET)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CXXFLAGS "${CXXFLAGS} <compileflags>${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}")
else()
Expand Down
2 changes: 1 addition & 1 deletion ports/boost-modular-build-helper/CONTROL
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Source: boost-modular-build-helper
Version: 1.73.0
Version: 1.73.0-1
2 changes: 1 addition & 1 deletion ports/boost-modular-build-helper/boost-modular-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function(boost_modular_build)
# Todo: this serves too similar a purpose as vcpkg_find_acquire_program()
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x64-linux/tools/boost-build")
elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW")
get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE)
elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE)
Expand Down

0 comments on commit cb8a9fe

Please sign in to comment.