diff --git a/ports/gmp/portfile.cmake b/ports/gmp/portfile.cmake index 1fa65b47e21bf4..86bc66489625a7 100644 --- a/ports/gmp/portfile.cmake +++ b/ports/gmp/portfile.cmake @@ -55,8 +55,8 @@ if(VCPKG_DETECTED_CMAKE_C_COMPILER_ID STREQUAL "MSVC") set(disable_assembly ON) endif() if(NOT disable_assembly) - vcpkg_find_acquire_program(CLANG) - set(ccas "${CLANG}") + vcpkg_find_acquire_program(VSCLANG) + set(ccas "${VSCLANG}") endif() elseif(VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") # not exporting asm functions diff --git a/ports/gmp/vcpkg.json b/ports/gmp/vcpkg.json index 45d242617f5e7b..75885657b60cfd 100644 --- a/ports/gmp/vcpkg.json +++ b/ports/gmp/vcpkg.json @@ -1,7 +1,7 @@ { "name": "gmp", "version": "6.2.1", - "port-version": 21, + "port-version": 22, "description": "The GNU Multiple Precision Arithmetic Library", "homepage": "https://gmplib.org", "license": "LGPL-3.0-only OR GPL-2.0-only", diff --git a/ports/nettle/portfile.cmake b/ports/nettle/portfile.cmake index a0b36b05a78e4b..1526dd9a051176 100644 --- a/ports/nettle/portfile.cmake +++ b/ports/nettle/portfile.cmake @@ -49,8 +49,8 @@ if(VCPKG_DETECTED_CMAKE_C_COMPILER_ID STREQUAL "MSVC") set(disable_assembly ON) endif() if(NOT disable_assembly) - vcpkg_find_acquire_program(CLANG) - set(ccas "${CLANG}") + vcpkg_find_acquire_program(VSCLANG) + set(ccas "${VSCLANG}") endif() else() set(ccas "${VCPKG_DETECTED_CMAKE_C_COMPILER}") diff --git a/ports/nettle/vcpkg.json b/ports/nettle/vcpkg.json index d7c2e93089d59c..743e79decf116a 100644 --- a/ports/nettle/vcpkg.json +++ b/ports/nettle/vcpkg.json @@ -1,7 +1,7 @@ { "name": "nettle", "version": "3.8.1", - "port-version": 1, + "port-version": 2, "description": "Nettle is a low-level cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.", "homepage": "https://git.lysator.liu.se/nettle/nettle", "license": null, diff --git a/scripts/cmake/vcpkg_find_acquire_program(VSCLANG).cmake b/scripts/cmake/vcpkg_find_acquire_program(VSCLANG).cmake new file mode 100644 index 00000000000000..8622c5af3a06d9 --- /dev/null +++ b/scripts/cmake/vcpkg_find_acquire_program(VSCLANG).cmake @@ -0,0 +1,19 @@ +if(NOT CMAKE_HOST_WIN32) + message(FATAL_ERROR "Visual Studio is only supported on Windows hosts.") +endif() + +set(program_name "clang") +set(paths_to_search + # LLVM in Visual Studio + "$ENV{VCINSTALLDIR}/Tools/Llvm/x64/bin" + "$ENV{VCINSTALLDIR}/Tools/Llvm/bin" +) +find_program(VSCLANG + NAMES clang + PATHS ${paths_to_search} + NO_DEFAULT_PATH +) +if(NOT VSCLANG) + list(JOIN paths_to_search "\n " paths) + message(FATAL_ERROR "Failed to find Visual Studio's clang in:\n ${paths}\nOpen the Visual Studio Installer and choose \"C++ Clang tools for Windows\" under \"Desktop development with C++\" optional components.") +endif() diff --git a/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake b/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake index f6ce20fefa8b76..29328f83c1420f 100644 --- a/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake +++ b/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake @@ -2,8 +2,14 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) # For each vcpkg_find_acquire_program(NAME).cmake script, # there must be a literal call to vcpkg_find_acquire_program(NAME).cmake +# Using a wrapper to collect the names of the variables to be checked. +set(variables "") +macro(vcpkg_find_acquire_program program) + list(APPEND variables "${program}") + message(STATUS "Checking ${program}...") + _vcpkg_find_acquire_program(${ARGV}) +endmacro() -set(variables BAZEL BISON FLEX GIT GN NINJA PERL PKGCONFIG PYTHON3 YASM) vcpkg_find_acquire_program(BAZEL) vcpkg_find_acquire_program(BISON) vcpkg_find_acquire_program(FLEX) @@ -17,17 +23,14 @@ vcpkg_find_acquire_program(YASM) if(NOT VCPKG_TARGET_IS_OSX) # System python too old (3.9; meson needs 3.10) - list(APPEND variables MESON) vcpkg_find_acquire_program(MESON) endif() if(VCPKG_HOST_IS_LINUX) - list(APPEND variables PATCHELF) vcpkg_find_acquire_program(PATCHELF) endif() if(VCPKG_HOST_IS_WINDOWS) - list(APPEND variables 7Z ARIA2 CLANG DARK DOXYGEN GASPREPROCESSOR GO GPERF JOM NASM NUGET PYTHON2 RUBY SCONS SWIG) vcpkg_find_acquire_program(7Z) vcpkg_find_acquire_program(ARIA2) vcpkg_find_acquire_program(CLANG) @@ -43,6 +46,7 @@ if(VCPKG_HOST_IS_WINDOWS) vcpkg_find_acquire_program(RUBY) vcpkg_find_acquire_program(SCONS) vcpkg_find_acquire_program(SWIG) + vcpkg_find_acquire_program(VSCLANG) endif() set(missing "") diff --git a/versions/baseline.json b/versions/baseline.json index 3e624a3d18d932..0708e877a90d40 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3030,7 +3030,7 @@ }, "gmp": { "baseline": "6.2.1", - "port-version": 21 + "port-version": 22 }, "gmsh": { "baseline": "4.11.1", @@ -5910,7 +5910,7 @@ }, "nettle": { "baseline": "3.8.1", - "port-version": 1 + "port-version": 2 }, "networkdirect-sdk": { "baseline": "2.0.1", diff --git a/versions/g-/gmp.json b/versions/g-/gmp.json index 80efb83c9396ec..724a12e637384e 100644 --- a/versions/g-/gmp.json +++ b/versions/g-/gmp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6d8b63a28eb86fdb8e2af0201ead9146c6656bdb", + "version": "6.2.1", + "port-version": 22 + }, { "git-tree": "726604ff590362102d805e16508ae20730583101", "version": "6.2.1", diff --git a/versions/n-/nettle.json b/versions/n-/nettle.json index ce348da9711767..9b14775030b9a5 100644 --- a/versions/n-/nettle.json +++ b/versions/n-/nettle.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d1f719255302bc915594ec977a28f57758b742f4", + "version": "3.8.1", + "port-version": 2 + }, { "git-tree": "7734b67cb656bf12488ea137779b56d8865bbb02", "version": "3.8.1",