Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
525ef15
Allows vcpkg to compile cmake ports with all installed costum toolset…
Neumann-A Oct 30, 2018
7ecd8fd
fix regex to work properly.
Neumann-A Nov 1, 2018
2d8234e
even better regex test
Neumann-A Nov 1, 2018
e695f1f
fixed wrong cmake check.
Neumann-A Nov 9, 2018
deaf197
simplified regex.
Neumann-A Nov 9, 2018
c8a9575
if intel toolset ninja cannot be used (missing env variables? Or miss…
Neumann-A Feb 6, 2019
6546f24
Merge remote-tracking branch 'upstream/master' into vcpkg_allow_costu…
Neumann-A Aug 22, 2019
14c403a
fix build errors.
Neumann-A Aug 22, 2019
61d143a
add VS 2019 since cmake has been updated
Neumann-A Aug 22, 2019
88c3208
fix compilation error on linux and macos and clang-format
cbezault Aug 29, 2019
ab42c4e
made platform toolset optional in msbuild
Neumann-A Sep 11, 2019
1e36476
made generator overrideable by VCPKG_DEFAULT_CMAKE_GENERATOR
Neumann-A Sep 11, 2019
b326ea0
Merge remote-tracking branch 'upstream/master' into vcpkg_allow_costu…
Neumann-A Sep 11, 2019
c8d6a4e
Merge branch 'master' into vcpkg_allow_costum_toolsets
Neumann-A Sep 13, 2019
2606116
Merge remote-tracking branch 'upstream/master' into vcpkg_allow_costu…
Neumann-A Nov 16, 2019
9ae92a0
toolchain is loaded before the cmake execution so the comment did not…
Neumann-A Nov 16, 2019
1f539b6
make boost clang-cl buildable
Neumann-A Nov 16, 2019
5324c9a
remove seemingly unnecessary code.
Neumann-A Nov 16, 2019
813a076
fixing bugs using clang-win.
Neumann-A Nov 17, 2019
90e621d
add explicit clang toolchain
Neumann-A Nov 18, 2019
cee24ab
added x64-windows-clang. Need to figure out why vcvars are not loaded…
Neumann-A Nov 18, 2019
cfbdebe
added a way to load a script to setup the enviromnent vcpkg uses.
Neumann-A Nov 19, 2019
aa1f04f
forgot to commit the triplet changes
Neumann-A Nov 19, 2019
f8ff149
fix the arm and x86 issue
Neumann-A Nov 19, 2019
b605c1d
add an escape hatch to force load vcvars
Neumann-A Nov 27, 2019
51bda67
Merge remote-tracking branch 'upstream/master' into vcpkg_allow_costu…
Neumann-A Nov 29, 2019
a49ec6a
force one CI build of zlib
Neumann-A Nov 29, 2019
1e07f95
improve output message
Neumann-A Dec 10, 2019
24f4fb2
Merge remote-tracking branch 'upstream/master' into vcpkg_allow_costu…
Neumann-A Jan 8, 2020
0db23c5
add additional VCPKG_<BUILDTOOL> equivalents like CMAKE_<BUILDTOOL> m…
Neumann-A Jan 8, 2020
b264d12
introduce VCPKG_SKIP_AUTOMATIC_COMPILER_DETECTION to skip the automat…
Neumann-A Jan 8, 2020
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,15 @@ __pycache__/
!triplets/arm64-windows.cmake
!triplets/x64-linux.cmake
!triplets/x64-osx.cmake
!triplets/x64-windows-llvm.cmake
!triplets/x64-windows-intel19.cmake
!triplets/x64-windows-clang.cmake
*.exe
*.zip

/scripts/dummy/compiler_linker_info.txt
/scripts/dummy/build/*

############################################################
# vcpkg - End
############################################################
Expand Down
46 changes: 35 additions & 11 deletions ports/boost-modular-build-helper/boost-modular-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function(boost_modular_build)
endif()

# Todo: this serves too similar a purpose as vcpkg_find_acquire_program()
if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_IS_WINDOWS)
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 Expand Up @@ -34,10 +34,18 @@ function(boost_modular_build)

set(REQUIREMENTS ${_bm_REQUIREMENTS})

if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(VCPKG_TARGET_IS_WINDOWS)
set(BOOST_LIB_PREFIX)
set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib)
set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib)
set(BOOST_LIB_RELEASE_SUFFIX -${VCPKG_PLATFORM_TOOLSET}-mt.lib)
set(BOOST_LIB_DEBUG_SUFFIX -${VCPKG_PLATFORM_TOOLSET}-mt-gd.lib)
if(VCPKG_PLATFORM_TOOLSET MATCHES "llvm")
string(REPLACE "llvm" "clangw10" BOOST_LIB_RELEASE_SUFFIX ${BOOST_LIB_RELEASE_SUFFIX})
string(REPLACE "llvm" "clangw10" BOOST_LIB_DEBUG_SUFFIX ${BOOST_LIB_DEBUG_SUFFIX})
string(REPLACE "-gd" "-d" BOOST_LIB_DEBUG_SUFFIX ${BOOST_LIB_DEBUG_SUFFIX})
else()
string(REPLACE "v14" "vc14" BOOST_LIB_RELEASE_SUFFIX ${BOOST_LIB_RELEASE_SUFFIX})
string(REPLACE "v14" "vc14" BOOST_LIB_DEBUG_SUFFIX ${BOOST_LIB_DEBUG_SUFFIX})
endif()
else()
set(BOOST_LIB_PREFIX lib)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
Expand Down Expand Up @@ -153,7 +161,7 @@ function(boost_modular_build)
"-sBZIP2_INCLUDE=${CURRENT_INSTALLED_DIR}/include"
threading=multi
)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND _bm_OPTIONS threadapi=win32)
else()
list(APPEND _bm_OPTIONS threadapi=pthread)
Expand Down Expand Up @@ -237,7 +245,7 @@ function(boost_modular_build)

file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT)
set(TOOLSET_OPTIONS " <cxxflags>/EHsc <compileflags>-Zm800 <compileflags>-nologo")
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(VCPKG_TARGET_IS_UWP)
if(NOT VCPKG_PLATFORM_TOOLSET MATCHES "v140")
find_path(PATH_TO_CL cl.exe)
find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH)
Expand All @@ -258,16 +266,34 @@ function(boost_modular_build)
set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} <compileflags>-D_WIN32_WINNT=0x0602")
endif()

configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY)
configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY)

if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.")
list(APPEND _bm_OPTIONS toolset=msvc)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "llvm")
if(NOT VCPKG_C_COMPILER OR NOT VCPKG_CXX_COMPILER OR NOT VCPKG_LINKER)
vcpkg_determine_compiler_and_linker()
message(STATUS "Detected VCPKG_CXX_COMPILER=${VCPKG_CXX_COMPILER}")
message(STATUS "Detected VCPKG_LINKER=${VCPKG_LINKER}")
file(TO_CMAKE_PATH "${VCPKG_CXX_COMPILER}" VCPKG_CXX_COMPILER)
file(TO_CMAKE_PATH "${VCPKG_LINKER}" VCPKG_LINKER)
endif()
list(APPEND _bm_OPTIONS toolset=clang-win)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "Intel")
if(NOT VCPKG_C_COMPILER OR NOT VCPKG_CXX_COMPILER OR NOT VCPKG_LINKER)
vcpkg_determine_compiler_and_linker()
message(STATUS "Detected VCPKG_CXX_COMPILER=${VCPKG_CXX_COMPILER}")
message(STATUS "Detected VCPKG_LINKER=${VCPKG_LINKER}")
file(TO_CMAKE_PATH "${VCPKG_CXX_COMPILER}" VCPKG_CXX_COMPILER)
file(TO_CMAKE_PATH "${VCPKG_LINKER}" VCPKG_LINKER)
endif()
list(APPEND _bm_OPTIONS toolset=intel-win)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "external")
list(APPEND _bm_OPTIONS toolset=gcc)
else()
message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'")
endif()

configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY)
configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY)

######################
# Perform build + Package
Expand Down Expand Up @@ -349,8 +375,6 @@ function(boost_modular_build)
get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY)
string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME})
string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs
string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries
string(REPLACE "-vc142-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2019 and VS2015 binaries
string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs
string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs
string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries
Expand Down
11 changes: 11 additions & 0 deletions ports/boost-modular-build-helper/user-config.jam
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ if "@VCPKG_PLATFORM_TOOLSET@" != "external"
<setup>"@NOTHING_BAT@"
@TOOLSET_OPTIONS@
;
if "@VCPKG_PLATFORM_TOOLSET@" = "llvm"
{
using clang-win : : "@VCPKG_CXX_COMPILER@" :
<setup>"@NOTHING_BAT@"
@TOOLSET_OPTIONS@
;
}
#using intel-win : 14.2 : "@VCPKG_CXX_COMPILER@" :
#<setup>"@NOTHING_BAT@"
#@TOOLSET_OPTIONS@
#;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion ports/zlib/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: zlib
Version: 1.2.11-5
Version: 1.2.11-6
Homepage: https://www.zlib.net/
Description: A compression library
1 change: 1 addition & 0 deletions scripts/cmake/vcpkg_build_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function(vcpkg_build_cmake)
set(BUILD_ARGS
"/p:VCPkgLocalAppDataDisabled=true"
"/p:UseIntelMKL=No"
"/p:PlatformToolset=${VCPKG_PLATFORM_TOOLSET}"
)
set(PARALLEL_ARG "/m")
elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake")
Expand Down
17 changes: 12 additions & 5 deletions scripts/cmake/vcpkg_build_msbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ function(vcpkg_build_msbuild)
${ARGN}
)

if(NOT DEFINED _csc_TARGET)
set(_csc_TARGET Rebuild)
endif()

if(NOT DEFINED _csc_RELEASE_CONFIGURATION)
set(_csc_RELEASE_CONFIGURATION Release)
endif()
Expand All @@ -79,26 +83,29 @@ function(vcpkg_build_msbuild)
if(NOT DEFINED _csc_PLATFORM)
set(_csc_PLATFORM ${TRIPLET_SYSTEM_ARCH})
endif()
if(NOT DEFINED _csc_PLATFORM_TOOLSET)
if(NOT DEFINED _csc_PLATFORM_TOOLSET AND DEFINED VCPKG_PLATFORM_TOOLSET)
set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET})
endif()
if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION)
vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION)
endif()
if(NOT DEFINED _csc_TARGET)
set(_csc_TARGET Rebuild)
endif()


list(APPEND _csc_OPTIONS
/t:${_csc_TARGET}
/p:Platform=${_csc_PLATFORM}
/p:PlatformToolset=${_csc_PLATFORM_TOOLSET}
/p:VCPkgLocalAppDataDisabled=true
/p:UseIntelMKL=No
/p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION}
/m
)

if(DEFINED _csc_PLATFORM_TOOLSET)
list(APPEND _csc_OPTIONS
/p:PlatformToolset=${_csc_PLATFORM_TOOLSET}
)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions
# TODO: Add a way for the user to override this if they want to opt-in to incompatibility
Expand Down
3 changes: 3 additions & 0 deletions scripts/cmake/vcpkg_common_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ include(vcpkg_build_nmake)
include(vcpkg_install_cmake)
include(vcpkg_install_meson)
include(vcpkg_install_msbuild)
include(vcpkg_determine_cmake_generator)
include(vcpkg_install_make)
include(vcpkg_install_nmake)
include(vcpkg_install_qmake)
Expand All @@ -40,5 +41,7 @@ include(vcpkg_get_windows_sdk)
include(vcpkg_replace_string)
include(vcpkg_from_git)
include(vcpkg_test_cmake)
include(vcpkg_determine_compiler_and_linker)
include(vcpkg_prettify_command)
include(vcpkg_buildpath_length_warning)
include(vcpkg_load_environment_from_batch)
Loading