diff options
99 files changed, 470 insertions, 313 deletions
diff --git a/docs/users/integration.md b/docs/users/integration.md index e9a9c42cd..e9d8940aa 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -22,6 +22,7 @@ This will implicitly add Include Directories, Link Directories, and Link Librari For the vast majority of libraries, this is all you need to do -- just File -> New Project and write code! However, some libraries perform conflicting behaviors such as redefining `main()`. Since you need to choose per-project which of these conflicting options you want, you will need to add those libraries to your linker inputs manually. Here are some examples, though this is not an exhaustive list: + - Gtest provides `gtest`, `gmock`, `gtest_main`, and `gmock_main` - SDL2 provides `SDL2main` - SFML provides `sfml-main` @@ -81,6 +82,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console #### Manual compiler settings Libraries are installed into the `installed\` subfolder, partitioned by architecture (e.g. x86-windows): + * The header files are installed to `installed\x86-windows\include` * Release `.lib` files are installed to `installed\x86-windows\lib` or `installed\x86-windows\lib\manual-link` * Release `.dll` files are installed to `installed\x86-windows\bin` @@ -112,6 +114,7 @@ Please also see our [blog post](https://blogs.msdn.microsoft.com/vcblog/2017/05/ <a name="triplet-selection"></a> ### Triplet selection Every integration mechanism besides manually adding the folders will deduce a [triplet][] for your project as one of: + - x86-windows - x64-windows - x86-uwp diff --git a/ports/cmocka/CONTROL b/ports/cmocka/CONTROL deleted file mode 100644 index 090b8ca79..000000000 --- a/ports/cmocka/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cmocka
-Version: 1.1.5
-Port-Version: 3
-Description: An elegant unit testing framework for C with support for mock objects
diff --git a/ports/cmocka/fix-uwp.patch b/ports/cmocka/fix-uwp.patch deleted file mode 100644 index cb3828b1c..000000000 --- a/ports/cmocka/fix-uwp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/cmocka.c b/src/cmocka.c -index 6bfc831..4c1c04b 100644 ---- a/src/cmocka.c -+++ b/src/cmocka.c -@@ -3356,7 +3356,7 @@ int _run_tests(const UnitTest * const tests, const size_t number_of_tests) { - int _run_group_tests(const UnitTest * const tests, const size_t number_of_tests) - { - UnitTestFunction setup = NULL; -- const char *setup_name; -+ const char *setup_name = NULL; - size_t num_setups = 0; - UnitTestFunction teardown = NULL; - const char *teardown_name = NULL; diff --git a/ports/cmocka/portfile.cmake b/ports/cmocka/portfile.cmake index a448d3a70..220868ebb 100644 --- a/ports/cmocka/portfile.cmake +++ b/ports/cmocka/portfile.cmake @@ -1,28 +1,20 @@ -include(vcpkg_common_functions)
-
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO cmocka/cmocka
- REF cmocka-1.1.5
- SHA512 4e305e500f448676be5503972c49089c51f38b47d8129add2205608ed73f9de8b911aee83c00da4ef52c0179a5b5ba0e3386f3bca839f18e7ab21787184d9990
+ REF 672c5cee79eb412025c3dd8b034e611c1f119055
+ SHA512 e02ffe780698ce3930aceb1b927f7d48c932c6bb251a32b1f4ab44ecb4ff6bfe5c2a6b9e2dfede49cd4cc1d68a8bb903ef1d26c28536abf3581a9d803287aa0a
HEAD_REF master
- PATCHES
- shared-lib.patch
- static-lib.patch
- fix-uwp.patch
)
-string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIB)
-
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
+ -DWITH_CMOCKERY_SUPPORT=ON
-DUNIT_TESTING=OFF
-DWITH_EXAMPLES=OFF
- -DBUILD_STATIC_LIB=${BUILD_STATIC_LIB}
- -DWITH_STATIC_LIB=${BUILD_STATIC_LIB}
+ -DPICKY_DEVELOPER=OFF
)
vcpkg_install_cmake()
@@ -31,18 +23,6 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
-file(COPY
- ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
- DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
-)
-
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-# Handle copyright
-configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
-
-# Install usage
-configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
-
-# CMake integration test
-#vcpkg_test_cmake(PACKAGE_NAME ${PORT})
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/cmocka/shared-lib.patch b/ports/cmocka/shared-lib.patch deleted file mode 100644 index 8c2f76277..000000000 --- a/ports/cmocka/shared-lib.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5684685..8555169 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -30,7 +30,7 @@ if (WIN32) - cmocka.def - ) - endif (WIN32) -- -+if (BUILD_SHARED_LIBS) - add_library(${CMOCKA_SHARED_LIBRARY} SHARED ${cmocka_SRCS}) - - target_include_directories(${CMOCKA_SHARED_LIBRARY} -@@ -82,7 +82,7 @@ install(TARGETS - ${CMAKE_INSTALL_BINDIR} - COMPONENT - ${PROJECT_NAME}) -- -+endif (BUILD_SHARED_LIBS) - if (BUILD_STATIC_LIB) - add_library(${CMOCKA_STATIC_LIBRARY} STATIC ${cmocka_SRCS}) - diff --git a/ports/cmocka/static-lib.patch b/ports/cmocka/static-lib.patch deleted file mode 100644 index f879fe25b..000000000 --- a/ports/cmocka/static-lib.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 00e568e..6e3489a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -77,9 +77,17 @@ install( - - # cmake config files - if (WIN32) -+ if (BUILD_SHARED_LIBS) - set(CMOCKA_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}) -+ else() -+ set(CMOCKA_LIBRARY_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}${CMOCKA_STATIC_LIBRARY}${CMAKE_IMPORT_LIBRARY_SUFFIX}) -+ endif() - else() -+ if (BUILD_SHARED_LIBS) - set(CMOCKA_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) -+ else() -+ set(CMOCKA_LIBRARY_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}${CMOCKA_STATIC_LIBRARY}${CMAKE_STATIC_LIBRARY_SUFFIX}) -+ endif() - endif() - - set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE INTERNAL "") diff --git a/ports/cmocka/usage b/ports/cmocka/usage deleted file mode 100644 index 59f2a5da8..000000000 --- a/ports/cmocka/usage +++ /dev/null @@ -1,5 +0,0 @@ -The package @PORT@:@TARGET_TRIPLET@ provides CMake targets:
-
- find_package(@PORT@ CONFIG REQUIRED)
- target_include_directories(main PRIVATE ${CMOCKA_INCLUDE_DIR})
- target_link_libraries(main PRIVATE ${CMOCKA_LIBRARIES})
diff --git a/ports/cmocka/vcpkg-cmake-wrapper.cmake b/ports/cmocka/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index 49b486ff8..000000000 --- a/ports/cmocka/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,10 +0,0 @@ -_find_package(${ARGS})
-
-get_filename_component(_cmocka_lib_name ${CMOCKA_LIBRARY} NAME)
-
-set(CMOCKA_LIBRARY
- debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/${_cmocka_lib_name}
- optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/${_cmocka_lib_name}
-)
-
-set(CMOCKA_LIBRARIES ${CMOCKA_LIBRARY})
diff --git a/ports/cmocka/vcpkg.json b/ports/cmocka/vcpkg.json new file mode 100644 index 000000000..d7bcbcf49 --- /dev/null +++ b/ports/cmocka/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cmocka", + "version-string": "2020-08-01", + "description": "An elegant unit testing framework for C with support for mock objects", + "homepage": "https://cmocka.org/", + "license": "Apache-2.0" +} diff --git a/ports/fluidsynth/CONTROL b/ports/fluidsynth/CONTROL index f6fc69055..470dc2c0b 100644 --- a/ports/fluidsynth/CONTROL +++ b/ports/fluidsynth/CONTROL @@ -1,5 +1,5 @@ Source: fluidsynth -Version: 2.1.0 +Version: 2.1.4 Homepage: https://github.com/FluidSynth/fluidsynth Description: FluidSynth reads and handles MIDI events from the MIDI input device. It is the software analogue of a MIDI synthesizer. FluidSynth can also play midifiles using a Soundfont. Build-Depends: glib
\ No newline at end of file diff --git a/ports/fluidsynth/force-x86-gentables.patch b/ports/fluidsynth/force-x86-gentables.patch index d477ebd36..7f909ec51 100644 --- a/ports/fluidsynth/force-x86-gentables.patch +++ b/ports/fluidsynth/force-x86-gentables.patch @@ -1,34 +1,38 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index f731632..226f408 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -368,10 +368,23 @@ endif ( MACOSX_FRAMEWORK ) - # ******* Auto Generated Lookup Tables ****** - - include(ExternalProject) --ExternalProject_Add(gentables -- DOWNLOAD_COMMAND "" -- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables -- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables -- INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" --) -+if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) -+ ExternalProject_Add(gentables -+ DOWNLOAD_COMMAND "" -+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables -+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables -+ CONFIGURE_COMMAND -+ "${CMAKE_COMMAND}" "${CMAKE_CURRENT_SOURCE_DIR}/gentables" -G "${CMAKE_GENERATOR}" -A Win32 -B "${CMAKE_CURRENT_BINARY_DIR}/gentables" -+ BUILD_COMMAND -+ "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/gentables" -+ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" -+ ) -+else() -+ ExternalProject_Add(gentables -+ DOWNLOAD_COMMAND "" -+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables -+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables -+ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" -+ ) -+endif() - add_dependencies(libfluidsynth-OBJ gentables) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 356bb73..b4c43d7 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -410,14 +410,23 @@ set (GENTAB_BDIR ${CMAKE_CURRENT_BINARY_DIR}/gentables)
+ # To fix cross-compiling fluidsynth from Win32 to ARM (using vcpkg), we need to pass the current generator
+ # on to the external project, otherwise (for some unknown reason) the target compiler will be used rather
+ # than the host compiler.
+-ExternalProject_Add(gentables
+- DOWNLOAD_COMMAND ""
+- SOURCE_DIR ${GENTAB_SDIR}
+- BINARY_DIR ${GENTAB_BDIR}
+- CONFIGURE_COMMAND
+- "${CMAKE_COMMAND}" -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE} -G "${CMAKE_GENERATOR}" -B "${GENTAB_BDIR}" "${GENTAB_SDIR}"
+- BUILD_COMMAND
+- "${CMAKE_COMMAND}" --build "${GENTAB_BDIR}"
+- INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${CMAKE_BINARY_DIR}/"
+-)
++if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
++ ExternalProject_Add(gentables
++ DOWNLOAD_COMMAND ""
++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables
++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables
++ CONFIGURE_COMMAND
++ "${CMAKE_COMMAND}" "${CMAKE_CURRENT_SOURCE_DIR}/gentables" -G "${CMAKE_GENERATOR}" -A Win32 -B "${CMAKE_CURRENT_BINARY_DIR}/gentables"
++ BUILD_COMMAND
++ "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/gentables"
++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/"
++ )
++else()
++ ExternalProject_Add(gentables
++ DOWNLOAD_COMMAND ""
++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables
++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables
++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/"
++ )
++endif()
+ add_dependencies(libfluidsynth-OBJ gentables)
diff --git a/ports/fluidsynth/portfile.cmake b/ports/fluidsynth/portfile.cmake index 0bc33fd72..fed30db03 100644 --- a/ports/fluidsynth/portfile.cmake +++ b/ports/fluidsynth/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO FluidSynth/fluidsynth - REF 37c9ae2bf431a764032f023b3b2c0c0b86b7c272 #v2.1.0 - SHA512 1eea26b7d71fd09e748df0989f7df42ab57a74d8d853a835da734120ee1198c0b8d73a39b8640aef8ef0c1788c9a329671de899882601da55ec20ab6ca3ff778 + REF 2393aef3bd0b4e78084cfe16735d402bc1497edd #v2.1.4 + SHA512 181914f883982d931dfa4d8c0d0391fb91fbf3448e1eb1ea1541c938d874d7611066e7e289859d83b610a85ba089463e0a93f77db5a6253349f6b328a7373dc6 HEAD_REF master PATCHES force-x86-gentables.patch @@ -16,13 +16,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Copy fluidsynth.exe to tools dir -file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluidsynth.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/fluidsynth) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fluidsynth) +vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN) # Remove unnecessary files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fluidsynth.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fluidsynth.exe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 9d3934072..a18713fe4 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,4 +1,5 @@ Source: gtest Version: 1.10.0 +Port-Version: 1 Homepage: https://github.com/google/googletest Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 585f380c4..f0606eaa3 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -26,7 +26,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GTest) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GTest TARGET_PATH share/GTest) file( INSTALL diff --git a/ports/infoware/CONTROL b/ports/infoware/CONTROL index c0bec34ef..d65130342 100644 --- a/ports/infoware/CONTROL +++ b/ports/infoware/CONTROL @@ -1,6 +1,6 @@ Source: infoware
Homepage: https://github.com/ThePhD/infoware
-Version: 0.5.4
+Version: 0.5.5
Description: C++ Library for pulling system and hardware information, without hitting the command line.
# Note that independent usage and testing may work, but it seems to fail in CI environments for potential cross-compilation,
# and is thusly noted here to note break how vcpkg builds things!
diff --git a/ports/infoware/portfile.cmake b/ports/infoware/portfile.cmake index 7fbfe1fd8..bff5976d7 100644 --- a/ports/infoware/portfile.cmake +++ b/ports/infoware/portfile.cmake @@ -3,8 +3,8 @@ vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ThePhD/infoware
- REF v0.5.4
- SHA512 16c7c39ca59128fe6489ec70b0d840d48cc44e57fe0d7d2dc864443cf8be288ceaf32e28246f6ac2dda495662d7a38d1e6ddf49172a73aac55445ecea95a29a8
+ REF v0.5.5
+ SHA512 06aea2c3a51df30cfc220eafb603620c3cf5f00b0d5935486ac46c6c2333972910af2b53fc1e2187b5fce0aa9650323a0dff526d768ff54888bfc549a8173903
HEAD_REF master
)
diff --git a/ports/intel-mkl/CONTROL b/ports/intel-mkl/CONTROL index f0b7f12a8..0286f25de 100644 --- a/ports/intel-mkl/CONTROL +++ b/ports/intel-mkl/CONTROL @@ -1,3 +1,3 @@ Source: intel-mkl -Version: 2018.0.1 +Version: 2020.0.0 Description: Intel® Math Kernel Library (Intel® MKL) accelerates math processing routines, increases application performance, and reduces development time on Intel® processors.
\ No newline at end of file diff --git a/ports/intel-mkl/portfile.cmake b/ports/intel-mkl/portfile.cmake index be54f0ec4..4e656948e 100644 --- a/ports/intel-mkl/portfile.cmake +++ b/ports/intel-mkl/portfile.cmake @@ -4,7 +4,7 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -set(MKL_REQUIRED_VERSION "20180000") +set(MKL_REQUIRED_VERSION "20200000") set(ProgramFilesx86 "ProgramFiles(x86)") set(INTEL_ROOT $ENV{${ProgramFilesx86}}/IntelSWTools/compilers_and_libraries/windows) diff --git a/ports/libmediainfo/CONTROL b/ports/libmediainfo/CONTROL index e877ba233..1ca85c787 100644 --- a/ports/libmediainfo/CONTROL +++ b/ports/libmediainfo/CONTROL @@ -1,5 +1,5 @@ Source: libmediainfo -Version: 20.03 +Version: 20.08 Homepage: https://github.com/MediaArea/MediaInfoLib Description: Get most relevant technical and tag data from video and audio files Build-Depends: libzen, curl, zlib diff --git a/ports/libmediainfo/portfile.cmake b/ports/libmediainfo/portfile.cmake index d6b002797..955bb9c77 100644 --- a/ports/libmediainfo/portfile.cmake +++ b/ports/libmediainfo/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO MediaArea/MediaInfoLib - REF v20.03 - SHA512 c5d3444c8694ca68ee08f97f387cef3aefd9fbb23623b643a6daf9ed7d247521f1291a8a13c9088b31be9a9d594ca772d3125d6eb3d3770bee1f7c50b3b23c07 + REF v20.08 + SHA512 271742af2b2407c04a0555d851fc9ef5590326f4101413ef2092d0a0b99e8367d01bb6442464d171b582b00bb2f45edb9bc9867e74a8d14daba99e2416bc08f3 HEAD_REF master PATCHES vcpkg_support_in_cmakelists.patch ) @@ -10,7 +10,9 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Project/CMake PREFER_NINJA - OPTIONS -DBUILD_ZENLIB=0 -DBUILD_ZLIB=0 + OPTIONS + -DBUILD_ZENLIB=0 + -DBUILD_ZLIB=0 ) vcpkg_install_cmake() diff --git a/ports/libmediainfo/vcpkg_support_in_cmakelists.patch b/ports/libmediainfo/vcpkg_support_in_cmakelists.patch index d0f988d7b..d3c22ab02 100644 --- a/ports/libmediainfo/vcpkg_support_in_cmakelists.patch +++ b/ports/libmediainfo/vcpkg_support_in_cmakelists.patch @@ -2,16 +2,6 @@ diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt index 47c4ed13..f13ff531 100644 --- a/Project/CMake/CMakeLists.txt +++ b/Project/CMake/CMakeLists.txt -@@ -1,7 +1,7 @@ --project(MediaInfoLib) -- - cmake_minimum_required(VERSION 2.8.11) - -+project(MediaInfoLib) -+ - set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") - - set(MediaInfoLib_MAJOR_VERSION 20) @@ -88,7 +88,7 @@ endif() find_package(TinyXML) diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL deleted file mode 100644 index 13273ff70..000000000 --- a/ports/libvorbis/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: libvorbis -Version: 1.3.6-4d963fe -Port-Version: 2 -Homepage: https://github.com/xiph/vorbis -Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format. -Build-Depends: libogg diff --git a/ports/libvorbis/portfile.cmake b/ports/libvorbis/portfile.cmake index fe641f8e8..d6d29cf9f 100644 --- a/ports/libvorbis/portfile.cmake +++ b/ports/libvorbis/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/vorbis - REF 4d963fe0b4ba3bdb45233de4b959ce2f36963f7a - SHA512 c739cebf1a7ff4739447e899d3373e2fa7a0f3a87affd59c9c0c65d69e7611ceadcdcd1592c279e65123d7d2e1c9f8f8e7dee93def8753bcdd6d115677232d83 + REF v1.3.7 + SHA512 bfb6f5dbfd49ed38b2b08b3667c06d02e68f649068a050f21a3cc7e1e56b27afd546aaa3199c4f6448f03f6e66a82f9a9dc2241c826d3d1d4acbd38339b9e9fb HEAD_REF master PATCHES 0001-Dont-export-vorbisenc-functions.patch diff --git a/ports/libvorbis/vcpkg.json b/ports/libvorbis/vcpkg.json new file mode 100644 index 000000000..9f467363d --- /dev/null +++ b/ports/libvorbis/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libvorbis", + "version-string": "1.3.7", + "description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format", + "homepage": "https://github.com/xiph/vorbis", + "license": "BSD-3-Clause", + "dependencies": [ + "libogg" + ] +} diff --git a/ports/numcpp/portfile.cmake b/ports/numcpp/portfile.cmake new file mode 100644 index 000000000..d605b19da --- /dev/null +++ b/ports/numcpp/portfile.cmake @@ -0,0 +1,24 @@ +# header-only library
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO dpilger26/NumCpp
+ REF fc68d897f8c2ae4f5b14baff3eefda897351abbd # 2.1.0
+ SHA512 ce407d9782d304658853cd66ba5901a4dc84d8cf74d45b2dd466ca6328f6bf60b39906efd5373624df6b46c4253f861208b15254d0e156fdb09f32ca731ad2bc
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DNUMCPP_TEST=OFF
+ -DNUMCPP_EXAMPLES=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/NumCpp/cmake TARGET_PATH share/NumCpp)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/numcpp/vcpkg.json b/ports/numcpp/vcpkg.json new file mode 100644 index 000000000..db31f6a3b --- /dev/null +++ b/ports/numcpp/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "numcpp", + "version-string": "2.1.0", + "description": "C++ implementation of the Python Numpy library", + "homepage": "https://dpilger26.github.io/NumCpp", + "license": "MIT", + "dependencies": [ + "boost-algorithm", + "boost-endian", + "boost-integer", + "boost-math", + "boost-predef", + "boost-random", + "boost-type-traits" + ], + "features": [ + { + "name": "python", + "description": "Interacting with python with pybind11 interface", + "dependencies": [ + "boost-python", + "pybind11" + ] + } + ] +} diff --git a/ports/openmpi/CONTROL b/ports/openmpi/CONTROL index 37fe14b0c..b9c4df053 100644 --- a/ports/openmpi/CONTROL +++ b/ports/openmpi/CONTROL @@ -1,6 +1,6 @@ Source: openmpi Version: 4.0.3 -Port-Version: 2 +Port-Version: 3 Homepage: https://www.open-mpi.org/ Description: The Open MPI Project is an open source Message Passing Interface implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers. Supports: !(windows|uwp) diff --git a/ports/openmpi/portfile.cmake b/ports/openmpi/portfile.cmake index 0ef3c3c6a..a51f55d0d 100644 --- a/ports/openmpi/portfile.cmake +++ b/ports/openmpi/portfile.cmake @@ -30,7 +30,7 @@ vcpkg_configure_make( --enable-debug ) -vcpkg_install_make() +vcpkg_install_make(DISABLE_PARALLEL) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt index c7d7cc32a..a763a8749 100644 --- a/ports/openssl-unix/CMakeLists.txt +++ b/ports/openssl-unix/CMakeLists.txt @@ -40,10 +40,10 @@ set(CFLAGS "${CMAKE_C_FLAGS}") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}")
endif()
-if(CMAKE_C_COMPILER_TARGET)
+if(CMAKE_C_COMPILER_TARGET AND CMAKE_C_COMPILE_OPTIONS_TARGET)
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}")
endif()
-if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
+if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN AND CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN)
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}")
endif()
if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL index da781ab02..9ea5cc309 100644 --- a/ports/openssl-unix/CONTROL +++ b/ports/openssl-unix/CONTROL @@ -1,5 +1,5 @@ Source: openssl-unix Version: 1.1.1g -Port-Version: 2 +Port-Version: 3 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. Supports: !(windows|uwp) diff --git a/ports/openxr-loader/001-fix-array-decl.patch b/ports/openxr-loader/001-fix-array-decl.patch new file mode 100644 index 000000000..9bd25eb31 --- /dev/null +++ b/ports/openxr-loader/001-fix-array-decl.patch @@ -0,0 +1,26 @@ +--- openxr.hpp 2020-08-16 14:42:30.845279600 -0700 ++++ openxr.hpp 2020-08-16 14:45:19.707229200 -0700 +@@ -18249,9 +18249,9 @@ + public: + // ctor + SpatialGraphNodeSpaceCreateInfoMSFT ( +- const SpatialGraphNodeTypeMSFT& nodeType_ = {}, +- uint8_t nodeId[16]_ = 0, +- const Posef& pose_ = {} ++ const SpatialGraphNodeTypeMSFT& nodeType_, ++ uint8_t nodeId_[16], ++ const Posef& pose_ + ) + : + +@@ -18259,9 +18259,9 @@ + ) , + + nodeType {nodeType_} , +- nodeId {nodeId_} , + pose {pose_} + { ++ memcpy(nodeId, nodeId_, 16); + } + operator const XrSpatialGraphNodeSpaceCreateInfoMSFT&() const { return *reinterpret_cast<const XrSpatialGraphNodeSpaceCreateInfoMSFT*>(this); } + operator XrSpatialGraphNodeSpaceCreateInfoMSFT &() { diff --git a/ports/openxr-loader/CONTROL b/ports/openxr-loader/CONTROL index 632fadab7..451ffe0da 100644 --- a/ports/openxr-loader/CONTROL +++ b/ports/openxr-loader/CONTROL @@ -1,5 +1,5 @@ Source: openxr-loader -Version: 1.0.3.0 +Version: 1.0.11 Description: Khronos API for abstracting VR/MR/AR hardware Supports: !(arm|uwp) diff --git a/ports/openxr-loader/portfile.cmake b/ports/openxr-loader/portfile.cmake index 19e2cda6c..25c2dcbb8 100644 --- a/ports/openxr-loader/portfile.cmake +++ b/ports/openxr-loader/portfile.cmake @@ -1,25 +1,32 @@ -if (VCPKG_TARGET_ARCHITECTURE MATCHES "^arm*") - message(FATAL_ERROR "OpenXR does not support arm") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - # Due to UWP restricting the usage of static CRT OpenXR cannot be built. - message(FATAL_ERROR "OpenXR does not support UWP") -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenXR-SDK + REF e3a4e41d61544d8e2eba73f00da99b6818ec472b + SHA512 26c6b547aa30d89895efcc835dddc3b58ab57f0e450a4ae82655a990a816dd57c70e43267a10da75b1c2bd160189942e443c8e27367d6648417d1c9c134e7694 + HEAD_REF master +) -include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SDK_SOURCE_PATH + REPO KhronosGroup/OpenXR-SDK-Source + REF 6dee6e228f47857adf5d7673eb90c64f04d33c60 + SHA512 0c522eef95b4d8bdc8e4f1ca852cd9798ff2bca9ef8511446d9cdf80bc314b0da454ab5c203658bbe43d3e7ff3d757b9427c3f75829b2a022a25041d1a2d2b12 + HEAD_REF master +) vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO jherico/OpenXR-SDK - REF e3dcdb820fae01fb8d25dfd32e15d14caa14b411 - SHA512 421eb3651e388b69d70d3200a1c40d363c0ac9eb1d35c89a53430ea764dd3dd0e864b756dfff0e0f98ac574309331782c95a1cadcfe84eb5a6c34434737d7a38 + OUT_SOURCE_PATH HPP_SOURCE_PATH + REPO KhronosGroup/OpenXR-hpp + REF 097a7535563fc84bb7648ea9c5a4531a1e909458 + SHA512 fe953405724e9c4a8218cd269a23317ebc8164330a519eb82de75e832bc05e2c51d24bca24e4ce13724bf275c33b26f6646e25f29eeffe6840ffc552f3351ad0 HEAD_REF master ) # Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and # vice-versa. Might be better in future iterations to patch the CMakeLists.txt for OpenXR -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_WINDOWS) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(DYNAMIC_LOADER OFF) set(VCPKG_CRT_LINKAGE dynamic) @@ -44,11 +51,29 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +set(ENV{OPENXR_REPO} ${SDK_SOURCE_PATH}) + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${HPP_SOURCE_PATH}/scripts/hpp_genxr.py -registry ${SDK_SOURCE_PATH}/specification/registry/xr.xml -o ${CURRENT_PACKAGES_DIR}/include/openxr openxr.hpp + WORKING_DIRECTORY ${HPP_SOURCE_PATH} + LOGFILE openxrhpp +) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include/openxr + PATCHES + 001-fix-array-decl.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/OpenXR) +else(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/openxr TARGET_PATH share/OpenXR) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# No CMake files are contained in /share only docs -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openxr-loader RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/redis-plus-plus/CONTROL b/ports/redis-plus-plus/CONTROL index 7e5d3e196..77a355f40 100644 --- a/ports/redis-plus-plus/CONTROL +++ b/ports/redis-plus-plus/CONTROL @@ -1,5 +1,5 @@ Source: redis-plus-plus -Version: 1.1.1 +Version: 1.1.2 Homepage: https://github.com/sewenew/redis-plus-plus Description: This is a C++ client for Redis. It's based on hiredis, and written in C++ 11. Build-Depends: hiredis
\ No newline at end of file diff --git a/ports/redis-plus-plus/disable-build-test.patch b/ports/redis-plus-plus/disable-build-test.patch deleted file mode 100644 index a180250e1..000000000 --- a/ports/redis-plus-plus/disable-build-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index fb160b5..6235d89 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -34,7 +34,7 @@ set_target_properties(${SHARED_LIB} PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
- set_target_properties(${STATIC_LIB} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(${SHARED_LIB} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-
--add_subdirectory(test)
-+#add_subdirectory(test)
-
- # Install static lib.
- install(TARGETS ${STATIC_LIB}
diff --git a/ports/redis-plus-plus/portfile.cmake b/ports/redis-plus-plus/portfile.cmake index 8eba51a38..5878671e4 100644 --- a/ports/redis-plus-plus/portfile.cmake +++ b/ports/redis-plus-plus/portfile.cmake @@ -1,17 +1,19 @@ +#Blocked by ninja: error: build.ninja:348: multiple rules generate lib/redis++.lib [-w dupbuild=err] vcpkg_fail_port_install(ON_TARGET "Windows") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sewenew/redis-plus-plus - REF d35267580568517f09bdf70cb582e5284c25401a - SHA512 f065b97d438772300e30485a7550bc0fff00005f1056cf9c23216ea388fa088303869ccf2eaa70ee8b06cc0fc2406c9c6faddd5ad08759ee2d0665ac91761914 + REF b08b36a9a91de00636e583307610f49af7876f50 # 1.1.2 + SHA512 6dcead9fca9e7082ace28dcd72a1b325e229297080eea3e5a28ef5e6b9e4a7d1bcb3568997a5e7a031d7937a025a017ed92d7869db5829ba6113783c84bc5a68 HEAD_REF master - PATCHES disable-build-test.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJIA + PREFER_NINJA + OPTIONS + -DREDIS_PLUS_PLUS_BUILD_TEST=OFF ) vcpkg_install_cmake() diff --git a/ports/sqlite-orm/CONTROL b/ports/sqlite-orm/CONTROL index c86beeb3d..b0735d1de 100644 --- a/ports/sqlite-orm/CONTROL +++ b/ports/sqlite-orm/CONTROL @@ -1,4 +1,6 @@ Source: sqlite-orm Version: 1.5 +Port-Version: 1 +Homepage: https://github.com/fnc12/sqlite_orm Build-Depends: sqlite3 Description: SQLite ORM light header only library for modern C++ diff --git a/ports/sqlite-orm/disable-examples.patch b/ports/sqlite-orm/disable-examples.patch new file mode 100644 index 000000000..61d832016 --- /dev/null +++ b/ports/sqlite-orm/disable-examples.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5ffbdf3..ba22109 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -75,7 +75,7 @@ if(SqliteOrm_BuildTests AND BUILD_TESTING)
+ add_subdirectory(tests)
+ endif()
+
+-add_subdirectory(examples)
++#add_subdirectory(examples)
+
+ install(TARGETS sqlite_orm EXPORT "${ProjectName}Targets"
+ INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development
diff --git a/ports/sqlite-orm/fix-includes-not-found.patch b/ports/sqlite-orm/fix-includes-not-found.patch new file mode 100644 index 000000000..42ee7672c --- /dev/null +++ b/ports/sqlite-orm/fix-includes-not-found.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5ffbdf3..a6b2659 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,11 +43,11 @@ set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include")
+ add_library(sqlite_orm INTERFACE)
+
+ target_sources(sqlite_orm INTERFACE
+- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/sqlite_orm/sqlite_orm.h>
++ $<BUILD_INTERFACE:${SqliteOrm_INCLUDE}/include/sqlite_orm/sqlite_orm.h>
+ $<INSTALL_INTERFACE:include/sqlite_orm/sqlite_orm.h>)
+
+ target_include_directories(sqlite_orm INTERFACE
+- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
++ $<BUILD_INTERFACE:${SqliteOrm_INCLUDE}/include>
+ $<INSTALL_INTERFACE:include>)
+
+ include(ucm)
diff --git a/ports/sqlite-orm/portfile.cmake b/ports/sqlite-orm/portfile.cmake index 3b93af0b8..83dcfa923 100644 --- a/ports/sqlite-orm/portfile.cmake +++ b/ports/sqlite-orm/portfile.cmake @@ -1,15 +1,30 @@ -include(vcpkg_common_functions) +# header-only library vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fnc12/sqlite_orm - REF e8a9e9416f421303f4b8970caab26dadf8bae98b # v1.5 - SHA512 9774345e0209482a137e5f3058e2f27db55ea72fd08c44e67c0989df8927fee896cb789dcb2cd21167689c2f2be1c126bd730a6ea1083a48e6dd58fb048c6f5e + REF b30ddc6a50dc582c93cd49d8d0cf8f5025ba1d2b # 1.5 + SHA512 faeeef88aef11e89e9565850c23087925fb4d75ef48a16434055f18831db8e230d044c81574d840dacca406d7095cb83a113afc326996e289ab11a02d8caa2f4 HEAD_REF master + PATCHES + fix-includes-not-found.patch + disable-examples.patch ) -file(COPY ${SOURCE_PATH}/include/sqlite_orm DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSQLITE_ORM_ENABLE_CXX_17=OFF + -DSqliteOrm_BuildTests=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sqlite_orm TARGET_PATH share/SqliteOrm) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-orm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 3abe12625..e5292ed5c 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -291,7 +291,6 @@ dbghelp:x64-uwp=skip dbghelp:x64-windows-static=skip dbghelp:x64-windows=skip dbghelp:x86-windows=skip -dbow2:x64-osx=fail dcmtk:arm-uwp=fail dcmtk:arm64-windows=fail dcmtk:x64-uwp=fail @@ -325,7 +324,6 @@ dlfcn-win32:x64-linux=fail dlfcn-win32:x64-osx=fail dlfcn-win32:x64-uwp=fail dmlc:arm-uwp=fail -dmlc:arm64-windows=fail dmlc:x64-uwp=fail dpdk:arm-uwp=fail dpdk:arm64-windows=fail @@ -425,7 +423,6 @@ flint:x64-linux=fail flint:x64-osx=fail fltk:arm-uwp=fail fltk:x64-uwp=fail -fluidsynth:x64-linux=fail fluidsynth:x64-osx=fail fmem:arm-uwp=fail fmem:x64-uwp=fail @@ -452,11 +449,8 @@ freetds:x64-uwp=fail freetype-gl:x64-uwp=fail freexl:arm-uwp=fail freexl:x64-uwp=fail -freexl:x64-windows=fail fribidi:arm64-windows=fail fribidi:arm-uwp=fail -fribidi:x64-linux=fail -fribidi:x64-osx=fail fribidi:x64-uwp=fail ftgl:x64-uwp=fail fuzzylite:arm-uwp=fail @@ -658,7 +652,6 @@ libcds:x64-uwp=fail libconfig:x64-osx=fail libcopp:arm64-windows=fail libcopp:arm-uwp=fail -libcopp:x64-windows-static=fail libcrafter:x86-windows=fail libcrafter:x64-windows=fail cpuid:arm-uwp=fail @@ -674,7 +667,6 @@ libdshowcapture:x64-osx=fail libdshowcapture:x64-uwp=fail libepoxy:arm64-windows=fail libepoxy:arm-uwp=fail -libepoxy:x64-osx=fail libepoxy:x64-uwp=fail libepoxy:x64-windows-static=fail libevent:arm-uwp=fail @@ -691,7 +683,6 @@ libfabric:arm-uwp=fail libfabric:x64-linux=fail libfabric:x64-osx=fail libfabric:x64-uwp=fail -libfabric:x64-windows=fail libfabric:x64-windows-static=fail libfreenect2:arm64-windows=fail libfreenect2:x64-linux=fail @@ -1094,11 +1085,6 @@ msmpi:x64-uwp=fail munit:arm-uwp=fail munit:arm64-windows=fail munit:x64-uwp=fail -# Though `vcpkg_configure_meson` and `vcpkg_install_meson` support -# `x64-linux` and `x64-osx` now, it still failed on these targets. -# See: https://github.com/microsoft/vcpkg/pull/6780 -munit:x64-linux=fail -munit:x64-osx=fail muparser:arm-uwp=fail muparser:x64-uwp=fail murmurhash:arm-uwp=fail @@ -1483,7 +1469,6 @@ readline-win32:x64-osx=fail readline-win32:x64-uwp=fail realsense2:arm64-windows=fail realsense2:arm-uwp=fail -realsense2:x64-linux=fail realsense2:x64-uwp=fail redis-plus-plus:x86-windows=fail redis-plus-plus:x64-windows=fail @@ -1597,8 +1582,15 @@ sockpp:arm-uwp=fail sockpp:x64-uwp=fail soem:x64-uwp=fail soem:arm-uwp=fail -soil:arm-uwp=fail -soil:x64-uwp=fail +# soil upstream is gone; if we do not have another source before 2021-03-01 we will remove the port +soil:arm-uwp=skip +soil:x64-uwp=skip +soil:arm64-windows=skip +soil:x64-windows=skip +soil:x86-windows=skip +soil:x64-windows-static=skip +soil:x64-linux=skip +soil:x64-osx=skip soil2:arm-uwp=fail soil2:x64-uwp=fail sophus:x64-linux=fail diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 545e6d765..c957fc628 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -24,6 +24,9 @@ ## The target passed to the make build command (`./make <target>`). If not specified, the 'all' target will
## be passed.
##
+## ### DISABLE_PARALLEL
+## The underlying buildsystem will be instructed to not parallelize
+##
## ## Notes:
## This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md).
## You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script supports the
@@ -36,7 +39,7 @@ ## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake)
function(vcpkg_build_make)
- cmake_parse_arguments(_bc "ADD_BIN_TO_PATH;ENABLE_INSTALL" "LOGFILE_ROOT;BUILD_TARGET" "" ${ARGN})
+ cmake_parse_arguments(_bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET" "" ${ARGN})
if(NOT _bc_LOGFILE_ROOT)
set(_bc_LOGFILE_ROOT "build")
@@ -64,6 +67,7 @@ function(vcpkg_build_make) find_program(MAKE make REQUIRED)
set(MAKE_COMMAND "${MAKE}")
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f Makefile ${_bc_BUILD_TARGET})
+ set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f Makefile ${_bc_BUILD_TARGET})
string(REPLACE " " "\\\ " _VCPKG_PACKAGE_PREFIX ${CURRENT_PACKAGES_DIR})
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}")
@@ -75,6 +79,7 @@ function(vcpkg_build_make) set(MAKE_COMMAND "${MAKE}")
# Set make command and install command
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f Makefile ${_bc_BUILD_TARGET})
+ set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f Makefile ${_bc_BUILD_TARGET})
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} install DESTDIR=${CURRENT_PACKAGES_DIR})
endif()
@@ -118,14 +123,25 @@ function(vcpkg_build_make) if(MAKE_BASH)
set(MAKE_CMD_LINE "${MAKE_COMMAND} ${MAKE_OPTS}")
+ set(NO_PARALLEL_MAKE_CMD_LINE "${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}")
else()
set(MAKE_CMD_LINE ${MAKE_COMMAND} ${MAKE_OPTS})
+ set(NO_PARALLEL_MAKE_CMD_LINE ${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS})
endif()
+ if (_bc_DISABLE_PARALLEL)
+ vcpkg_execute_build_process(
+ COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE}
+ WORKING_DIRECTORY "${WORKING_DIRECTORY}"
+ LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
+ )
+ else()
vcpkg_execute_build_process(
COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE}
+ NO_PARALLEL_COMMAND ${MAKE_BASH} ${NO_PARALLEL_MAKE_CMD_LINE}
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
- )
+ )
+ endif()
if(_bc_ADD_BIN_TO_PATH)
set(ENV{PATH} "${_BACKUP_ENV_PATH}")
diff --git a/scripts/cmake/vcpkg_execute_build_process.cmake b/scripts/cmake/vcpkg_execute_build_process.cmake index 7097fbf1b..98e3648d5 100644 --- a/scripts/cmake/vcpkg_execute_build_process.cmake +++ b/scripts/cmake/vcpkg_execute_build_process.cmake @@ -65,6 +65,8 @@ function(vcpkg_execute_build_process) # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. OR err_contents MATCHES "Cannot create parent directory" OR err_contents MATCHES "Cannot write file" # Multiple threads using the same directory at the same time cause conflicts, will try again. + OR err_contents MATCHES "Can't open" + # Multiple threads caused the wrong order of creating folders and creating files in folders ) message(STATUS "Restarting Build without parallelism because memory exceeded") set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out-1.log") diff --git a/toolsrc/.clang-format b/toolsrc/.clang-format index 6c32a733a..cdaabb8c1 100644 --- a/toolsrc/.clang-format +++ b/toolsrc/.clang-format @@ -40,11 +40,13 @@ IncludeCategories: Priority: -1 - Regex: '^<catch2/catch\.hpp>$' Priority: 1 - - Regex: '^<vcpkg/base/.*\.h>$' + - Regex: '^<vcpkg/fwd/.*\.h>$' Priority: 2 - - Regex: '^<vcpkg/.*\.h>$' + - Regex: '^<vcpkg/base/.*\.h>$' Priority: 3 - - Regex: '^<[a-z0-9_]*\.h>$' + - Regex: '^<vcpkg/.*\.h>$' Priority: 4 - - Regex: '^<[a-z0-9_]*>$' # C++ standard library + - Regex: '^<[a-z0-9_]*\.h>$' Priority: 5 + - Regex: '^<[a-z0-9_]*>$' # C++ standard library + Priority: 6 diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 62cb3740d..8b525c248 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -157,10 +157,10 @@ if(CLANG_FORMAT) add_custom_target(format COMMAND ${CLANG_FORMAT} -i -verbose ${CMAKE_CURRENT_SOURCE_DIR}/src/pch.cpp ${VCPKGLIB_BASE_SOURCES} - ${VCPKGLIB_NON_PCH_SOURCES} + ${VCPKGLIB_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/include/pch.h ${VCPKGLIB_BASE_INCLUDES} - ${VCPKGLIB_NON_PCH_INCLUDES} + ${VCPKGLIB_INCLUDES} ${VCPKG_SOURCES} ${VCPKGMETRICSUPLOADER_SOURCES} diff --git a/toolsrc/include/vcpkg-test/mockcmakevarprovider.h b/toolsrc/include/vcpkg-test/mockcmakevarprovider.h index 482f9ea40..15b24b8d0 100644 --- a/toolsrc/include/vcpkg-test/mockcmakevarprovider.h +++ b/toolsrc/include/vcpkg-test/mockcmakevarprovider.h @@ -19,7 +19,7 @@ namespace vcpkg::Test { for (auto&& spec : specs) tag_vars[spec.package_spec] = {}; - Util::unused(port_provider); + (void)(port_provider); } Optional<const std::unordered_map<std::string, std::string>&> get_generic_triplet_vars( diff --git a/toolsrc/include/vcpkg/archives.h b/toolsrc/include/vcpkg/archives.h index 073217064..be2523dfb 100644 --- a/toolsrc/include/vcpkg/archives.h +++ b/toolsrc/include/vcpkg/archives.h @@ -1,8 +1,8 @@ #pragma once -#include <vcpkg/base/files.h> +#include <vcpkg/fwd/vcpkgpaths.h> -#include <vcpkg/vcpkgpaths.h> +#include <vcpkg/base/files.h> namespace vcpkg::Archives { diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index a6d8781b0..11807b249 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -239,15 +239,4 @@ namespace vcpkg::Util return e == E::YES; } } - - template<class... Ts> - void unused(const Ts&...) - { - } - - template<class T> - T copy(const T& t) - { - return t; - } } diff --git a/toolsrc/include/vcpkg/buildenvironment.h b/toolsrc/include/vcpkg/buildenvironment.h index 1216caa2a..aa69708b6 100644 --- a/toolsrc/include/vcpkg/buildenvironment.h +++ b/toolsrc/include/vcpkg/buildenvironment.h @@ -1,6 +1,8 @@ -#include <vcpkg/base/system.process.h> +#pragma once + +#include <vcpkg/fwd/vcpkgpaths.h> -#include <vcpkg/vcpkgpaths.h> +#include <vcpkg/base/system.process.h> #include <string> #include <vector> diff --git a/toolsrc/include/vcpkg/cmakevars.h b/toolsrc/include/vcpkg/cmakevars.h index 1c02376b9..66dd287b8 100644 --- a/toolsrc/include/vcpkg/cmakevars.h +++ b/toolsrc/include/vcpkg/cmakevars.h @@ -1,9 +1,10 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/base/optional.h> #include <vcpkg/portfileprovider.h> -#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Dependencies { diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 948d4b5e8..77e478219 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -2,12 +2,6 @@ #include <vcpkg/build.h> #include <vcpkg/commands.interface.h> -#include <vcpkg/dependencies.h> -#include <vcpkg/statusparagraphs.h> - -#include <array> -#include <map> -#include <vector> namespace vcpkg::Commands { diff --git a/toolsrc/include/vcpkg/commands.interface.h b/toolsrc/include/vcpkg/commands.interface.h index 10d213522..c8bc14ca9 100644 --- a/toolsrc/include/vcpkg/commands.interface.h +++ b/toolsrc/include/vcpkg/commands.interface.h @@ -1,7 +1,11 @@ #pragma once -#include <vcpkg/vcpkgcmdarguments.h> -#include <vcpkg/vcpkgpaths.h> +#include <vcpkg/fwd/vcpkgcmdarguments.h> +#include <vcpkg/fwd/vcpkgpaths.h> + +#include <vcpkg/base/files.h> + +#include <vcpkg/triplet.h> namespace vcpkg::Commands { diff --git a/toolsrc/include/vcpkg/commands.owns.h b/toolsrc/include/vcpkg/commands.owns.h index 13676b2bd..39037649d 100644 --- a/toolsrc/include/vcpkg/commands.owns.h +++ b/toolsrc/include/vcpkg/commands.owns.h @@ -1,6 +1,7 @@ #pragma once #include <vcpkg/commands.interface.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg::Commands::Owns { diff --git a/toolsrc/include/vcpkg/commands.search.h b/toolsrc/include/vcpkg/commands.search.h index 6220a8866..530a3ac28 100644 --- a/toolsrc/include/vcpkg/commands.search.h +++ b/toolsrc/include/vcpkg/commands.search.h @@ -1,6 +1,7 @@ #pragma once #include <vcpkg/commands.interface.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg::Commands::Search { diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 76ff89e7a..3cca364e7 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -4,11 +4,7 @@ #include <vcpkg/base/util.h> #include <vcpkg/build.h> -#include <vcpkg/cmakevars.h> #include <vcpkg/packagespec.h> -#include <vcpkg/portfileprovider.h> -#include <vcpkg/statusparagraphs.h> -#include <vcpkg/vcpkgpaths.h> #include <functional> #include <map> @@ -19,6 +15,21 @@ namespace vcpkg::Graphs struct Randomizer; } +namespace vcpkg::CMakeVars +{ + struct CMakeVarProvider; +} + +namespace vcpkg::PortFileProvider +{ + struct PortFileProvider; +} + +namespace vcpkg +{ + struct StatusParagraphs; +} + namespace vcpkg::Dependencies { enum class RequestType diff --git a/toolsrc/include/vcpkg/export.ifw.h b/toolsrc/include/vcpkg/export.ifw.h index b1573924e..0fe07227c 100644 --- a/toolsrc/include/vcpkg/export.ifw.h +++ b/toolsrc/include/vcpkg/export.ifw.h @@ -1,7 +1,8 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/dependencies.h> -#include <vcpkg/vcpkgpaths.h> #include <string> #include <vector> diff --git a/toolsrc/include/vcpkg/fwd/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/fwd/vcpkgcmdarguments.h new file mode 100644 index 000000000..87d6f9eaa --- /dev/null +++ b/toolsrc/include/vcpkg/fwd/vcpkgcmdarguments.h @@ -0,0 +1,13 @@ +#pragma once + +namespace vcpkg +{ + struct ParsedArguments; + struct CommandSwitch; + struct CommandSetting; + struct CommandMultiSetting; + struct CommandOptionsStructure; + struct CommandStructure; + struct HelpTableFormatter; + struct VcpkgCmdArguments; +} diff --git a/toolsrc/include/vcpkg/fwd/vcpkgpaths.h b/toolsrc/include/vcpkg/fwd/vcpkgpaths.h new file mode 100644 index 000000000..79655bf4a --- /dev/null +++ b/toolsrc/include/vcpkg/fwd/vcpkgpaths.h @@ -0,0 +1,8 @@ +#pragma once + +namespace vcpkg +{ + struct ToolsetArchOption; + struct Toolset; + struct VcpkgPaths; +} diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h index cf4c3c046..1cfa7a17c 100644 --- a/toolsrc/include/vcpkg/statusparagraph.h +++ b/toolsrc/include/vcpkg/statusparagraph.h @@ -1,5 +1,7 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/binaryparagraph.h> #include <map> @@ -62,5 +64,5 @@ namespace vcpkg std::vector<const StatusParagraph*> features; }; - Json::Value serialize_ipv(const InstalledPackageView& ipv, const struct VcpkgPaths& paths); + Json::Value serialize_ipv(const InstalledPackageView& ipv, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg/tools.h b/toolsrc/include/vcpkg/tools.h index d5c0a5c23..f9618a52d 100644 --- a/toolsrc/include/vcpkg/tools.h +++ b/toolsrc/include/vcpkg/tools.h @@ -1,5 +1,7 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/base/files.h> #include <string> @@ -7,8 +9,6 @@ namespace vcpkg { - struct VcpkgPaths; - namespace Tools { static const std::string SEVEN_ZIP = "7zip"; diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 84cd7c599..3e956c83e 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -1,5 +1,8 @@ #pragma once +#include <vcpkg/fwd/vcpkgcmdarguments.h> +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/base/files.h> #include <vcpkg/base/optional.h> #include <vcpkg/base/span.h> @@ -19,8 +22,6 @@ namespace vcpkg std::unordered_map<std::string, std::vector<std::string>> multisettings; }; - struct VcpkgPaths; - struct CommandSwitch { constexpr CommandSwitch(const StringLiteral& name, const StringLiteral& short_help_text) diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 721b59606..2262543d9 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -1,5 +1,7 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/base/cache.h> #include <vcpkg/base/files.h> #include <vcpkg/base/lazy.h> diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp index 2841aefa0..a2b9317a2 100644 --- a/toolsrc/src/vcpkg-test/util.cpp +++ b/toolsrc/src/vcpkg-test/util.cpp @@ -195,7 +195,7 @@ namespace vcpkg::Test ec.assign(errno, std::system_category()); } #else - Util::unused(target, file, ec); + (void)(target, file, ec); vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, no_filesystem_message); #endif } @@ -217,7 +217,7 @@ namespace vcpkg::Test #elif FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_UNIX ::vcpkg::Test::create_symlink(target, file, ec); #else - Util::unused(target, file, ec); + (void)(target, file, ec); vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, no_filesystem_message); #endif } diff --git a/toolsrc/src/vcpkg/archives.cpp b/toolsrc/src/vcpkg/archives.cpp index 41a70e996..4c97a7b5a 100644 --- a/toolsrc/src/vcpkg/archives.cpp +++ b/toolsrc/src/vcpkg/archives.cpp @@ -3,6 +3,7 @@ #include <vcpkg/archives.h> #include <vcpkg/commands.h> #include <vcpkg/tools.h> +#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Archives { diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index c6c7a0dee..15a37a8b4 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -601,7 +601,7 @@ namespace vcpkg::Files std::error_code& ec) override { this->rename(oldpath, newpath, ec); - Util::unused(temp_suffix); + (void)(temp_suffix); #if !defined(_WIN32) if (ec) { diff --git a/toolsrc/src/vcpkg/base/system.print.cpp b/toolsrc/src/vcpkg/base/system.print.cpp index 885269eef..7366a810f 100644 --- a/toolsrc/src/vcpkg/base/system.print.cpp +++ b/toolsrc/src/vcpkg/base/system.print.cpp @@ -22,7 +22,7 @@ namespace vcpkg::System #else // TODO: add color handling code // it should probably use VT-220 codes - Util::unused(c); + (void)(c); System::print2(message); #endif } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 4c78b7b1d..f163ef314 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -473,7 +473,7 @@ namespace vcpkg::Build #if !defined(_WIN32) // TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107. // bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted. - vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA)); + (void)(paths.get_tool_exe(Tools::NINJA)); #endif std::vector<System::CMakeVariable> cmake_args{ {"CURRENT_PORT_DIR", paths.scripts / "detect_compiler"}, @@ -539,7 +539,7 @@ namespace vcpkg::Build #if !defined(_WIN32) // TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107. // bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted. - vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA)); + (void)(paths.get_tool_exe(Tools::NINJA)); #endif auto& scfl = action.source_control_file_location.value_or_exit(VCPKG_LINE_INFO); auto& scf = *scfl.source_control_file; @@ -1086,12 +1086,18 @@ namespace vcpkg::Build std::string create_user_troubleshooting_message(const PackageSpec& spec) { - return Strings::format("Please ensure you're using the latest portfiles with `.\\vcpkg update`, then\n" +#if defined(_WIN32) + auto vcpkg_update_cmd = ".\\vcpkg"; +#else + auto vcpkg_update_cmd = ".\/vcpkg"; +#endif + return Strings::format("Please ensure you're using the latest portfiles with `%s update`, then\n" "submit an issue at https://github.com/Microsoft/vcpkg/issues including:\n" " Package: %s\n" " Vcpkg version: %s\n" "\n" "Additionally, attach any relevant sections from the log files above.", + vcpkg_update_cmd, spec, Commands::Version::version()); } diff --git a/toolsrc/src/vcpkg/buildenvironment.cpp b/toolsrc/src/vcpkg/buildenvironment.cpp index 09d84d0e8..2b63a16b5 100644 --- a/toolsrc/src/vcpkg/buildenvironment.cpp +++ b/toolsrc/src/vcpkg/buildenvironment.cpp @@ -1,5 +1,6 @@ #include <vcpkg/buildenvironment.h> #include <vcpkg/tools.h> +#include <vcpkg/vcpkgpaths.h> namespace vcpkg { diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index ae01302cb..84a1f5ed5 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -8,6 +8,7 @@ #include <vcpkg/metrics.h> #include <vcpkg/paragraphs.h> #include <vcpkg/remove.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> namespace vcpkg::Commands::Autocomplete diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 028619182..bfd275542 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -4,6 +4,7 @@ #include <vcpkg/commands.buildexternal.h> #include <vcpkg/help.h> #include <vcpkg/input.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg::Commands::BuildExternal { diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 555b70859..3014f87a1 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -5,6 +5,7 @@ #include <vcpkg/commands.cache.h> #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg::Commands::Cache { @@ -36,7 +37,7 @@ namespace vcpkg::Commands::Cache void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); const std::vector<BinaryParagraph> binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 4dffcfd3c..e9577e4ad 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -15,6 +15,7 @@ #include <vcpkg/install.h> #include <vcpkg/packagespec.h> #include <vcpkg/platform-expression.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> using namespace vcpkg; diff --git a/toolsrc/src/vcpkg/commands.ciclean.cpp b/toolsrc/src/vcpkg/commands.ciclean.cpp index c26bd12fc..a92b918c8 100644 --- a/toolsrc/src/vcpkg/commands.ciclean.cpp +++ b/toolsrc/src/vcpkg/commands.ciclean.cpp @@ -4,6 +4,7 @@ #include <vcpkg/commands.ciclean.h> #include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> using namespace vcpkg; diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 2c8c7b1b2..e40aa34b2 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -1,10 +1,12 @@ #include <vcpkg/base/chrono.h> #include <vcpkg/base/system.print.h> #include <vcpkg/base/system.process.h> +#include <vcpkg/base/util.h> #include <vcpkg/commands.contact.h> #include <vcpkg/help.h> #include <vcpkg/userconfig.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg::Commands::Contact { diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index a7cfbc931..3dba465af 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -1,9 +1,12 @@ #include <vcpkg/base/checks.h> #include <vcpkg/base/files.h> +#include <vcpkg/base/util.h> #include <vcpkg/buildenvironment.h> #include <vcpkg/commands.create.h> #include <vcpkg/help.h> +#include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Commands::Create { @@ -17,7 +20,7 @@ namespace vcpkg::Commands::Create int perform(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index 0f1e431e5..8c14c4b3d 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -8,6 +8,7 @@ #include <vcpkg/input.h> #include <vcpkg/install.h> #include <vcpkg/packagespec.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vector> diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 067b753de..13091352e 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -5,6 +5,7 @@ #include <vcpkg/commands.edit.h> #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <limits.h> diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index fc6a82ef1..15c094e71 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -5,6 +5,7 @@ #include <vcpkg/cmakevars.h> #include <vcpkg/commands.env.h> #include <vcpkg/help.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg::Commands::Env { diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 313d90b4f..e4688fb0d 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -1,6 +1,8 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/commands.fetch.h> +#include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Commands::Fetch { @@ -14,7 +16,7 @@ namespace vcpkg::Commands::Fetch void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); const std::string tool = args.command_arguments[0]; const fs::path tool_path = paths.get_tool_exe(tool); diff --git a/toolsrc/src/vcpkg/commands.format-manifest.cpp b/toolsrc/src/vcpkg/commands.format-manifest.cpp index 61465b13e..72cac6958 100644 --- a/toolsrc/src/vcpkg/commands.format-manifest.cpp +++ b/toolsrc/src/vcpkg/commands.format-manifest.cpp @@ -7,6 +7,7 @@ #include <vcpkg/paragraphs.h> #include <vcpkg/portfileprovider.h> #include <vcpkg/sourceparagraph.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace { diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 5ac5e8aa6..3b93b09bd 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -1,7 +1,10 @@ #include <vcpkg/base/hash.h> #include <vcpkg/base/system.print.h> +#include <vcpkg/base/util.h> #include <vcpkg/commands.hash.h> +#include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Commands::Hash { @@ -15,7 +18,7 @@ namespace vcpkg::Commands::Hash void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); const fs::path file_to_hash = args.command_arguments[0]; diff --git a/toolsrc/src/vcpkg/commands.info.cpp b/toolsrc/src/vcpkg/commands.info.cpp index afb2642c6..71db6a8f4 100644 --- a/toolsrc/src/vcpkg/commands.info.cpp +++ b/toolsrc/src/vcpkg/commands.info.cpp @@ -9,6 +9,7 @@ #include <vcpkg/install.h> #include <vcpkg/portfileprovider.h> #include <vcpkg/statusparagraphs.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> #include <vcpkg/versiont.h> diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 75d39c954..200c18e8b 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -9,6 +9,8 @@ #include <vcpkg/metrics.h> #include <vcpkg/tools.h> #include <vcpkg/userconfig.h> +#include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Commands::Integrate { @@ -531,7 +533,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); if (args.command_arguments[0] == Subcommand::INSTALL) { diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index fcd2919ff..2156857d1 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -2,6 +2,7 @@ #include <vcpkg/commands.list.h> #include <vcpkg/help.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> #include <vcpkg/versiont.h> diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index 29cfe3a23..bb5e19715 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -2,6 +2,7 @@ #include <vcpkg/commands.owns.h> #include <vcpkg/help.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> namespace vcpkg::Commands::Owns @@ -32,7 +33,7 @@ namespace vcpkg::Commands::Owns void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); const StatusParagraphs status_db = database_load_check(paths); search_file(paths, args.command_arguments[0], status_db); diff --git a/toolsrc/src/vcpkg/commands.porthistory.cpp b/toolsrc/src/vcpkg/commands.porthistory.cpp index b54da5974..9e4cb2fe8 100644 --- a/toolsrc/src/vcpkg/commands.porthistory.cpp +++ b/toolsrc/src/vcpkg/commands.porthistory.cpp @@ -5,6 +5,8 @@ #include <vcpkg/commands.porthistory.h> #include <vcpkg/help.h> #include <vcpkg/tools.h> +#include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Commands::PortHistory { @@ -82,7 +84,7 @@ namespace vcpkg::Commands::PortHistory void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); std::string port_name = args.command_arguments.at(0); std::vector<PortControlVersion> versions = read_versions_from_log(paths, port_name); diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 509713d94..d470470cd 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -7,6 +7,7 @@ #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> #include <vcpkg/tools.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/versiont.h> namespace vcpkg::Commands::PortsDiff @@ -132,7 +133,7 @@ namespace vcpkg::Commands::PortsDiff void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); const fs::path& git_exe = paths.get_tool_exe(Tools::GIT); diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index 836acfffe..4a1defadd 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -6,6 +6,7 @@ #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> #include <vcpkg/sourceparagraph.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> #include <vcpkg/versiont.h> diff --git a/toolsrc/src/vcpkg/commands.setinstalled.cpp b/toolsrc/src/vcpkg/commands.setinstalled.cpp index e6fc05971..4b7ba10ca 100644 --- a/toolsrc/src/vcpkg/commands.setinstalled.cpp +++ b/toolsrc/src/vcpkg/commands.setinstalled.cpp @@ -8,6 +8,7 @@ #include <vcpkg/install.h> #include <vcpkg/portfileprovider.h> #include <vcpkg/remove.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> namespace vcpkg::Commands::SetInstalled diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index 391192038..dd42d76c4 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -10,6 +10,7 @@ #include <vcpkg/install.h> #include <vcpkg/statusparagraphs.h> #include <vcpkg/update.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkglib.h> namespace vcpkg::Commands::Upgrade diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index d366a42b8..62f1d89c6 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -3,6 +3,8 @@ #include <vcpkg/commands.version.h> #include <vcpkg/help.h> #include <vcpkg/metrics.h> +#include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> #define STRINGIFY(...) #__VA_ARGS__ #define MACRO_TO_STRING(X) STRINGIFY(X) @@ -59,15 +61,21 @@ namespace vcpkg::Commands::Version { if (maj1 != maj2 || min1 != min2 || rev1 != rev2) { +#if defined(_WIN32) + auto bootstrap = ".\\bootstrap-vcpkg.bat"; +#else + auto bootstrap = ".\/bootstrap-vcpkg.sh"; +#endif System::printf(System::Color::warning, "Warning: Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " - ".\\bootstrap-vcpkg.bat to update.\n", + "%s to update.\n", maj2, min2, rev2, maj1, min1, - rev1); + rev1, + bootstrap); } } } @@ -82,7 +90,7 @@ namespace vcpkg::Commands::Version void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem&) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); System::print2("Vcpkg package management program version ", version(), diff --git a/toolsrc/src/vcpkg/commands.xvsinstances.cpp b/toolsrc/src/vcpkg/commands.xvsinstances.cpp index 4ad9744c9..91bd1b943 100644 --- a/toolsrc/src/vcpkg/commands.xvsinstances.cpp +++ b/toolsrc/src/vcpkg/commands.xvsinstances.cpp @@ -2,6 +2,7 @@ #include <vcpkg/commands.xvsinstances.h> #include <vcpkg/help.h> +#include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/visualstudio.h> namespace vcpkg::Commands::X_VSInstances @@ -27,7 +28,7 @@ namespace vcpkg::Commands::X_VSInstances Checks::exit_success(VCPKG_LINE_INFO); #else - Util::unused(args, paths); + (void)(args, paths); Checks::exit_with_message(VCPKG_LINE_INFO, "This command is not supported on non-windows platforms."); #endif } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index e4d45e888..9b37fe6da 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -257,13 +257,18 @@ namespace vcpkg::Dependencies { ExpectedS<const SourceControlFileLocation&> maybe_scfl = m_port_provider.get_control_file(ipv.spec().name()); - +#if defined(_WIN32) + auto vcpkg_remove_cmd = ".\\vcpkg"; +#else + auto vcpkg_remove_cmd = ".\/vcpkg"; +#endif if (!maybe_scfl) Checks::exit_with_message( VCPKG_LINE_INFO, - "Error: while loading %s: %s.\nPlease run \"vcpkg remove %s\" and re-attempt.", + "Error: while loading %s: %s.\nPlease run \"%s remove %s\" and re-attempt.", ipv.spec().to_string(), maybe_scfl.error(), + vcpkg_remove_cmd, ipv.spec().to_string()); return m_graph @@ -963,7 +968,7 @@ namespace vcpkg::Dependencies else if (p_cluster->request_type == RequestType::USER_REQUESTED && p_cluster->m_installed.has_value()) { auto&& installed = p_cluster->m_installed.value_or_exit(VCPKG_LINE_INFO); - plan.already_installed.emplace_back(Util::copy(installed.ipv), p_cluster->request_type); + plan.already_installed.emplace_back(InstalledPackageView(installed.ipv), p_cluster->request_type); } } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index de39c7a86..60e636ed0 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -109,7 +109,7 @@ namespace vcpkg::Help void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); if (args.command_arguments.empty()) { diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 9a88f2ae8..c74b8541d 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -381,7 +381,7 @@ namespace vcpkg::Metrics } #if !defined(_WIN32) - Util::unused(payload); + (void)(payload); #else HINTERNET connect = nullptr, request = nullptr; BOOL results = FALSE; diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 78fa993a2..a067b8fc0 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -556,7 +556,7 @@ namespace vcpkg::PostBuildLint return LintStatus::ERROR_DETECTED; } #endif - Util::unused(expected_architecture, files); + (void)expected_architecture, (void)files; return LintStatus::SUCCESS; } diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index e10e485a7..ed26f4497 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -179,8 +179,12 @@ namespace vcpkg System::print2("And this is the list of valid fields for manifest files: \n\n ", Strings::join("\n ", get_list_of_manifest_fields()), "\n\n"); - System::print2("You may need to update the vcpkg binary; try running bootstrap-vcpkg.bat or " - "bootstrap-vcpkg.sh to update.\n\n"); +#if defined(_WIN32) + auto bootstrap = ".\\bootstrap-vcpkg.bat"; +#else + auto bootstrap = ".\/bootstrap-vcpkg.sh"; +#endif + System::print2("You may need to update the vcpkg binary; try running %s to update.\n\n", bootstrap); } for (auto&& error_info : error_info_list) diff --git a/toolsrc/src/vcpkg/tools.cpp b/toolsrc/src/vcpkg/tools.cpp index 04577261a..acfa9082b 100644 --- a/toolsrc/src/vcpkg/tools.cpp +++ b/toolsrc/src/vcpkg/tools.cpp @@ -138,7 +138,7 @@ namespace vcpkg virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const { - Util::unused(out_candidate_paths); + (void)(out_candidate_paths); } virtual Optional<std::string> get_version(const VcpkgPaths& paths, const fs::path& path_to_exe) const = 0; }; @@ -283,7 +283,7 @@ namespace vcpkg out_candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); #else // TODO: figure out if this should do anything on non-Windows - Util::unused(out_candidate_paths); + (void)(out_candidate_paths); #endif } virtual Optional<std::string> get_version(const VcpkgPaths&, const fs::path& path_to_exe) const override @@ -342,7 +342,7 @@ CMake suite maintained and supported by Kitware (kitware.com/cmake). #ifndef _WIN32 cmd.path_arg(paths.get_tool_exe(Tools::MONO)); #else - Util::unused(paths); + (void)(paths); #endif cmd.path_arg(path_to_exe); const auto rc = System::cmd_execute_and_capture_output(cmd.extract()); @@ -380,7 +380,7 @@ Type 'NuGet help <command>' for help on a specific command. out_candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); #else // TODO: figure out if this should do anything on non-windows - Util::unused(out_candidate_paths); + (void)(out_candidate_paths); #endif } @@ -441,7 +441,7 @@ Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-2 Wed Feb 26 23:23:50 virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const override { - Util::unused(out_candidate_paths); + (void)(out_candidate_paths); // TODO: Uncomment later // const std::vector<fs::path> from_path = Files::find_from_PATH("installerbase"); // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 48471e26c..2e88facfd 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -53,7 +53,7 @@ namespace vcpkg::Update void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + (void)(args.parse_arguments(COMMAND_STRUCTURE)); System::print2("Using local portfile versions. To update the local portfiles, use `git pull`.\n"); const StatusParagraphs status_db = database_load_check(paths); @@ -74,13 +74,21 @@ namespace vcpkg::Update { System::printf(" %-32s %s\n", package.spec, package.version_diff.to_string()); } + +#if defined(_WIN32) + auto vcpkg_cmd = ".\\vcpkg"; +#else + auto vcpkg_cmd = ".\/vcpkg"; +#endif System::print2("\n" "To update these packages and all dependencies, run\n" - " .\\vcpkg upgrade\n" + " %s upgrade\n" "\n" "To only remove outdated packages, run\n" - " .\\vcpkg remove --outdated\n" - "\n"); + " %s remove --outdated\n" + "\n", + vcpkg_cmd, + vcpkg_cmd); } Checks::exit_success(VCPKG_LINE_INFO); |
