applied-ai-018 commited on
Commit
0c959a6
·
verified ·
1 Parent(s): 74463fa

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. cc-multilingual-main/cc_net/vcpkg/scripts/angle/maintainer-notes.md +32 -0
  2. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/Dockerfile +66 -0
  3. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/azure-pipelines.yml +135 -0
  4. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/create-docker-image.ps1 +32 -0
  5. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/example-ubuntu-provision.sh +20 -0
  6. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/azure-pipelines.yml +83 -0
  7. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/changing-linux-packages.md +3 -0
  8. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/managed-image.json +16 -0
  9. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/provision-image.sh +115 -0
  10. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/patch-tuesday-checklist.md +42 -0
  11. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/roll-sas-tokens.ps1 +13 -0
  12. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/README.md +4 -0
  13. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml +11 -0
  14. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/job.yml +76 -0
  15. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 +75 -0
  16. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows/deploy-settings.txt +21 -0
  17. cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows/utility-prefix.ps1 +125 -0
  18. cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/atomic.cmake +2 -0
  19. cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/config.cmake +7 -0
  20. cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/predef.cmake +2 -0
  21. cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/test.cmake +13 -0
  22. cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-source-stubs/math.cmake +5 -0
  23. cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-source-stubs/test.cmake +5 -0
  24. cc-multilingual-main/cc_net/vcpkg/scripts/ifw/maintenance.qs +46 -0
  25. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/portfile.cmake +227 -0
  26. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/project/CMakeLists.txt +95 -0
  27. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/project/FindZLIBviaPkgConfig.cmake +11 -0
  28. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/vcpkg.json +189 -0
  29. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake/fix-dependency-libuv.patch +28 -0
  30. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake/portfile.cmake +80 -0
  31. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake/vcpkg.json +29 -0
  32. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/llfio-run-tests/portfile.cmake +1 -0
  33. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/llfio-run-tests/vcpkg.json +22 -0
  34. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/test-vcpkg_fixup_pkgconfig.cmake +167 -0
  35. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/test-vcpkg_minimum_required.cmake +49 -0
  36. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/test-z_vcpkg_cmake_config_fixup_merge.cmake +56 -0
  37. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/vcpkg.json +49 -0
  38. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-acquire-msys-test/portfile.cmake +3 -0
  39. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-acquire-msys-test/vcpkg.json +7 -0
  40. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/portfile.cmake +4 -0
  41. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/project/CMakeLists.txt +45 -0
  42. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/project/main.cpp +58 -0
  43. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/vcpkg.json +15 -0
  44. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-arrow/portfile.cmake +10 -0
  45. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-arrow/vcpkg.json +20 -0
  46. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-boost/portfile.cmake +1 -0
  47. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-boost/vcpkg.json +81 -0
  48. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-curl/portfile.cmake +1 -0
  49. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-curl/vcpkg.json +40 -0
  50. cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-gdal/portfile.cmake +1 -0
cc-multilingual-main/cc_net/vcpkg/scripts/angle/maintainer-notes.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # The ANGLE vcpkg port
2
+
3
+ The ANGLE port's buildsystem is based off of [WebKit's approach](https://github.com/WebKit/WebKit/tree/main/Source/ThirdParty/ANGLE) to converting ANGLE's buildsystem to CMake.
4
+
5
+ Details:
6
+
7
+ - `cmake-buildsystem/CMakeLists.txt`
8
+ - This is an augmented version of WebKit's [CMakeLists.txt](https://github.com/WebKit/WebKit/blob/main/Source/ThirdParty/ANGLE/CMakeLists.txt), with vcpkg edits and additions.
9
+ - `cmake-buildsystem/*.cmake`
10
+ - These are configuration files based on [WebKit's approach](https://github.com/WebKit/WebKit/tree/main/Source/ThirdParty/ANGLE), but customized for vcpkg (and using `PlatformLinux` instead of `PlatformGTK`)
11
+
12
+
13
+ ## Updating the ANGLE vcpkg port
14
+
15
+ 1. Select a new ANGLE version
16
+
17
+ Recommendation: Follow the recommendations in the libANGLE "[Choosing an ANGLE branch](https://github.com/google/angle/blob/master/doc/ChoosingANGLEBranch.md#matching-a-chromium-release-to-an-angle-branch)" guide, and find the branch that matches the current Chromium Stable.
18
+
19
+ 2. [Find the branch](https://github.com/google/angle/branches) (usually `chromium/<version>`) and latest commit on that branch, and update the following variables in `portfile.cmake`:
20
+ - `ANGLE_COMMIT`
21
+ - `ANGLE_VERSION`
22
+ - `ANGLE_SHA512`
23
+
24
+ 3. Check the `DEPS` file at that ANGLE commit, for the commit used in `'third_party/zlib'`, and update `ANGLE_THIRDPARTY_ZLIB_COMMIT` in `portfile.cmake` if necessary.
25
+
26
+ 4. Attempt to build. You may have to tweak the `CMakeLists.txt`, `Platform*.cmake` files, etc. Check with the latest files in [WebKit's repo](https://github.com/WebKit/WebKit/tree/main/Source/ThirdParty/ANGLE) to see if any updates need to be ported to the vcpkg's custom files. You might also need to change the `ANGLE_WEBKIT_BUILDSYSTEM_COMMIT` in the portfile (although this should theoretically need updating less frequently).
27
+
28
+ 5. Check headers against `opengl-registry` - make sure headers are similar.
29
+ > angle defines some additional entrypoints.
30
+ > opengl-registry should be latest before updating angle
31
+
32
+ 6. Complete all the other normal steps in the [Maintainer Guide](/docs/maintainers/maintainer-guide.md)
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/Dockerfile ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1.4
2
+ # DisableDockerDetector "Used to build the container deployed to Azure Container Registry"
3
+ FROM ubuntu:focal-20240216
4
+
5
+ ADD https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb /packages-microsoft-prod.deb
6
+ ADD https://dl.google.com/android/repository/android-ndk-r25c-linux.zip /android-ndk-r25c-linux.zip
7
+
8
+ # Add apt packages
9
+
10
+ ## vcpkg prerequisites
11
+ ENV APT_PACKAGES="git curl zip unzip tar"
12
+
13
+ ## Common build prereqs
14
+ ENV APT_PACKAGES="$APT_PACKAGES g++ vim pkg-config cmake ca-certificates"
15
+
16
+ ENV APT_PACKAGES="$APT_PACKAGES autoconf nasm bison python2 flex build-essential libtool libtool-bin libltdl-dev gettext automake autoconf-archive"
17
+
18
+ ## Python related
19
+ ENV APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-pip python3-venv python3-mako python3-jinja2"
20
+
21
+ ## freeglut
22
+ ENV APT_PACKAGES="$APT_PACKAGES libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev"
23
+
24
+ # glfw3
25
+ ENV APT_PACKAGES="$APT_PACKAGES libxinerama-dev libxcursor-dev"
26
+
27
+ # qt5-base
28
+ ENV APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \
29
+ libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev \
30
+ libxkbcommon-dev libxcb-keysyms1-dev \
31
+ libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev \
32
+ libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev \
33
+ libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev \
34
+ libxcb-cursor-dev libxkbcommon-x11-dev"
35
+
36
+ ## PowerShell
37
+ ENV APT_PACKAGES="$APT_PACKAGES powershell"
38
+
39
+ RUN <<END_OF_SCRIPT bash
40
+ export DEBIAN_FRONTEND=noninteractive
41
+
42
+ # Apt prereqs itself
43
+ apt-get -y update
44
+ apt-get -y --no-install-recommends install ca-certificates
45
+
46
+ # Add apt repos
47
+
48
+ ## PowerShell
49
+ dpkg -i packages-microsoft-prod.deb
50
+ rm -f packages-microsoft-prod.deb
51
+ add-apt-repository universe
52
+
53
+ # Run apt things
54
+ apt-get -y update
55
+ apt-get -y dist-upgrade
56
+
57
+ apt-get -y --no-install-recommends install $APT_PACKAGES
58
+
59
+ # Android NDK
60
+ unzip /android-ndk-r25c-linux.zip
61
+ rm -f android-ndk-r25c-linux.zip
62
+ END_OF_SCRIPT
63
+
64
+ ENV ANDROID_NDK_HOME /android-ndk-r25c
65
+
66
+ WORKDIR /vcpkg
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/azure-pipelines.yml ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Microsoft Corporation.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+
5
+ parameters:
6
+ - name: vcpkgToolSha
7
+ displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap'
8
+ type: string
9
+ default: 'use default'
10
+ - name: triplet
11
+ type: string
12
+ - name: jobName
13
+ type: string
14
+ - name: dockerImage
15
+ type: string
16
+ - name: tripletPattern
17
+ displayName: 'Enable the triplets which contain this substring'
18
+ type: string
19
+ default: ''
20
+
21
+ jobs:
22
+ - job: ${{ parameters.jobName }}
23
+ condition: and(succeeded(), contains('^${{ parameters.triplet }}$', '${{ parameters.tripletPattern }}'))
24
+ pool:
25
+ name: 'PrAnd-1ES-Pool'
26
+ demands:
27
+ - ImageOverride -equals vcpkg-mariner-docker-gen1
28
+ workspace:
29
+ clean: resources
30
+ timeoutInMinutes: 1440 # 1 day
31
+ cancelTimeoutInMinutes: 1
32
+ variables:
33
+ - name: WORKING_ROOT
34
+ value: /mnt/vcpkg-ci
35
+ - name: VCPKG_DOWNLOADS
36
+ value: /mnt/vcpkg-ci/downloads
37
+ - group: vcpkg-asset-caching-credentials
38
+ - name: X_VCPKG_ASSET_SOURCES
39
+ value: "x-azurl,$(root-url-wus3),$(sas-wus3),readwrite"
40
+ - group: vcpkg-binary-caching-credentials
41
+ - name: X_VCPKG_BINARY_SOURCE_STUB
42
+ value: "x-azblob,$(root-bin-url-wus3),$(sas-bin-wus3)"
43
+
44
+ steps:
45
+ # Note: /mnt is the Azure machines' temporary disk.
46
+ - bash: |
47
+ az login --identity
48
+ az acr login --name vcpkgandroidwus3
49
+ displayName: 'Set up managed identity'
50
+ - bash: |
51
+ sudo mkdir /home/agent -m=777
52
+ sudo chown `id -u` /home/agent
53
+ sudo mkdir ${{ variables.WORKING_ROOT }} -m=777
54
+ sudo rm -rf ${{ variables.WORKING_ROOT }}/failure-logs
55
+ sudo mkdir ${{ variables.WORKING_ROOT }}/failure-logs -m=777
56
+ sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777
57
+ exit 0
58
+ displayName: 'Create working directories'
59
+ - bash: |
60
+ CONTAINERS=$(docker ps -a -q)
61
+ if [ -n "$CONTAINERS" ]; then
62
+ docker rm -f $CONTAINERS
63
+ fi
64
+ displayName: 'Stop and remove all docker containers'
65
+ - bash: |
66
+ docker pull ${{ parameters.dockerImage }}
67
+ displayName: 'Pull Docker Container'
68
+ - bash: |
69
+ docker run --rm \
70
+ --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
71
+ ${{ parameters.dockerImage }} \
72
+ ./bootstrap-vcpkg.sh
73
+ displayName: 'Bootstrap vcpkg'
74
+ condition: eq('use default', '${{ parameters.vcpkgToolSha }}')
75
+ - bash: |
76
+ docker run --rm \
77
+ --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
78
+ ${{ parameters.dockerImage }} \
79
+ ./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }}
80
+ displayName: "Build vcpkg with CMake"
81
+ condition: ne('use default', '${{ parameters.vcpkgToolSha }}')
82
+ - task: Bash@3
83
+ inputs:
84
+ targetType: inline
85
+ script: |
86
+ USER=$(id --user)
87
+ docker run --init -i \
88
+ -a stderr \
89
+ -a stdout \
90
+ --user $USER \
91
+ --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
92
+ --mount type=bind,source=$(WORKING_ROOT)/failure-logs,target=/vcpkg/failure-logs \
93
+ --mount type=bind,source=/mnt/vcpkg-ci,target=/mnt/vcpkg-ci \
94
+ --env X_VCPKG_ASSET_SOURCES="x-azurl,$(root-url-wus3),$(sas-wus3),readwrite" \
95
+ ${{ parameters.dockerImage }} \
96
+ pwsh \
97
+ -File /vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 \
98
+ -Triplet ${{ parameters.triplet }} \
99
+ -BuildReason $(Build.Reason) \
100
+ -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" \
101
+ -WorkingRoot ${{ variables.WORKING_ROOT }} \
102
+ -IsLinuxHost
103
+ failOnStderr: true
104
+ displayName: '*** Test Modified Ports'
105
+ - bash: |
106
+ CONTAINERS=$(docker ps -a -q)
107
+ if [ -n "$CONTAINERS" ]; then
108
+ docker rm -f $CONTAINERS
109
+ fi
110
+ displayName: 'Stop and remove all docker containers'
111
+ condition: always()
112
+ - task: PublishBuildArtifacts@1
113
+ displayName: 'Publish Artifact: failure logs for ${{ parameters.triplet }}'
114
+ inputs:
115
+ PathtoPublish: '$(WORKING_ROOT)/failure-logs'
116
+ ArtifactName: 'failure logs for ${{ parameters.triplet }}'
117
+ condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
118
+ - bash: |
119
+ python3 scripts/file_script.py /mnt/vcpkg-ci/installed/vcpkg/info/
120
+ displayName: 'Build a file list for all packages'
121
+ condition: always()
122
+ - task: PublishBuildArtifacts@1
123
+ displayName: 'Publish Artifact: file lists for ${{ parameters.triplet }}'
124
+ condition: always()
125
+ inputs:
126
+ PathtoPublish: scripts/list_files
127
+ ArtifactName: 'file lists for ${{ parameters.triplet }}'
128
+ - task: PublishTestResults@2
129
+ displayName: 'Publish Test Results'
130
+ condition: ne(variables['XML_RESULTS_FILE'], '')
131
+ inputs:
132
+ testRunTitle: ${{ parameters.triplet }}
133
+ testResultsFormat: xUnit
134
+ testResultsFiles: $(XML_RESULTS_FILE)
135
+ platform: ${{ parameters.triplet }}
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/create-docker-image.ps1 ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Create Docker image for Android
2
+
3
+ $Date = (Get-Date -Format 'yyyy-MM-dd')
4
+ $ResourceGroupName = "PrAnd-1ES"
5
+ $ContainerRegistryName = "vcpkgandroidwus3"
6
+ $ErrorActionPreference = 'Stop'
7
+
8
+ $registry = Get-AzContainerRegistry -ResourceGroupName $ResourceGroupName -Name $ContainerRegistryName
9
+ Connect-AzContainerRegistry -Name $registry.Name
10
+
11
+ $imageName = "vcpkg-android"
12
+ Push-Location $PSScriptRoot
13
+ try {
14
+ docker builder prune -f --filter "until=24h"
15
+
16
+ docker build . -t $imageName
17
+
18
+ $remote = [string]::Format('{0}.azurecr.io/{1}:{2}', $ContainerRegistryName, $imageName, $Date)
19
+ docker tag $imageName $remote
20
+
21
+ docker push $remote
22
+
23
+ #removes from local environment
24
+ docker rmi --force $remote $imageName
25
+
26
+ # pulls and runs ...
27
+ docker logout
28
+ } finally {
29
+ Pop-Location
30
+ }
31
+
32
+ Write-Host "Remote: $remote"
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/android/example-ubuntu-provision.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Copyright (c) Microsoft Corporation.
3
+ # SPDX-License-Identifier: MIT
4
+ #
5
+ # This script is to set up the machine for the Docker host.
6
+
7
+ # This script is no longer used by official vcpkg testing due to an internal compliance effort
8
+ # requiring use of CBL-Mariner. It's still intended to be more or less identical to how the lab
9
+ # actually works though; everything meaningful is inside the Docker image; see Dockerfile
10
+
11
+ export DEBIAN_FRONTEND=noninteractive
12
+
13
+ ## Docker
14
+ apt-get -y --no-install-recommends install ca-certificates gnupg lsb-release
15
+ mkdir -p /etc/apt/keyrings
16
+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
17
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
18
+ $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
19
+ apt-get update
20
+ apt-get -y --no-install-recommends install docker-ce docker-ce-cli
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/azure-pipelines.yml ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Microsoft Corporation.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+
5
+ parameters:
6
+ - name: vcpkgToolSha
7
+ displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap'
8
+ type: string
9
+ default: 'use default'
10
+ - name: poolName
11
+ type: string
12
+ - name: tripletPattern
13
+ displayName: 'Enable the triplets which contain this substring'
14
+ type: string
15
+ default: ''
16
+
17
+ jobs:
18
+ - job: x64_linux
19
+ condition: and(succeeded(), contains('^x64-linux$', '${{ parameters.tripletPattern }}'))
20
+ pool:
21
+ name: ${{ parameters.poolName }}
22
+ workspace:
23
+ clean: resources
24
+ timeoutInMinutes: 1440 # 1 day
25
+ variables:
26
+ - name: WORKING_ROOT
27
+ value: /mnt/vcpkg-ci
28
+ - name: VCPKG_DOWNLOADS
29
+ value: /mnt/vcpkg-ci/downloads
30
+ - group: vcpkg-asset-caching-credentials
31
+ - name: X_VCPKG_ASSET_SOURCES
32
+ value: "x-azurl,$(root-url-wus3),$(sas-wus3),readwrite"
33
+ - group: vcpkg-binary-caching-credentials
34
+ - name: X_VCPKG_BINARY_SOURCE_STUB
35
+ value: "x-azblob,$(root-bin-url-wus3),$(sas-bin-wus3)"
36
+
37
+ steps:
38
+ # Note: /mnt is the Azure machines' temporary disk.
39
+ - bash: |
40
+ sudo mkdir /home/agent -m=777
41
+ sudo chown `id -u` /home/agent
42
+ sudo mkdir ${{ variables.WORKING_ROOT }} -m=777
43
+ sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777
44
+ exit 0
45
+ displayName: 'Create working directories'
46
+ - bash: ./bootstrap-vcpkg.sh
47
+ displayName: 'Bootstrap vcpkg'
48
+ condition: eq('use default', '${{ parameters.vcpkgToolSha }}')
49
+ - bash: ./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }}
50
+ displayName: "Build vcpkg with CMake"
51
+ condition: ne('use default', '${{ parameters.vcpkgToolSha }}')
52
+ - task: PowerShell@2
53
+ displayName: '*** Test Modified Ports'
54
+ inputs:
55
+ failOnStderr: true
56
+ filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
57
+ arguments: '-Triplet x64-linux -BuildReason $(Build.Reason) -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -IsLinuxHost'
58
+ pwsh: true
59
+ - task: PublishBuildArtifacts@1
60
+ displayName: 'Publish Artifact: failure logs for x64-linux'
61
+ inputs:
62
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs'
63
+ ArtifactName: 'failure logs for x64-linux'
64
+ condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
65
+ - bash: |
66
+ python3 scripts/file_script.py /mnt/vcpkg-ci/installed/vcpkg/info/
67
+ displayName: 'Build a file list for all packages'
68
+ condition: always()
69
+ - task: PublishBuildArtifacts@1
70
+ displayName: 'Publish Artifact: file lists for x64-linux'
71
+ condition: always()
72
+ inputs:
73
+ PathtoPublish: scripts/list_files
74
+ ArtifactName: 'file lists for x64-linux'
75
+ - task: PublishTestResults@2
76
+ displayName: 'Publish Test Results'
77
+ condition: ne(variables['XML_RESULTS_FILE'], '')
78
+ inputs:
79
+ testRunTitle: x64-linux
80
+ testResultsFormat: xUnit
81
+ testResultsFiles: $(XML_RESULTS_FILE)
82
+ platform: x64-linux
83
+ configuration: static
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/changing-linux-packages.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ - [ ] Update `provision-image.sh` to add the new apt package.
2
+ - [ ] Update `managed-image.json` to add the new apt package to the very long line of packages.
3
+ - [ ] Update the managed image named CPP_GITHUB\PrLin-1ES\PrLin-1ESImage by copying the contents of `managed-image.json` to the Settings\Image text box.
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/managed-image.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifacts": [
3
+ {
4
+ "name": "linux-install-packages",
5
+ "parameters": {
6
+ "packages": "git curl zip unzip tar at libxt-dev gperf libxaw7-dev cifs-utils build-essential g++ gfortran libx11-dev libxkbcommon-x11-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev libxxf86vm-dev libxcursor-dev yasm libnuma1 libnuma-dev libtool-bin libltdl-dev flex bison libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev xutils-dev dh-autoreconf autoconf-archive libgles2-mesa-dev ruby-full pkg-config meson nasm cmake ninja-build libxext-dev libxfixes-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-dri3-dev libxcb-present-dev libxcb-glx0-dev libxcb-util0-dev libxkbcommon-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-cursor-dev libkrb5-dev libxcb-res0-dev libxcb-keysyms1-dev libxcb-xkb-dev libxcb-record0-dev python3-setuptools python3-mako python3-pip python3-venv python3-jinja2 nodejs libwayland-dev python-is-python3 guile-2.2-dev libxdamage-dev libdbus-1-dev libxtst-dev haskell-stack golang-go wayland-protocols libbluetooth-dev"
7
+ }
8
+ },
9
+ {
10
+ "name": "linux-ubuntu2204-nvidia-cuda-cudnn"
11
+ },
12
+ {
13
+ "name": "linux-install-powershell"
14
+ }
15
+ ]
16
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/linux/provision-image.sh ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Copyright (c) Microsoft Corporation.
3
+ # SPDX-License-Identifier: MIT
4
+ #
5
+
6
+ export DEBIAN_FRONTEND=noninteractive
7
+
8
+ # Add apt repos
9
+
10
+ ## CUDA
11
+ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
12
+ mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
13
+ apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
14
+ add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
15
+
16
+ ## PowerShell
17
+ wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
18
+ dpkg -i packages-microsoft-prod.deb
19
+ rm -f packages-microsoft-prod.deb
20
+ add-apt-repository universe
21
+
22
+ apt-get -y update
23
+ apt-get -y dist-upgrade
24
+
25
+ # Add apt packages
26
+
27
+ ## vcpkg prerequisites
28
+ APT_PACKAGES="git curl zip unzip tar"
29
+
30
+ ## common build dependencies
31
+ APT_PACKAGES="$APT_PACKAGES at libxt-dev gperf libxaw7-dev cifs-utils \
32
+ build-essential g++ gfortran libx11-dev libxkbcommon-x11-dev libxi-dev \
33
+ libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev libxxf86vm-dev \
34
+ libxcursor-dev yasm libnuma1 libnuma-dev libtool-bin libltdl-dev \
35
+ flex bison libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev \
36
+ xutils-dev dh-autoreconf autoconf-archive libgles2-mesa-dev ruby-full \
37
+ pkg-config meson nasm cmake ninja-build"
38
+
39
+ ## required by qt5-base
40
+ APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \
41
+ libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev"
42
+
43
+ ## required by qt5-base for qt5-x11extras
44
+ APT_PACKAGES="$APT_PACKAGES libxkbcommon-dev libxcb-keysyms1-dev \
45
+ libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev \
46
+ libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev \
47
+ libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev"
48
+
49
+ ## required by xcb feature in qtbase
50
+ APT_PACKAGES="$APT_PACKAGES libxcb-cursor-dev"
51
+
52
+ ## required by libhdfs3
53
+ APT_PACKAGES="$APT_PACKAGES libkrb5-dev"
54
+
55
+ ## required by kf5windowsystem
56
+ APT_PACKAGES="$APT_PACKAGES libxcb-res0-dev"
57
+
58
+ ## required by kf5globalaccel
59
+ APT_PACKAGES="$APT_PACKAGES libxcb-keysyms1-dev libxcb-xkb-dev libxcb-record0-dev"
60
+
61
+ ## required by mesa
62
+ APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-mako libxcb-dri3-dev libxcb-present-dev"
63
+
64
+ ## required by some packages to install additional python packages
65
+ APT_PACKAGES="$APT_PACKAGES python3-pip python3-venv python3-jinja2"
66
+
67
+ ## required by qtwebengine
68
+ APT_PACKAGES="$APT_PACKAGES nodejs"
69
+
70
+ ## required by qtwayland
71
+ APT_PACKAGES="$APT_PACKAGES libwayland-dev"
72
+
73
+ ## required by all GN projects
74
+ APT_PACKAGES="$APT_PACKAGES python-is-python3"
75
+
76
+ ## required by libctl
77
+ APT_PACKAGES="$APT_PACKAGES guile-2.2-dev"
78
+
79
+ ## required by gtk
80
+ APT_PACKAGES="$APT_PACKAGES libxdamage-dev"
81
+
82
+ ## required by gtk3 and at-spi2-atk
83
+ APT_PACKAGES="$APT_PACKAGES libdbus-1-dev"
84
+
85
+ ## required by at-spi2-atk
86
+ APT_PACKAGES="$APT_PACKAGES libxtst-dev"
87
+
88
+ ## required by bond
89
+ APT_PACKAGES="$APT_PACKAGES haskell-stack"
90
+
91
+ ## required by boringssl
92
+ APT_PACKAGES="$APT_PACKAGES golang-go"
93
+
94
+ ## required by libdecor and mesa
95
+ APT_PACKAGES="$APT_PACKAGES wayland-protocols"
96
+
97
+ ## required by robotraconteur
98
+ APT_PACKAGES="$APT_PACKAGES libbluetooth-dev"
99
+
100
+ ## CUDA
101
+ APT_PACKAGES="$APT_PACKAGES cuda-compiler-12-1 cuda-libraries-dev-12-1 cuda-driver-dev-12-1 \
102
+ cuda-cudart-dev-12-1 libcublas-12-1 libcurand-dev-12-1 cuda-nvml-dev-12-1 libcudnn8-dev libnccl2 \
103
+ libnccl-dev"
104
+
105
+ ## PowerShell
106
+ APT_PACKAGES="$APT_PACKAGES powershell"
107
+
108
+ ## Additionally required/installed by Azure DevOps Scale Set Agents, skip on WSL
109
+ if [[ $(grep microsoft /proc/version) ]]; then
110
+ echo "Skipping install of ADO prerequisites on WSL."
111
+ else
112
+ APT_PACKAGES="$APT_PACKAGES libkrb5-3 zlib1g libicu70 debsums liblttng-ust1"
113
+ fi
114
+
115
+ apt-get -y --no-install-recommends install $APT_PACKAGES
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/patch-tuesday-checklist.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## First time machine setup:
2
+ * [ ] Install Azure PowerShell: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps
3
+ * [ ] Run `Connect-AzAccount -Subscription CPP_GITHUB`
4
+ * [ ] Install Docker
5
+
6
+ ## Each Patch Tuesday:
7
+ * [ ] Check for depends:vm-update PRs and make relevant changes if possible.
8
+ * [ ] Check for Service 360 alerts (possibly at https://aka.ms/s360 ?) against the service named
9
+ "C++ VCPKG Validation" about vulnerable software we are installing in the VMs and update that.
10
+ (Most often PowerShell needs to be updated)
11
+ * [ ] Check for any other software for the Windows images we wish to update and make the edits to do
12
+ so in `scripts/azure-pipelines/windows`
13
+ * [ ] Check for any updates possible to `vcpkgTools.xml`. Note that PowerShell currently uses the
14
+ 7.2.x series due to customer reported problems on older Windows with 7.3.x and later.
15
+ * [ ] Update the first line of android/Dockerfile with the current 'focal' image according to
16
+ https://hub.docker.com/_/ubuntu
17
+ * [ ] Run android/create-docker-image.ps1
18
+ * [ ] Update azure-pipelines.yml to point to the new linux docker image from Azure Container Registry
19
+ * [ ] Run windows/create-image.ps1
20
+ * [ ] Run windows/create-vmss.ps1
21
+ * [ ] Create new pools for these in Azure DevOps: https://dev.azure.com/vcpkg/public/_settings/agentqueues
22
+ * Windows: 22 agents
23
+ * Make sure to check 'Grant access permission to all pipelines'
24
+ * [ ] Update azure-pipelines.yml to point to the new pools.
25
+ * [ ] Submit PR with those changes.
26
+ * [ ] Submit a full CI rebuild with those changes: https://dev.azure.com/vcpkg/public/_build?definitionId=29
27
+ refs/pull/NUMBER/head
28
+ * [ ] Look at that and compare with recent build and resolve anything that's not an existing baseline issue.
29
+ * [ ] Merge the PR.
30
+ * [ ] Update the managed image for compiler testing and delete unused images.
31
+ * CPP_GITHUB\vcpkg-image-minting\PrWinWus3
32
+ * Standard HDD LRS
33
+ * West US 3, 1 Replica
34
+ * [ ] After the last build finishes on the previous pool, delete it in the Azure Devops *Organization* UI and its Resource Group. ( https://dev.azure.com/vcpkg/_settings/agentpools ?)
35
+ * [ ] Run `generate-sas-tokens.ps1 -KeyNumber N`, where N is whether the month is even
36
+ (Jan = 1, Feb = 2, Mar = 1, and so on) and update the relevant libraries on
37
+ dev.azure.com/vcpkg and devdiv.visualstudio.com
38
+ * [ ] After builds using previous SAS tokens complete, run `roll-sas-tokens.ps1 -KeyNumber N` where
39
+ this N is the other key. (Jan = 2, Feb = 1, Mar = 2, and so on)
40
+ * [ ] Mint a new macOS base box. (See instructions in `scripts/azure-pipelines/osx/README.md`)
41
+ * [ ] Deploy the new base box to all hosts.
42
+ * [ ] Update the software on the CTI's machine #12 to match.
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/roll-sas-tokens.ps1 ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Param(
3
+ [Parameter(Mandatory=$true)]
4
+ [int]$KeyNumber
5
+ )
6
+
7
+ $keyName = "key$KeyNumber"
8
+
9
+ # Asset Cache:
10
+ New-AzStorageAccountKey -ResourceGroupName vcpkg-asset-cache -StorageAccountName vcpkgassetcachewus3 -KeyName $keyName
11
+
12
+ # Binary Cache:
13
+ New-AzStorageAccountKey -ResourceGroupName vcpkg-binary-cache -StorageAccountName vcpkgbinarycachewus3 -KeyName $keyName
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/README.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ The "unstable" build is used internally by Microsoft to test prerelease versions
2
+ of our C++ compiler; not seeing results from these build definitions in the
3
+ GitHub portal is normal as these builds depend on acquisition of private
4
+ compiler bits that aren't yet shipping.
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Microsoft Corporation.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ variables:
5
+ unstable-pool: 'vcpkg-testing-msvc'
6
+
7
+ jobs:
8
+ - template: job.yml
9
+ parameters:
10
+ triplet: x64-windows
11
+ jobName: x64_windows
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/job.yml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Microsoft Corporation.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+
5
+ jobs:
6
+ - job: ${{ parameters.jobName }}
7
+ pool:
8
+ name: $(unstable-pool)
9
+ workspace:
10
+ clean: resources
11
+ timeoutInMinutes: 5760 # 4 days
12
+ variables:
13
+ - name: WORKING_ROOT
14
+ value: D:\
15
+ - name: VCPKG_DOWNLOADS
16
+ value: D:\downloads
17
+ - group: vcpkg-asset-caching-credentials
18
+ - name: X_VCPKG_ASSET_SOURCES
19
+ value: "x-azurl,$(root-url-wus3),$(sas-wus3),readwrite"
20
+
21
+ steps:
22
+ - task: DownloadBuildArtifacts@0
23
+ displayName: 'Download DropBuildNumber if not specified'
24
+ inputs:
25
+ buildType: specific
26
+ project: '0bdbc590-a062-4c3f-b0f6-9383f67865ee'
27
+ pipeline: 16549
28
+ buildVersionToDownload: latestFromBranch
29
+ branchName: 'refs/heads/$(MSVCBranchName)'
30
+ artifactName: BuildNumber
31
+ downloadPath: 'D:\msvc-drops'
32
+ condition: eq(variables['DropBuildNumber'], '')
33
+ - task: PowerShell@2
34
+ displayName: 'Set DropBuildNumber if not specified'
35
+ inputs:
36
+ targetType: inline
37
+ script: |
38
+ $DropBuildNumber = Get-Content -Path D:\msvc-drops\BuildNumber\Build.BuildNumber.txt
39
+ Write-Host "##vso[task.setvariable variable=DropBuildNumber]$DropBuildNumber"
40
+ Write-Host "Build Number set to: $DropBuildNumber"
41
+ pwsh: true
42
+ condition: eq(variables['DropBuildNumber'], '')
43
+ - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0
44
+ displayName: 'Download msvc x86 ret'
45
+ inputs:
46
+ dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection'
47
+ buildNumber: 'msvc/builds/$(DropBuildNumber)/x86ret'
48
+ destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.x86ret'
49
+ - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0
50
+ displayName: 'Download msvc amd64 ret'
51
+ inputs:
52
+ dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection'
53
+ buildNumber: 'msvc/builds/$(DropBuildNumber)/amd64ret'
54
+ destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.amd64ret'
55
+ - task: PowerShell@2
56
+ displayName: 'Rearrange MSVC Drop Layout'
57
+ inputs:
58
+ targetType: filePath
59
+ filePath: 'scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1'
60
+ arguments: '-DropRoot "D:\msvc-drops\$(DropBuildNumber)" -BuildType ret'
61
+ pwsh: true
62
+ - script: .\bootstrap-vcpkg.bat
63
+ displayName: 'Bootstrap vcpkg'
64
+ - task: PowerShell@2
65
+ displayName: '*** Test Modified Ports'
66
+ inputs:
67
+ failOnStderr: true
68
+ filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
69
+ arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -PassingIsPassing'
70
+ pwsh: true
71
+ - task: PublishBuildArtifacts@1
72
+ displayName: 'Publish Artifact: failure logs for ${{ parameters.triplet }}'
73
+ inputs:
74
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs'
75
+ ArtifactName: 'failure logs for ${{ parameters.triplet }}'
76
+ condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Microsoft Corporation.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ <#
5
+ .SYNOPSIS
6
+ Moves files from an MSVC compiler drop to the locations where they are installed in a Visual Studio installation.
7
+
8
+ .PARAMETER DropRoot
9
+ The location where the MSVC compiler drop has been downloaded.
10
+
11
+ .PARAMETER BuildType
12
+ The MSVC drop build type set with /p:_BuildType when MSVC was built. Defaults to 'ret'.
13
+
14
+ #>
15
+ [CmdletBinding()]
16
+ param(
17
+ [Parameter(Mandatory = $true)][string]$DropRoot,
18
+ [Parameter(Mandatory = $false)][ValidateSet('ret', 'chk')][string]$BuildType = 'ret'
19
+ )
20
+
21
+ Set-StrictMode -Version Latest
22
+
23
+ $MSVCRoot = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC"
24
+
25
+ $ErrorActionPreference = "Stop"
26
+
27
+ $tempRoot = "$DropRoot\readytodeploy"
28
+
29
+ New-Item -ItemType Directory -Path $tempRoot | Out-Null
30
+
31
+ Write-Host "Rearranging x86$BuildType"
32
+ New-Item -ItemType Directory -Path "$tempRoot\bin\HostX86" | Out-Null
33
+ Move-Item "$DropRoot\binaries.x86$BuildType\bin\i386" "$tempRoot\bin\HostX86\x86"
34
+ Move-Item "$DropRoot\binaries.x86$BuildType\bin\x86_amd64" "$tempRoot\bin\HostX86\x64"
35
+ Move-Item "$DropRoot\binaries.x86$BuildType\bin\x86_arm" "$tempRoot\bin\HostX86\arm"
36
+
37
+ Write-Host "Rearranging amd64$BuildType"
38
+ New-Item -ItemType Directory -Path "$tempRoot\bin\HostX64" | Out-Null
39
+ Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64" "$tempRoot\bin\HostX64\x64"
40
+ Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64_x86" "$tempRoot\bin\HostX64\x86"
41
+ Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64_arm" "$tempRoot\bin\HostX64\arm"
42
+
43
+ # Only copy files and directories that already exist in the VS installation.
44
+ Write-Host "Rearranging inc, lib"
45
+ New-Item -ItemType Directory -Path "$tempRoot\lib" | Out-Null
46
+ Move-Item "$DropRoot\binaries.x86$BuildType\inc" "$tempRoot\include"
47
+ Move-Item "$DropRoot\binaries.x86$BuildType\lib\i386" "$tempRoot\lib\x86"
48
+ Move-Item "$DropRoot\binaries.amd64$BuildType\lib\amd64" "$tempRoot\lib\x64"
49
+
50
+ Write-Host "Rearranging atlmfc"
51
+ New-Item -ItemType Directory -Path "$tempRoot\atlmfc" | Out-Null
52
+ New-Item -ItemType Directory -Path "$tempRoot\atlmfc\lib" | Out-Null
53
+ Move-Item "$DropRoot\binaries.x86$BuildType\atlmfc\include" "$tempRoot\atlmfc\include"
54
+ Move-Item "$DropRoot\binaries.x86$BuildType\atlmfc\lib\i386" "$tempRoot\atlmfc\lib\x86"
55
+ Move-Item "$DropRoot\binaries.amd64$BuildType\atlmfc\lib\amd64" "$tempRoot\atlmfc\lib\x64"
56
+
57
+ [string[]]$toolsets = Get-ChildItem -Path $MSVCRoot -Directory | Sort-Object -Descending
58
+ if ($toolsets.Length -eq 0) {
59
+ throw "Could not find Visual Studio toolset!"
60
+ }
61
+
62
+ Write-Host "Found toolsets:`n$($toolsets -join `"`n`")`n"
63
+ $selectedToolset = $toolsets[0]
64
+ Write-Host "Using toolset: $selectedToolset"
65
+ for ($idx = 1; $idx -lt $toolsets.Length; $idx++) {
66
+ $badToolset = $toolsets[$idx]
67
+ Write-Host "Deleting toolset: $badToolset"
68
+ Remove-Item $badToolset -Recurse -Force
69
+ }
70
+
71
+ Write-Host "Deploying $tempRoot => $selectedToolset"
72
+ Copy-Item "$tempRoot\*" $selectedToolset -Recurse -Force
73
+ Write-Host "Deleting $DropRoot..."
74
+ Remove-Item $DropRoot -Recurse -Force
75
+ Write-Host "Done!"
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows/deploy-settings.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $ErrorActionPreference = 'Stop'
2
+ $ProgressPreference = 'SilentlyContinue'
3
+
4
+ Write-Host 'Disabling pagefile...'
5
+ wmic computersystem set AutomaticManagedPagefile=False
6
+ wmic pagefileset delete
7
+
8
+ $av = Get-Command Add-MPPreference -ErrorAction SilentlyContinue
9
+ if ($null -eq $av) {
10
+ Write-Host 'AntiVirus not installed, skipping exclusions.'
11
+ } else {
12
+ Write-Host 'Configuring AntiVirus exclusions...'
13
+ Add-MpPreference -ExclusionPath C:\agent
14
+ Add-MPPreference -ExclusionPath D:\
15
+ Add-MPPreference -ExclusionPath E:\
16
+ Add-MPPreference -ExclusionProcess ninja.exe
17
+ Add-MPPreference -ExclusionProcess clang-cl.exe
18
+ Add-MPPreference -ExclusionProcess cl.exe
19
+ Add-MPPreference -ExclusionProcess link.exe
20
+ Add-MPPreference -ExclusionProcess python.exe
21
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/azure-pipelines/windows/utility-prefix.ps1 ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Microsoft Corporation.
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ <#
5
+ .SYNOPSIS
6
+ Gets a random file path in the temp directory.
7
+
8
+ .DESCRIPTION
9
+ Get-TempFilePath takes an extension, and returns a path with a random
10
+ filename component in the temporary directory with that extension.
11
+
12
+ .PARAMETER Extension
13
+ The extension to use for the path.
14
+ #>
15
+ Function Get-TempFilePath {
16
+ Param(
17
+ [String]$Extension
18
+ )
19
+
20
+ if ([String]::IsNullOrWhiteSpace($Extension)) {
21
+ throw 'Missing Extension'
22
+ }
23
+
24
+ $tempPath = [System.IO.Path]::GetTempPath()
25
+ $tempName = [System.IO.Path]::GetRandomFileName() + '.' + $Extension
26
+ return Join-Path $tempPath $tempName
27
+ }
28
+
29
+ <#
30
+ .SYNOPSIS
31
+ Writes a message to the screen depending on ExitCode.
32
+
33
+ .DESCRIPTION
34
+ Since msiexec can return either 0 or 3010 successfully, in both cases
35
+ we write that installation succeeded, and which exit code it exited with.
36
+ If msiexec returns anything else, we write an error.
37
+
38
+ .PARAMETER ExitCode
39
+ The exit code that msiexec returned.
40
+ #>
41
+ Function PrintMsiExitCodeMessage {
42
+ Param(
43
+ $ExitCode
44
+ )
45
+
46
+ # 3010 is probably ERROR_SUCCESS_REBOOT_REQUIRED
47
+ if ($ExitCode -eq 0 -or $ExitCode -eq 3010) {
48
+ Write-Host "Installation successful! Exited with $ExitCode."
49
+ }
50
+ else {
51
+ Write-Error "Installation failed! Exited with $ExitCode."
52
+ throw
53
+ }
54
+ }
55
+
56
+ <#
57
+ .SYNOPSIS
58
+ Install a .msi file.
59
+
60
+ .DESCRIPTION
61
+ InstallMSI takes a url where an .msi lives, and installs that .msi to the system.
62
+
63
+ .PARAMETER Name
64
+ The name of the thing to install.
65
+
66
+ .PARAMETER Url
67
+ The URL at which the .msi lives.
68
+ #>
69
+ Function InstallMSI {
70
+ Param(
71
+ [String]$Name,
72
+ [String]$Url
73
+ )
74
+
75
+ try {
76
+ Write-Host "Downloading $Name..."
77
+ [string]$msiPath = Get-TempFilePath -Extension 'msi'
78
+ curl.exe -L -o $msiPath -s -S $Url
79
+ Write-Host "Installing $Name..."
80
+ $args = @('/i', $msiPath, '/norestart', '/quiet', '/qn')
81
+ $proc = Start-Process -FilePath 'msiexec.exe' -ArgumentList $args -Wait -PassThru
82
+ PrintMsiExitCodeMessage $proc.ExitCode
83
+ }
84
+ catch {
85
+ Write-Error "Failed to install $Name! $($_.Exception.Message)"
86
+ throw
87
+ }
88
+ }
89
+
90
+ <#
91
+ .SYNOPSIS
92
+ Unpacks a zip file to $Dir.
93
+
94
+ .DESCRIPTION
95
+ InstallZip takes a URL of a zip file, and unpacks the zip file to the directory
96
+ $Dir.
97
+
98
+ .PARAMETER Name
99
+ The name of the tool being installed.
100
+
101
+ .PARAMETER Url
102
+ The URL of the zip file to unpack.
103
+
104
+ .PARAMETER Dir
105
+ The directory to unpack the zip file to.
106
+ #>
107
+ Function InstallZip {
108
+ Param(
109
+ [String]$Name,
110
+ [String]$Url,
111
+ [String]$Dir
112
+ )
113
+
114
+ try {
115
+ Write-Host "Downloading $Name..."
116
+ [string]$zipPath = Get-TempFilePath -Extension 'zip'
117
+ curl.exe -L -o $zipPath -s -S $Url
118
+ Write-Host "Installing $Name..."
119
+ Expand-Archive -Path $zipPath -DestinationPath $Dir -Force
120
+ }
121
+ catch {
122
+ Write-Error "Failed to install $Name! $($_.Exception.Message)"
123
+ throw
124
+ }
125
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/atomic.cmake ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # has_synchronization_lib.cpp is used in boost-modular-build-helper/Jamroot.jam.in
2
+ file(COPY "${SOURCE_PATH}/config/has_synchronization_lib.cpp" DESTINATION "${CURRENT_PACKAGES_DIR}/share/boost-atomic")
cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/config.cmake ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n")
2
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOST_ALL_DYN_LINK\n")
3
+
4
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
5
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_ALL_DYN_LINK\n")
6
+ endif()
7
+ file(COPY ${SOURCE_PATH}/checks DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-config)
cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/predef.cmake ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+
2
+ file(COPY ${SOURCE_PATH}/tools/check DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-predef)
cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-build-stubs/test.cmake ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
2
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
3
+ file(GLOB MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*)
4
+ file(COPY ${MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
5
+ file(REMOVE ${MONITOR_LIBS})
6
+ endif()
7
+
8
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
9
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
10
+ file(GLOB DEBUG_MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*)
11
+ file(COPY ${DEBUG_MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
12
+ file(REMOVE ${DEBUG_MONITOR_LIBS})
13
+ endif()
cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-source-stubs/math.cmake ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2"
2
+ "import ../../config/checks/config"
3
+ "import ../config/checks/config"
4
+ )
5
+ file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/config")
cc-multilingual-main/cc_net/vcpkg/scripts/boost/post-source-stubs/test.cmake ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2"
2
+ "import ../../predef/check/predef"
3
+ "import ../predef/check/predef"
4
+ )
5
+ file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${SOURCE_PATH}/predef")
cc-multilingual-main/cc_net/vcpkg/scripts/ifw/maintenance.qs ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // constructor
2
+ function Component()
3
+ {
4
+ installer.installationStarted.connect(this, Component.prototype.onInstallationStarted);
5
+ }
6
+
7
+ Component.prototype.onInstallationStarted = function()
8
+ {
9
+ if (component.updateRequested() || component.installationRequested()) {
10
+ if (installer.value("os") == "win")
11
+ component.installerbaseBinaryPath = "@TargetDir@/tempmaintenancetool.exe";
12
+ installer.setInstallerBaseBinary(component.installerbaseBinaryPath);
13
+ }
14
+ }
15
+
16
+ Component.prototype.createOperations = function()
17
+ {
18
+ // call the base createOperations
19
+ component.createOperations();
20
+
21
+ // only for windows online installer
22
+ if ( installer.value("os") == "win" && !installer.isOfflineOnly() )
23
+ {
24
+ // shortcut to add or remove packages
25
+ component.addOperation( "CreateShortcut",
26
+ "@TargetDir@/maintenancetool.exe",
27
+ "@StartMenuDir@/Manage vcpkg.lnk",
28
+ " --manage-packages");
29
+ // shortcut to update packages
30
+ component.addOperation( "CreateShortcut",
31
+ "@TargetDir@/maintenancetool.exe",
32
+ "@StartMenuDir@/Update vcpkg.lnk",
33
+ " --updater");
34
+ }
35
+
36
+ // create uninstall link only for windows
37
+ if (installer.value("os") == "win")
38
+ {
39
+ // shortcut to uninstaller
40
+ component.addOperation( "CreateShortcut",
41
+ "@TargetDir@/maintenancetool.exe",
42
+ "@StartMenuDir@/Uninstall vcpkg.lnk",
43
+ " --uninstall");
44
+ }
45
+ }
46
+
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/portfile.cmake ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
2
+
3
+ set(cmake_commands "")
4
+ if("cmake-current" IN_LIST FEATURES)
5
+ list(APPEND cmake_commands "${CMAKE_COMMAND}")
6
+ endif()
7
+ if("cmake-3-7" IN_LIST FEATURES)
8
+ set(cmake_version 3.7.2)
9
+ string(REGEX REPLACE "([^.]*[.][^.]*).*" "\\1" cmake_major_minor "${cmake_version}")
10
+ if(VCPKG_HOST_IS_WINDOWS)
11
+ set(name "cmake-${cmake_version}-win32-x86")
12
+ vcpkg_download_distfile(legacy_cmake_archive
13
+ FILENAME "${name}.zip"
14
+ URLS "https://github.com/Kitware/CMake/releases/download/v${cmake_version}/${name}.zip"
15
+ "https://cmake.org/files/v${cmake_major_minor}/${name}.zip"
16
+ SHA512 c359a22e2e688da1513db195280d6e8987bc8d570a0c543f1b1dfc8572fe4fd6c23d951ec5d5eae640fcca3bef3ae469083511474796ade8c6319d8bc4e4b38d
17
+ )
18
+ set(cmake_bin_dir "/bin")
19
+ elseif(VCPKG_HOST_IS_OSX)
20
+ set(name "cmake-${cmake_version}-Darwin-x86_64")
21
+ vcpkg_download_distfile(legacy_cmake_archive
22
+ FILENAME "${name}.tar.gz"
23
+ URLS "https://github.com/Kitware/CMake/releases/download/v${cmake_version}/${name}.tar.gz"
24
+ "https://cmake.org/files/v${cmake_major_minor}/${name}.tar.gz"
25
+ SHA512 8e41608f4dd998020acf2bd1b0dab4aec37b3ea9e228f2c4a457cd1c0339d94db38a0548b4b07a9e3605f9beb11a3f6737a72813586c4ad5f730d74038a14c2b
26
+ )
27
+ set(cmake_bin_dir "/CMake.app/Contents/bin")
28
+ elseif(VCPKG_HOST_IS_LINUX)
29
+ set(name "cmake-${cmake_version}-Linux-x86_64")
30
+ vcpkg_download_distfile(legacy_cmake_archive
31
+ FILENAME "${name}.tar.gz"
32
+ URLS "https://github.com/Kitware/CMake/releases/download/v${cmake_version}/${name}.tar.gz"
33
+ "https://cmake.org/files/v${cmake_major_minor}/${name}.tar.gz"
34
+ SHA512 459909fcfb9c74993c3d4ab9db4e31ea940515b670db44d039de611d813099895e695467cc8da24824315486e38e2f3e246aa92d6236c51103822ec8a39e3168
35
+ )
36
+ set(cmake_bin_dir "/bin")
37
+ else()
38
+ message(FATAL_ERROR "Unable to test feature 'cmake-3-7' for '${HOST_TRIPLET}' host.")
39
+ endif()
40
+
41
+ vcpkg_extract_source_archive(legacy_cmake
42
+ ARCHIVE "${legacy_cmake_archive}"
43
+ SOURCE_BASE "${cmake_version}"
44
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/cmake"
45
+ )
46
+ list(APPEND cmake_commands "${legacy_cmake}${cmake_bin_dir}/cmake")
47
+ endif()
48
+
49
+ if(DEFINED ENV{VCPKG_FORCE_SYSTEM_BINARIES})
50
+ set(NINJA "ninja")
51
+ else()
52
+ vcpkg_find_acquire_program(NINJA)
53
+ endif()
54
+
55
+ function(get_packages out_packages cmake_version)
56
+ set(packages "")
57
+ if("find-package" IN_LIST FEATURES)
58
+ file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" vcpkg_json)
59
+ string(JSON packages_json GET "${vcpkg_json}" "features" "find-package" "dependencies")
60
+ string(JSON packages_count LENGTH "${packages_json}")
61
+ if(packages_count GREATER 0)
62
+ math(EXPR last "${packages_count} - 1")
63
+ foreach(i RANGE 0 ${last})
64
+ # Some ports may be excluded via platform expressions,
65
+ # because they don't support particular platforms.
66
+ # Using the installed vcpkg_abi_info.txt as an indicator.
67
+ string(JSON port GET "${packages_json}" "${i}" "name")
68
+ if(NOT EXISTS "${CURRENT_INSTALLED_DIR}/share/${port}/vcpkg_abi_info.txt")
69
+ continue()
70
+ endif()
71
+ string(JSON since ERROR_VARIABLE since_not_found GET "${packages_json}" "${i}" "\$since")
72
+ if(since AND cmake_version VERSION_LESS since)
73
+ continue()
74
+ endif()
75
+ if(NOT EXISTS "${CURRENT_INSTALLED_DIR}/share/${port}/vcpkg_abi_info.txt")
76
+ continue()
77
+ endif()
78
+ string(JSON package GET "${packages_json}" "${i}" "\$package")
79
+ list(APPEND packages "${package}")
80
+ endforeach()
81
+ endif()
82
+ endif()
83
+ if("pkg-check-modules" IN_LIST FEATURES)
84
+ list(APPEND packages "ZLIBviaPkgConfig")
85
+ endif()
86
+ set("${out_packages}" "${packages}" PARENT_SCOPE)
87
+ endfunction()
88
+
89
+ function(test_cmake_project)
90
+ cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "CMAKE_COMMAND;NAME" "OPTIONS")
91
+ if(NOT arg_NAME)
92
+ message(FATAL_ERROR "The NAME argument is mandatory.")
93
+ endif()
94
+ if(NOT arg_CMAKE_COMMAND)
95
+ set(arg_CMAKE_COMMAND "${CMAKE_COMMAND}")
96
+ endif()
97
+
98
+ execute_process(
99
+ COMMAND "${arg_CMAKE_COMMAND}" --version
100
+ OUTPUT_VARIABLE cmake_version_output
101
+ RESULT_VARIABLE cmake_version_result
102
+ )
103
+ string(REGEX MATCH "[1-9][0-9]*\\.[0-9]*\\.[0-9]*" cmake_version "${cmake_version_output}")
104
+ if(cmake_version_result OR NOT cmake_version)
105
+ message(FATAL_ERROR "Unable to determine version for '${arg_CMAKE_COMMAND}'.")
106
+ endif()
107
+
108
+ set(build_dir "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${cmake_version}-${arg_NAME}")
109
+ set(base_options
110
+ # Interface: CMake
111
+ -G "Ninja"
112
+ "-DCMAKE_MAKE_PROGRAM=${NINJA}"
113
+ "-DCMAKE_VERBOSE_MAKEFILE=ON"
114
+ "-DCMAKE_INSTALL_PREFIX=${build_dir}/install"
115
+ "-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS}/buildsystems/vcpkg.cmake"
116
+ # Interface: vcpkg.cmake
117
+ "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}"
118
+ "-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET}"
119
+ "-DVCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}"
120
+ "-DVCPKG_MANIFEST_MODE=OFF"
121
+ # Interface: project/CMakeLists.txt
122
+ "-DCHECK_CMAKE_VERSION=${cmake_version}"
123
+ )
124
+
125
+ if(DEFINED VCPKG_CMAKE_SYSTEM_NAME AND VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
126
+ # Interface: CMake
127
+ list(APPEND base_options "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
128
+ if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
129
+ list(APPEND base_options "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
130
+ endif()
131
+ endif()
132
+
133
+ if(DEFINED VCPKG_XBOX_CONSOLE_TARGET)
134
+ list(APPEND arg_OPTIONS "-DXBOX_CONSOLE_TARGET=${VCPKG_XBOX_CONSOLE_TARGET}")
135
+ endif()
136
+
137
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
138
+ list(APPEND base_options -DBUILD_SHARED_LIBS=ON)
139
+ else()
140
+ list(APPEND base_options -DBUILD_SHARED_LIBS=OFF)
141
+ endif()
142
+
143
+ message(STATUS "Running tests with CMake ${cmake_version} for '${arg_NAME}'")
144
+ file(REMOVE_RECURSE "${build_dir}")
145
+ file(MAKE_DIRECTORY "${build_dir}")
146
+ vcpkg_execute_required_process(
147
+ COMMAND
148
+ "${arg_CMAKE_COMMAND}" "${CMAKE_CURRENT_LIST_DIR}/project"
149
+ ${base_options}
150
+ ${arg_OPTIONS}
151
+ WORKING_DIRECTORY "${build_dir}"
152
+ LOGNAME "${TARGET_TRIPLET}-${cmake_version}-${arg_NAME}-config"
153
+ )
154
+ vcpkg_execute_required_process(
155
+ COMMAND
156
+ "${arg_CMAKE_COMMAND}" --build . --target install
157
+ WORKING_DIRECTORY "${build_dir}"
158
+ LOGNAME "${TARGET_TRIPLET}-${cmake_version}-${arg_NAME}-build"
159
+ )
160
+ # To produce better error messages for failing wrappers,
161
+ # we run execute_process directly here, for each wrapper.
162
+ string(REPLACE " OFF:" ":" message
163
+ " CMake ${cmake_version}: @step@ with `find_package(@package@)` failed.\n"
164
+ " See logs for more information:\n"
165
+ " @log_out@\n"
166
+ " @log_err@\n"
167
+ )
168
+ if(DEFINED ENV{BUILD_REASON}) # On Azure Pipelines, add extra markup.
169
+ string(REPLACE " CMake" "##vso[task.logissue type=error]CMake" message "${message}")
170
+ endif()
171
+ get_packages(packages "${cmake_version}")
172
+ foreach(package IN LISTS packages)
173
+ string(MAKE_C_IDENTIFIER "${package}" package_string)
174
+ set(find_package_build_dir "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${cmake_version}-find-package-${package_string}-${arg_NAME}")
175
+ set(log_out "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${cmake_version}-find-package-${package_string}-${arg_NAME}-out.log")
176
+ set(log_err "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${cmake_version}-find-package-${package_string}-${arg_NAME}-err.log")
177
+
178
+ message(STATUS " find_package(${package})")
179
+ file(REMOVE_RECURSE "${find_package_build_dir}")
180
+ file(MAKE_DIRECTORY "${find_package_build_dir}")
181
+ execute_process(
182
+ COMMAND
183
+ "${arg_CMAKE_COMMAND}" "${CMAKE_CURRENT_LIST_DIR}/project"
184
+ ${base_options}
185
+ ${arg_OPTIONS}
186
+ "-DFIND_PACKAGES=${package}"
187
+ OUTPUT_FILE "${log_out}"
188
+ ERROR_FILE "${log_err}"
189
+ RESULT_VARIABLE package_result
190
+ WORKING_DIRECTORY "${find_package_build_dir}"
191
+ )
192
+ if(package_result)
193
+ set(step "configuration")
194
+ string(CONFIGURE "${message}" package_message @ONLY)
195
+ message(SEND_ERROR "${package_message}")
196
+ else()
197
+ set(log_out "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${cmake_version}-find-package-${package_string}-${arg_NAME}-build-out.log")
198
+ set(log_err "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${cmake_version}-find-package-${package_string}-${arg_NAME}-build-err.log")
199
+ execute_process(
200
+ COMMAND
201
+ "${arg_CMAKE_COMMAND}" --build .
202
+ OUTPUT_FILE "${log_out}"
203
+ ERROR_FILE "${log_err}"
204
+ RESULT_VARIABLE package_result
205
+ WORKING_DIRECTORY "${find_package_build_dir}"
206
+ )
207
+ if(package_result)
208
+ set(step "build")
209
+ string(CONFIGURE "${message}" package_message @ONLY)
210
+ message(SEND_ERROR "${package_message}")
211
+ endif()
212
+ endif()
213
+ endforeach()
214
+ endfunction()
215
+
216
+ foreach(executable IN LISTS cmake_commands)
217
+ test_cmake_project(NAME "release"
218
+ CMAKE_COMMAND "${executable}"
219
+ OPTIONS
220
+ "-DCMAKE_BUILD_TYPE=Release"
221
+ )
222
+ test_cmake_project(NAME "debug"
223
+ CMAKE_COMMAND "${executable}"
224
+ OPTIONS
225
+ "-DCMAKE_BUILD_TYPE=Debug"
226
+ )
227
+ endforeach()
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/project/CMakeLists.txt ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.4)
2
+ project(cmake-user LANGUAGES C)
3
+
4
+ message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}")
5
+ set(CHECK_CMAKE_VERSION "NOTFOUND" CACHE STRING "Version of CMake expected to be found")
6
+ if(NOT CHECK_CMAKE_VERSION)
7
+ message(WARNING "CMake version check: skipped (actual: ${CMAKE_VERSION})")
8
+ elseif(NOT CHECK_CMAKE_VERSION VERSION_EQUAL CMAKE_VERSION)
9
+ message(SEND_ERROR "CMake version check: failed (actual: ${CMAKE_VERSION} expected: ${CHECK_CMAKE_VERSION})")
10
+ else()
11
+ message(STATUS "CMake version check: success (actual: ${CMAKE_VERSION})")
12
+ endif()
13
+
14
+ # add_library overload
15
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lib.c" "int lib_unused() { return 1; }")
16
+ add_library(lib "${CMAKE_CURRENT_BINARY_DIR}/lib.c")
17
+
18
+ # add_executable overload
19
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/exe.c" "int main() { return 0; }")
20
+ add_executable(exe "${CMAKE_CURRENT_BINARY_DIR}/exe.c")
21
+
22
+ # install overload
23
+ set(X_VCPKG_APPLOCAL_DEPS_INSTALL 1)
24
+ install(TARGETS exe lib
25
+ RUNTIME DESTINATION bin
26
+ ARCHIVE DESTINATION lib
27
+ LIBRARY DESTINATION lib
28
+ )
29
+
30
+ # find_package overload and wrapper
31
+ set(FIND_PACKAGES "" CACHE STRING "List of packages to be found and used")
32
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
33
+ foreach(package ${FIND_PACKAGES})
34
+ string(TOUPPER "${package}" package_upper)
35
+ set(CMAKE_FIND_DEBUG_MODE ON)
36
+ find_package("${package}" QUIET)
37
+ set(CMAKE_FIND_DEBUG_MODE OFF)
38
+ if(NOT ${package}_FOUND AND NOT ${package_upper}_FOUND)
39
+ message(SEND_ERROR "find_package(${package}) check: failed")
40
+ continue()
41
+ endif()
42
+ # REQUIRED changes the behaviour find_package_handle_standard_args.
43
+ find_package("${package}" REQUIRED)
44
+ message(STATUS "find_package(${package}) check: success")
45
+
46
+ set(libraries_var "")
47
+ if(DEFINED ${package}_LIBRARIES)
48
+ set(libraries_var "${package}_LIBRARIES")
49
+ elseif(DEFINED ${package_upper}_LIBRARIES)
50
+ set(libraries_var "${package_upper}_LIBRARIES")
51
+ elseif(DEFINED ${package}_LIBRARY)
52
+ set(libraries_var "${package}_LIBRARY")
53
+ elseif(DEFINED ${package_upper}_LIBRARY)
54
+ set(libraries_var "${package_upper}_LIBRARY")
55
+ else()
56
+ message(STATUS "${package}_LIBRARY/IES: undefined")
57
+ continue()
58
+ endif()
59
+ set(libraries "${${libraries_var}}")
60
+ message(STATUS "${libraries_var}: ${libraries}")
61
+
62
+ if(package STREQUAL "Intl" AND NOT Intl_LIBRARY)
63
+ continue() # using libintl.h from C runtime library
64
+ endif()
65
+ target_link_libraries(exe PRIVATE ${libraries})
66
+
67
+ set(last_keyword "")
68
+ foreach(item IN LISTS libraries)
69
+ if(item STREQUAL "optimized" OR item STREQUAL "debug")
70
+ set(last_keyword "${item}")
71
+ continue()
72
+ endif()
73
+ string(FIND "${item}" "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/" starts_with_release)
74
+ string(FIND "${item}" "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/" starts_with_debug)
75
+ if(starts_with_release EQUAL "0")
76
+ if(last_keyword STREQUAL "optimized")
77
+ # okay
78
+ elseif(last_keyword STREQUAL "debug")
79
+ message(SEND_ERROR "Release lib for 'debug' keyword: ${item}")
80
+ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
81
+ message(SEND_ERROR "Release lib for 'Debug' build: ${item}")
82
+ endif()
83
+ elseif(starts_with_debug EQUAL "0")
84
+ if(last_keyword STREQUAL "debug")
85
+ # okay
86
+ elseif(last_keyword STREQUAL "optimized")
87
+ message(SEND_ERROR "Debug lib for 'optimized' keyword: ${item}")
88
+ elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
89
+ message(SEND_ERROR "Debug lib for 'Release' build: ${item}")
90
+ endif()
91
+ endif()
92
+ set(last_keyword "")
93
+ continue()
94
+ endforeach()
95
+ endforeach()
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/project/FindZLIBviaPkgConfig.cmake ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # `pkgconf` is not recognized before CMake 3.22
2
+ find_program(PKG_CONFIG_EXECUTABLE NAMES pkgconf REQUIRED)
3
+ find_package(PkgConfig REQUIRED)
4
+ pkg_check_modules(PC_ZLIB zlib)
5
+ if(PC_ZLIB_FOUND)
6
+ if(NOT PC_ZLIB_LDFLAGS)
7
+ message(SEND_ERROR "ZLIBviaPkgConfig_LIBRARIES is empty")
8
+ endif()
9
+ set(ZLIBviaPkgConfig_LIBRARIES "${PC_ZLIB_LDFLAGS}")
10
+ set(ZLIBviaPkgConfig_FOUND "${PC_ZLIB_FOUND}")
11
+ endif()
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake-user/vcpkg.json ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "cmake-user",
3
+ "version-date": "2022-11-12",
4
+ "description": "Test port to verify the vcpkg toolchain in cmake user projects",
5
+ "license": "MIT",
6
+ "default-features": [
7
+ "ci"
8
+ ],
9
+ "features": {
10
+ "ci": {
11
+ "description": "The CI set of features to test",
12
+ "dependencies": [
13
+ {
14
+ "name": "cmake-user",
15
+ "default-features": false,
16
+ "features": [
17
+ "cmake-current",
18
+ "find-package",
19
+ "pkg-check-modules"
20
+ ]
21
+ },
22
+ {
23
+ "name": "cmake-user",
24
+ "default-features": false,
25
+ "features": [
26
+ "cmake-3-7"
27
+ ],
28
+ "platform": "x64 & (windows | linux | osx) & !uwp"
29
+ }
30
+ ]
31
+ },
32
+ "cmake-3-7": {
33
+ "description": "Run the tests with CMake 3.7"
34
+ },
35
+ "cmake-current": {
36
+ "description": "Run the tests with vcpkg's current version of CMake"
37
+ },
38
+ "find-package": {
39
+ "description": "Ports to be tested via find_package($package)",
40
+ "dependencies": [
41
+ {
42
+ "$package": "Boost",
43
+ "name": "boost",
44
+ "platform": "!uwp"
45
+ },
46
+ {
47
+ "$package": "BZip2",
48
+ "name": "bzip2"
49
+ },
50
+ {
51
+ "$package": "CURL",
52
+ "name": "curl",
53
+ "default-features": false
54
+ },
55
+ {
56
+ "$package": "EXPAT",
57
+ "name": "expat"
58
+ },
59
+ {
60
+ "$package": "Fontconfig",
61
+ "$since": "3.14",
62
+ "name": "fontconfig",
63
+ "platform": "!mingw & !uwp"
64
+ },
65
+ {
66
+ "$comment": "CMake 3.13 for debug postfix support",
67
+ "$package": "GLUT",
68
+ "$since": "3.13",
69
+ "name": "freeglut",
70
+ "platform": "!uwp & !osx"
71
+ },
72
+ {
73
+ "$package": "Freetype",
74
+ "name": "freetype",
75
+ "default-features": false
76
+ },
77
+ {
78
+ "$comment": "CMake 3.9 for find_dependency forwarding extra arguments",
79
+ "$package": "GDAL",
80
+ "$since": "3.9",
81
+ "name": "gdal",
82
+ "default-features": false,
83
+ "platform": "!uwp"
84
+ },
85
+ {
86
+ "$package": "Intl",
87
+ "name": "gettext-libintl"
88
+ },
89
+ {
90
+ "$package": "GIF",
91
+ "name": "giflib"
92
+ },
93
+ {
94
+ "$package": "ICU",
95
+ "name": "icu",
96
+ "platform": "!uwp"
97
+ },
98
+ {
99
+ "$package": "LAPACK",
100
+ "name": "lapack",
101
+ "platform": "!(uwp & arm)"
102
+ },
103
+ {
104
+ "$package": "Iconv",
105
+ "$since": "3.11",
106
+ "name": "libiconv"
107
+ },
108
+ {
109
+ "$package": "JPEG",
110
+ "name": "libjpeg-turbo"
111
+ },
112
+ {
113
+ "$package": "LibLZMA",
114
+ "name": "liblzma"
115
+ },
116
+ {
117
+ "$package": "PNG",
118
+ "name": "libpng"
119
+ },
120
+ {
121
+ "$package": "PostgreSQL",
122
+ "name": "libpq",
123
+ "default-features": false,
124
+ "platform": "!uwp & !mingw"
125
+ },
126
+ {
127
+ "$comment": "CMake 3.11 because it needs Iconv",
128
+ "$package": "LibXml2",
129
+ "$since": "3.11",
130
+ "name": "libxml2",
131
+ "default-features": false
132
+ },
133
+ {
134
+ "$comment": "CMake 3.11 because it needs Iconv",
135
+ "$package": "LibXslt",
136
+ "$since": "3.11",
137
+ "name": "libxslt",
138
+ "default-features": false,
139
+ "platform": "!uwp & !mingw"
140
+ },
141
+ {
142
+ "$package": "Curses",
143
+ "name": "ncurses",
144
+ "platform": "!windows | mingw"
145
+ },
146
+ {
147
+ "$package": "PhysFS",
148
+ "name": "physfs"
149
+ },
150
+ {
151
+ "$package": "SQLite3",
152
+ "$since": "3.14",
153
+ "name": "sqlite3",
154
+ "default-features": false
155
+ },
156
+ {
157
+ "$package": "TIFF",
158
+ "name": "tiff",
159
+ "default-features": false,
160
+ "features": [
161
+ "lerc",
162
+ "libdeflate",
163
+ "zstd"
164
+ ]
165
+ },
166
+ {
167
+ "$package": "wxWidgets",
168
+ "name": "wxwidgets",
169
+ "default-features": false,
170
+ "platform": "!uwp"
171
+ },
172
+ {
173
+ "$package": "ZLIB",
174
+ "name": "zlib"
175
+ }
176
+ ]
177
+ },
178
+ "pkg-check-modules": {
179
+ "description": "Test `find_package(PkgConfig)` and pkg_check_modules(...)",
180
+ "dependencies": [
181
+ {
182
+ "name": "pkgconf",
183
+ "host": true
184
+ },
185
+ "zlib"
186
+ ]
187
+ }
188
+ }
189
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake/fix-dependency-libuv.patch ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index fdfe456..ef2d329 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -647,16 +647,16 @@ macro (CMAKE_BUILD_UTILITIES)
6
+ #---------------------------------------------------------------------
7
+ # Build libuv library.
8
+ if(CMAKE_USE_SYSTEM_LIBUV)
9
+ - if(WIN32)
10
+ - find_package(LibUV 1.38.0)
11
+ - else()
12
+ - find_package(LibUV 1.10.0)
13
+ - endif()
14
+ - if(NOT LIBUV_FOUND)
15
+ + find_package(libuv CONFIG REQUIRED)
16
+ + if(0)
17
+ message(FATAL_ERROR
18
+ "CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
19
+ endif()
20
+ - set(CMAKE_LIBUV_LIBRARIES LibUV::LibUV)
21
+ + if (TARGET libuv::uv)
22
+ + set(CMAKE_LIBUV_LIBRARIES libuv::uv)
23
+ + else()
24
+ + set(CMAKE_LIBUV_LIBRARIES libuv::uv_a)
25
+ + endif()
26
+ else()
27
+ set(CMAKE_LIBUV_LIBRARIES cmlibuv)
28
+ add_subdirectory(Utilities/cmlibuv)
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake/portfile.cmake ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
2
+ vcpkg_from_gitlab(
3
+ GITLAB_URL https://gitlab.kitware.com/
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO cmake/cmake
6
+ REF
7
+ 8428e39ed9cddb3b7f1a6f7a58cb8617503183d2
8
+ SHA512
9
+ 12df5d68aad6bf1bfa34c3a83b428e1ecdc0b2b746e92bf71157eec4b4c114c86f21e91509f26f5da6e8916941563750e63cc3218970eaba33d6de231599de34
10
+ HEAD_REF master
11
+ PATCHES fix-dependency-libuv.patch
12
+ )
13
+ set(OPTIONS)
14
+ if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
15
+ list(APPEND OPTIONS "-DBUILD_CursesDialog=ON")
16
+ else()
17
+ list(APPEND OPTIONS "-DBUILD_CursesDialog=OFF")
18
+ endif()
19
+
20
+ if(VCPKG_CROSSCOMPILING)
21
+ list(APPEND OPTIONS "-DQt6CoreTools_DIR=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6CoreTools")
22
+ list(APPEND OPTIONS "-DQt6WidgetsTools_DIR=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6WidgetsTools")
23
+ list(APPEND OPTIONS "-DQt6GuiTools_DIR=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6GuiTools")
24
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) # Remove if PR #16111 is merged
25
+ list(APPEND OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows)
26
+ endif()
27
+ endif()
28
+
29
+ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
30
+ set(VCPKG_CXX_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_CXX_FLAGS}")
31
+ set(VCPKG_C_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_C_FLAGS}")
32
+ endif()
33
+
34
+ vcpkg_cmake_configure(
35
+ SOURCE_PATH "${SOURCE_PATH}"
36
+ OPTIONS
37
+ ${OPTIONS}
38
+ -DBUILD_TESTING=OFF
39
+ #-DCMAKE_USE_SYSTEM_LIBRARIES=ON
40
+ -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON
41
+ -DCMAKE_USE_SYSTEM_CURL=ON
42
+ -DCMAKE_USE_SYSTEM_EXPAT=ON
43
+ -DCMAKE_USE_SYSTEM_ZLIB=ON
44
+ -DCMAKE_USE_SYSTEM_BZIP2=ON
45
+ -DCMAKE_USE_SYSTEM_ZSTD=ON
46
+ -DCMAKE_USE_SYSTEM_FORM=ON
47
+ -DCMAKE_USE_SYSTEM_JSONCPP=ON
48
+ -DCMAKE_USE_SYSTEM_LIBRHASH=OFF # not yet in VCPKG
49
+ -DCMAKE_USE_SYSTEM_LIBUV=ON
50
+ -DBUILD_QtDialog=ON # Just to test Qt with CMake
51
+ -DCMake_QT_MAJOR_VERSION:STRING=6
52
+ )
53
+
54
+ vcpkg_cmake_install(ADD_BIN_TO_PATH)
55
+ vcpkg_copy_pdbs()
56
+
57
+ if(NOT VCPKG_TARGET_IS_OSX)
58
+ set(_tools cmake cmake-gui ctest cpack)
59
+ if(VCPKG_TARGET_IS_WINDOWS)
60
+ list(APPEND _tools cmcldeps)
61
+ endif()
62
+ if(BUILD_CURSES_DIALOG)
63
+ list(APPEND _tools ccmake)
64
+ endif()
65
+ vcpkg_copy_tools(TOOL_NAMES ${_tools} AUTO_CLEAN)
66
+ else()
67
+ # On OSX everything is within a CMake.app folder
68
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools")
69
+ file(RENAME "${CURRENT_PACKAGES_DIR}/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/CMake.app")
70
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/CMake.app")
71
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/debug")
72
+ file(RENAME "${CURRENT_PACKAGES_DIR}/debug/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/debug/CMake.app")
73
+ endif()
74
+ endif()
75
+
76
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
77
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
78
+
79
+ # Handle copyright
80
+ configure_file("${SOURCE_PATH}/Copyright.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/cmake/vcpkg.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "cmake",
3
+ "version": "3.22.2",
4
+ "port-version": 4,
5
+ "description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software.",
6
+ "homepage": "https://cmake.org/",
7
+ "license": "BSD-3-Clause",
8
+ "dependencies": [
9
+ "bzip2",
10
+ "curl",
11
+ "expat",
12
+ "jsoncpp",
13
+ "libarchive",
14
+ "liblzma",
15
+ "libuv",
16
+ {
17
+ "name": "ncurses",
18
+ "platform": "!(windows | uwp)"
19
+ },
20
+ "nghttp2",
21
+ "qtbase",
22
+ {
23
+ "name": "vcpkg-cmake",
24
+ "host": true
25
+ },
26
+ "zlib",
27
+ "zstd"
28
+ ]
29
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/llfio-run-tests/portfile.cmake ADDED
@@ -0,0 +1 @@
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/llfio-run-tests/vcpkg.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "llfio-run-tests",
3
+ "version-string": "0",
4
+ "port-version": 1,
5
+ "description": "Ensures that LLFIO built with vcpkg version of dependencies produces working executables.",
6
+ "supports": "x64",
7
+ "dependencies": [
8
+ {
9
+ "name": "llfio",
10
+ "features": [
11
+ "run-tests"
12
+ ]
13
+ },
14
+ {
15
+ "name": "llfio",
16
+ "features": [
17
+ "run-tests",
18
+ "status-code"
19
+ ]
20
+ }
21
+ ]
22
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/test-vcpkg_fixup_pkgconfig.cmake ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
2
+ set(pc_file_release "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/unit-test-cmake.pc")
3
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
4
+ set(pc_file_debug "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/unit-test-cmake.pc")
5
+ set(reload_pc_strings 0)
6
+
7
+ function(write_pkgconfig)
8
+ file(WRITE "${pc_file_release}" ${ARGN})
9
+ file(WRITE "${pc_file_debug}" ${ARGN})
10
+ file(STRINGS "${pc_file_release}" pc_strings_input)
11
+ set(pc_strings_INPUT "${pc_strings_input}" PARENT_SCOPE)
12
+ set(reload_pc_strings 1 PARENT_SCOPE)
13
+ endfunction()
14
+
15
+ function(unit_test_pkgconfig_check_key build_types field value)
16
+ if(NOT build_types)
17
+ message(SEND_ERROR "The build_type parameter must be list of debug;release.")
18
+ endif()
19
+ if(reload_pc_strings)
20
+ file(STRINGS "${pc_file_release}" pc_strings_release)
21
+ file(STRINGS "${pc_file_debug}" pc_strings_debug)
22
+ set(pc_strings_release "${pc_strings_release}" PARENT_SCOPE)
23
+ set(pc_strings_debug "${pc_strings_debug}" PARENT_SCOPE)
24
+ set(reload_pc_strings 0 PARENT_SCOPE)
25
+ endif()
26
+ foreach(build_type IN LISTS build_types)
27
+ set(listname "pc_strings_${build_type}")
28
+ set(expected "${field}${value}")
29
+ list(FILTER ${listname} INCLUDE REGEX "^${field}")
30
+ if(NOT "${${listname}}" STREQUAL "${expected}" AND NOT "${${listname}}_is_empty" STREQUAL "${value}_is_empty")
31
+ string(REPLACE "\$" "\\\$" pc_strings_INPUT "${pc_strings_INPUT}")
32
+ string(REPLACE "\$" "\\\$" expected "${expected}")
33
+ string(REPLACE "\$" "\\\$" "${listname}" "${${listname}}")
34
+ message(SEND_ERROR "vcpkg_fixup_pkgconfig() resulted in a wrong value for ${build_type} builds;
35
+ input : [[${pc_strings_INPUT}]]
36
+ expected: [[${expected}]]
37
+ actual : [[${${listname}}]]")
38
+ set_has_error()
39
+ return()
40
+ endif()
41
+ endforeach()
42
+ endfunction()
43
+
44
+ # "Libs:" only
45
+ write_pkgconfig([[
46
+ Libs: -L${prefix}/lib -l"aaa"
47
+ ]])
48
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
49
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -laaa]])
50
+
51
+ # "Libs:" and "Libs.private:"
52
+ write_pkgconfig([[
53
+ Libs: -L"${prefix}/lib" -l"aaa"
54
+ Libs.private: -l"bbb ccc"
55
+ ]])
56
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
57
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
58
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -laaa "-lbbb ccc"]])
59
+ unit_test_pkgconfig_check_key("debug;release" "Libs.private:" "")
60
+ else()
61
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -laaa]])
62
+ endif()
63
+
64
+ # line continuations
65
+ write_pkgconfig([[
66
+ Libs.private: \
67
+ -lbbb
68
+ Libs: -L"${prefix}/lib" \
69
+ -l"aaa"
70
+ ]])
71
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
72
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
73
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -laaa -lbbb]])
74
+ unit_test_pkgconfig_check_key("debug;release" "Libs.private:" "")
75
+ else()
76
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -laaa]])
77
+ endif()
78
+
79
+ # Replace ';' with ' '
80
+ write_pkgconfig([[
81
+ Libs: -L${prefix}/lib\;-l"aaa"
82
+ Libs.private: -lbbb\;-l"ccc"
83
+ ]])
84
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
85
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
86
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -laaa -lbbb -lccc]])
87
+ unit_test_pkgconfig_check_key("debug;release" "Libs.private:" "")
88
+ else()
89
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -laaa]])
90
+ endif()
91
+
92
+ # invalid: ...-NOTFOUND
93
+ write_pkgconfig([[Libs: LIB-NOTFOUND]])
94
+ # Only warning: unit_test_ensure_fatal_error([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) # ...-NOTFOUND # ]])
95
+
96
+ # invalid: optimized/debug
97
+ write_pkgconfig([[Libs: -laaa -loptimized -lrel -ldebug -ldbg -lbbb]])
98
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
99
+ unit_test_pkgconfig_check_key("debug" "Libs:" [[ -laaa -ldbg -lbbb]])
100
+ unit_test_pkgconfig_check_key("release" "Libs:" [[ -laaa -lrel -lbbb]])
101
+
102
+ write_pkgconfig([[Libs: -laaa -Loptimized -Lrel -Ldebug -Ldbg -lbbb]])
103
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
104
+ unit_test_pkgconfig_check_key("debug" "Libs:" [[ -laaa -Ldbg -lbbb]])
105
+ unit_test_pkgconfig_check_key("release" "Libs:" [[ -laaa -Lrel -lbbb]])
106
+
107
+ write_pkgconfig([[Libs: optimized\;librel.a\;debug\;libdbg.a\;aaa.lib]])
108
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
109
+ unit_test_pkgconfig_check_key("debug" "Libs:" [[ libdbg.a aaa.lib]])
110
+ unit_test_pkgconfig_check_key("release" "Libs:" [[ librel.a aaa.lib]])
111
+
112
+ write_pkgconfig([[Libs: aaa.lib\;optimized\;librel.a\;debug\;libdbg.a]])
113
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
114
+ unit_test_pkgconfig_check_key("debug" "Libs:" [[ aaa.lib libdbg.a]])
115
+ unit_test_pkgconfig_check_key("release" "Libs:" [[ aaa.lib librel.a]])
116
+
117
+ write_pkgconfig([[Libs: aaa.lib optimized librel.a debug libdbg.a bbb.lib]])
118
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
119
+ unit_test_pkgconfig_check_key("debug" "Libs:" [[ aaa.lib libdbg.a bbb.lib]])
120
+ unit_test_pkgconfig_check_key("release" "Libs:" [[ aaa.lib librel.a bbb.lib]])
121
+
122
+ # invalid: namespaced targets
123
+ write_pkgconfig([[Libs: -lAAA::aaa]])
124
+ # Only warning: unit_test_ensure_fatal_error([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) # namespaced target # ]])
125
+
126
+ # prefix
127
+ write_pkgconfig(
128
+ "prefix=${CURRENT_PACKAGES_DIR}
129
+ execprefix=\${prefix}
130
+ libdir=${CURRENT_PACKAGES_DIR}/lib
131
+ includedir=${CURRENT_PACKAGES_DIR}/include
132
+ datarootdir=${CURRENT_PACKAGES_DIR}/share
133
+ datadir=\${datarootdir}/${PORT}
134
+ ")
135
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
136
+ unit_test_pkgconfig_check_key("release" "prefix=" [[${pcfiledir}/../..]])
137
+ unit_test_pkgconfig_check_key("release" "execprefix=" [[${prefix}]])
138
+ unit_test_pkgconfig_check_key("release" "libdir=" [[${prefix}/lib]])
139
+ unit_test_pkgconfig_check_key("release" "includedir=" [[${prefix}/include]])
140
+ unit_test_pkgconfig_check_key("release" "datarootdir=" [[${prefix}/share]])
141
+ unit_test_pkgconfig_check_key("release" "datadir=" [[${datarootdir}/unit-test-cmake]])
142
+
143
+ write_pkgconfig(
144
+ "prefix=${CURRENT_PACKAGES_DIR}/debug
145
+ execprefix=\${prefix}
146
+ libdir=${CURRENT_PACKAGES_DIR}/debug/lib
147
+ includedir=${CURRENT_PACKAGES_DIR}/include
148
+ datarootdir=${CURRENT_PACKAGES_DIR}/share
149
+ datadir=\${datarootdir}/${PORT}
150
+ ")
151
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
152
+ unit_test_pkgconfig_check_key("debug" "prefix=" [[${pcfiledir}/../..]])
153
+ unit_test_pkgconfig_check_key("debug" "execprefix=" [[${prefix}]])
154
+ unit_test_pkgconfig_check_key("debug" "libdir=" [[${prefix}/lib]])
155
+ unit_test_pkgconfig_check_key("debug" "includedir=" [[${prefix}/../include]])
156
+ unit_test_pkgconfig_check_key("debug" "datarootdir=" [[${prefix}/../share]])
157
+ unit_test_pkgconfig_check_key("debug" "datadir=" [[${datarootdir}/unit-test-cmake]])
158
+
159
+ # -I, -l or -L with ${blah} in variables
160
+ write_pkgconfig([[blah_libs=-L${blah}/lib64 -l${blah}/libblah.a -I${blah}/include]])
161
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
162
+ unit_test_pkgconfig_check_key("debug;release" "blah_libs=" [["-L${blah}/lib64" "-l${blah}/libblah.a" "-I${blah}/include"]])
163
+
164
+ # plain vs. quoted items
165
+ write_pkgconfig([[Libs: ${blah} "${quoted}" plain "C:/Program Files/blah.lib"]])
166
+ unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
167
+ unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ ${blah} "${quoted}" plain "C:/Program Files/blah.lib"]])
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/test-vcpkg_minimum_required.cmake ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -- error cases --
2
+ # VCPKG_BASE_VERSION not set - vcpkg version is too old
3
+ set(VCPKG_BASE_VERSION_backup "${VCPKG_BASE_VERSION}")
4
+ unset(VCPKG_BASE_VERSION)
5
+ unset(VCPKG_BASE_VERSION CACHE)
6
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-01-01)]])
7
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required()]])
8
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "")]])
9
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "2021.01.01")]])
10
+
11
+ set(VCPKG_BASE_VERSION 2021-02-02)
12
+
13
+ # VERSION not passed
14
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required()]])
15
+ # VERSION weird - empty
16
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "")]])
17
+ # VERSION weird - dotted
18
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021.01.01)]])
19
+ # VERSION weird - not a valid year
20
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 3000-01-01)]])
21
+ # VERSION weird - list
22
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "2021-01-01;2021-01-02")]])
23
+ # VERSION weird - small year
24
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 21-01-01)]])
25
+ # VERSION weird - small month
26
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-1-01)]])
27
+ # VERSION weird - small day
28
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-01-1)]])
29
+ # VERSION too-new - later year, earlier month, earlier day
30
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2022-01-01)]])
31
+ # VERSION too-new - same year, later month, earlier day
32
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-03-01)]])
33
+ # VERSION too-new - same year, same month, later day
34
+ unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-02-03)]])
35
+
36
+ # -- successes --
37
+ # same date
38
+ unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2021-02-02)]])
39
+
40
+ # VERSION old - earlier year, later month, later day
41
+ unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2020-03-03)]])
42
+ # VERSION old - same year, earlier month, later day
43
+ unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2021-01-03)]])
44
+ # VERSION old - same year, same month, earlier day
45
+ unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2021-02-01)]])
46
+
47
+ # reset to backup
48
+ unset(VCPKG_BASE_VERSION)
49
+ set(VCPKG_BASE_VERSION "${VCPKG_BASE_VERSION_backup}" CACHE STRING "")
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/test-z_vcpkg_cmake_config_fixup_merge.cmake ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # z_vcpkg_cmake_config_fixup_merge(<out_list> <release_list> <debug_list>)
2
+ set(release_libs namespace::C++_shared)
3
+ set(debug_libs namespace::C++_shared)
4
+ unit_test_check_variable_equal(
5
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
6
+ merged "namespace::C++_shared"
7
+ )
8
+
9
+ set(release_libs A)
10
+ set(debug_libs B)
11
+ unit_test_check_variable_equal(
12
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
13
+ merged [[\$<\$<NOT:\$<CONFIG:DEBUG>>:A>;\$<\$<CONFIG:DEBUG>:B>]]
14
+ )
15
+
16
+ set(release_libs A B)
17
+ set(debug_libs A )
18
+ unit_test_check_variable_equal(
19
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
20
+ merged [[A;\$<\$<NOT:\$<CONFIG:DEBUG>>:B>]]
21
+ )
22
+
23
+ set(release_libs A )
24
+ set(debug_libs A B)
25
+ unit_test_check_variable_equal(
26
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
27
+ merged [[A;\$<\$<CONFIG:DEBUG>:B>]]
28
+ )
29
+
30
+ set(release_libs A C)
31
+ set(debug_libs C)
32
+ unit_test_check_variable_equal(
33
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
34
+ merged [[\$<\$<NOT:\$<CONFIG:DEBUG>>:A>;\$<\$<CONFIG:DEBUG>:C>;\$<\$<NOT:\$<CONFIG:DEBUG>>:C>]]
35
+ )
36
+
37
+ set(release_libs [[\$<\$<NOT:\$<CONFIG:DEBUG>>:A>;\$<\$<CONFIG:DEBUG>:B>]])
38
+ set(debug_libs [[\$<\$<NOT:\$<CONFIG:DEBUG>>:A>;\$<\$<CONFIG:DEBUG>:B>]])
39
+ unit_test_check_variable_equal(
40
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
41
+ merged [[\$<\$<NOT:\$<CONFIG:DEBUG>>:A>;\$<\$<CONFIG:DEBUG>:B>]]
42
+ )
43
+
44
+ set(release_libs optimized o1 debug d1)
45
+ set(debug_libs optimized o2 debug d2)
46
+ unit_test_check_variable_equal(
47
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
48
+ merged [[\$<\$<NOT:\$<CONFIG:DEBUG>>:o1>;\$<\$<CONFIG:DEBUG>:d2>]]
49
+ )
50
+
51
+ set(release_libs debug d1 optimized o1)
52
+ set(debug_libs debug d2 optimized o2)
53
+ unit_test_check_variable_equal(
54
+ [[z_vcpkg_cmake_config_fixup_merge(merged release_libs debug_libs)]]
55
+ merged [[\$<\$<CONFIG:DEBUG>:d2>;\$<\$<NOT:\$<CONFIG:DEBUG>>:o1>]]
56
+ )
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/unit-test-cmake/vcpkg.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "unit-test-cmake",
3
+ "version-string": "0",
4
+ "description": "Ensures that the CMake scripts are unit tested.",
5
+ "license": "MIT",
6
+ "supports": "x64",
7
+ "default-features": [
8
+ "backup-restore-env-vars",
9
+ "fixup-pkgconfig",
10
+ "function-arguments",
11
+ "host-path-list",
12
+ "list",
13
+ "merge-libs",
14
+ "minimum-required",
15
+ "setup-pkgconfig-path"
16
+ ],
17
+ "features": {
18
+ "backup-restore-env-vars": {
19
+ "description": "Test the vcpkg_backup/restore_env_vars functions"
20
+ },
21
+ "fixup-pkgconfig": {
22
+ "description": "Test the vcpkg_fixup_pkgconfig function"
23
+ },
24
+ "function-arguments": {
25
+ "description": "Test the z_vcpkg_function_arguments function"
26
+ },
27
+ "host-path-list": {
28
+ "description": "Test the vcpkg_host_path_list function"
29
+ },
30
+ "list": {
31
+ "description": "Test the vcpkg_list function"
32
+ },
33
+ "merge-libs": {
34
+ "description": "Test the z_vcpkg_cmake_config_fixup_merge_lists function",
35
+ "dependencies": [
36
+ {
37
+ "name": "vcpkg-cmake-config",
38
+ "host": true
39
+ }
40
+ ]
41
+ },
42
+ "minimum-required": {
43
+ "description": "Test the vcpkg_minimum_required function"
44
+ },
45
+ "setup-pkgconfig-path": {
46
+ "description": "Test the z_vcpkg_setup/restore_pkgconfig_path functions"
47
+ }
48
+ }
49
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-acquire-msys-test/portfile.cmake ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
2
+
3
+ vcpkg_acquire_msys(MSYS_ROOT Z_ALL_PACKAGES)
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-acquire-msys-test/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vcpkg-acquire-msys-test",
3
+ "version-string": "0",
4
+ "port-version": 1,
5
+ "description": "Test port to exercise vcpkg_acquire_msys",
6
+ "supports": "x86 & windows"
7
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/portfile.cmake ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
2
+
3
+ vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
4
+ vcpkg_cmake_build()
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/project/CMakeLists.txt ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.12)
2
+
3
+ project(embedresource-test VERSION 0.0.1)
4
+
5
+ set(CMAKE_CXX_STANDARD 17)
6
+
7
+ find_package(EmbedResource REQUIRED)
8
+
9
+ file(SIZE "${CMAKE_CURRENT_LIST_DIR}/main.cpp" MAIN_CPP_FILE_SIZE)
10
+ file(SIZE "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" CMAKELISTS_TXT_FILE_SIZE)
11
+
12
+ add_resource_library(sample_test_resources OBJECT RESOURCE_COLLECTION_NAME testdata1 RESOURCES main.cpp GENERATOR_COMMAND echo "CMakeLists.txt" GENERATOR_DEPEND CMakeLists.txt)
13
+ add_resource_library(testdata3 OBJECT RESOURCES main.cpp)
14
+
15
+ macro(setup_target target)
16
+ target_add_resource(${target} RESOURCE_COLLECTION_NAME testdata2 RESOURCES main.cpp)
17
+ get_target_property(type ${target} TYPE)
18
+ if ("${type}" STREQUAL "STATIC_LIBRARY")
19
+ target_link_libraries(${target} PRIVATE $<BUILD_INTERFACE:sample_test_resources> $<BUILD_INTERFACE:testdata3>)
20
+ else()
21
+ target_link_libraries(${target} PRIVATE sample_test_resources testdata3)
22
+ endif()
23
+
24
+ target_compile_definitions(${target} PRIVATE MAIN_CPP_FILE_SIZE=${MAIN_CPP_FILE_SIZE})
25
+ target_compile_definitions(${target} PRIVATE CMAKELISTS_TXT_FILE_SIZE=${CMAKELISTS_TXT_FILE_SIZE})
26
+ endmacro()
27
+
28
+ add_executable(sample_test_exe main.cpp)
29
+ setup_target(sample_test_exe)
30
+
31
+ add_library(sample_test_shlib SHARED main.cpp)
32
+ target_compile_features(sample_test_shlib PRIVATE cxx_std_20)
33
+ setup_target(sample_test_shlib)
34
+
35
+ add_library(sample_test_lib STATIC main.cpp)
36
+ setup_target(sample_test_lib)
37
+
38
+ install(TARGETS sample_test_shlib EXPORT sample_test_shlib)
39
+ install(EXPORT sample_test_shlib FILE sampleTargets.cmake DESTINATION cmake)
40
+
41
+ install(TARGETS sample_test_lib EXPORT sample_test_lib)
42
+ install(EXPORT sample_test_lib FILE sampleTargets.cmake DESTINATION cmake)
43
+
44
+ enable_testing()
45
+ add_test(NAME sample_test_exe COMMAND sample_test_exe)
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/project/main.cpp ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <EmbeddedResource.h>
2
+ #include <exception>
3
+ #include <iostream>
4
+ #include <stdexcept>
5
+ #include <string_view>
6
+
7
+ DECLARE_RESOURCE_COLLECTION(testdata1);
8
+ DECLARE_RESOURCE_COLLECTION(testdata2);
9
+ DECLARE_RESOURCE_COLLECTION(testdata3);
10
+ DECLARE_RESOURCE(testdata3, main_cpp);
11
+
12
+ void verify_resource(ResourceLoader const& r)
13
+ {
14
+ if (r.name() == L"main.cpp")
15
+ {
16
+ #ifdef __cpp_lib_span
17
+ if (r.template data<uint8_t>().size() != MAIN_CPP_FILE_SIZE) { throw std::runtime_error("r.data.len() != MAIN_CPP_FILE_SIZE"); }
18
+ #endif
19
+ #ifdef __cpp_lib_string_view
20
+ if (r.string().size() != MAIN_CPP_FILE_SIZE) { throw std::runtime_error("r.string().size() != MAIN_CPP_FILE_SIZE"); }
21
+ #endif
22
+ }
23
+ else if (r.name() == L"CMakeLists.txt")
24
+ {
25
+ #ifdef __cpp_lib_span
26
+ if (r.template data<uint8_t>().size() != CMAKELISTS_TXT_FILE_SIZE)
27
+ {
28
+ throw std::runtime_error("r.data.len() != CMAKELISTS_TXT_FILE_SIZE");
29
+ }
30
+ #endif
31
+ #ifdef __cpp_lib_string_view
32
+ if (r.string().size() != CMAKELISTS_TXT_FILE_SIZE) { throw std::runtime_error("r.string().size() != CMAKELISTS_TXT_FILE_SIZE"); }
33
+ #endif
34
+ }
35
+ else { throw std::runtime_error("Unknown resource name"); }
36
+ }
37
+
38
+ int main(int argc, char* argv[])
39
+ try
40
+ {
41
+ std::string_view res = LOAD_RESOURCE(testdata3, main_cpp).data;
42
+ if (res.size() != MAIN_CPP_FILE_SIZE) { throw std::runtime_error("r.data.len() != MAIN_CPP_FILE_SIZE"); }
43
+
44
+ auto resourceCollection1 = LOAD_RESOURCE_COLLECTION(testdata1);
45
+ for (auto const r : resourceCollection1) { verify_resource(r); }
46
+
47
+ auto resourceCollection2 = LOAD_RESOURCE_COLLECTION(testdata2);
48
+ for (auto const r : resourceCollection2) { verify_resource(r); }
49
+
50
+ auto resourceCollection3 = LOAD_RESOURCE_COLLECTION(testdata3);
51
+ for (auto const r : resourceCollection2) { verify_resource(r); }
52
+
53
+ return 0;
54
+ } catch (const std::exception& ex)
55
+ {
56
+ std::cerr << "Failed: " << ex.what() << std::endl;
57
+ return -1;
58
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/vcpkg.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vcpkg-ci-ankurvdev-embedresource",
3
+ "version-string": "ci",
4
+ "description": "Validates ankurvdev-embedresource",
5
+ "license": "BSD-3-Clause",
6
+ "dependencies": [
7
+ {
8
+ "name": "ankurvdev-embedresource"
9
+ },
10
+ {
11
+ "name": "vcpkg-cmake",
12
+ "host": true
13
+ }
14
+ ]
15
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-arrow/portfile.cmake ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
2
+
3
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ARROW_LINK_SHARED)
4
+
5
+ vcpkg_cmake_configure(
6
+ SOURCE_PATH "${CURRENT_INSTALLED_DIR}/share/arrow/example"
7
+ OPTIONS
8
+ -DARROW_LINK_SHARED=${ARROW_LINK_SHARED}
9
+ )
10
+ vcpkg_cmake_build()
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-arrow/vcpkg.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vcpkg-ci-arrow",
3
+ "version-date": "2022-07-25",
4
+ "description": "Builds an example app in order to validate the arrow port.",
5
+ "license": "Apache-2.0",
6
+ "dependencies": [
7
+ {
8
+ "name": "vcpkg-cmake",
9
+ "host": true
10
+ },
11
+ {
12
+ "name": "arrow",
13
+ "default-features": false,
14
+ "features": [
15
+ "csv",
16
+ "example"
17
+ ]
18
+ }
19
+ ]
20
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-boost/portfile.cmake ADDED
@@ -0,0 +1 @@
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-boost/vcpkg.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vcpkg-ci-boost",
3
+ "version": "1",
4
+ "description": "Boost features testing within CI.",
5
+ "dependencies": [
6
+ {
7
+ "name": "boost",
8
+ "default-features": false,
9
+ "features": [
10
+ "mpi"
11
+ ],
12
+ "platform": "!staticcrt & !(arm & windows) & !uwp"
13
+ },
14
+ {
15
+ "name": "boost-asio",
16
+ "default-features": false,
17
+ "features": [
18
+ "ssl"
19
+ ]
20
+ },
21
+ {
22
+ "name": "boost-fiber",
23
+ "default-features": false,
24
+ "features": [
25
+ "numa"
26
+ ],
27
+ "platform": "!uwp & !arm & !emscripten"
28
+ },
29
+ {
30
+ "name": "boost-locale",
31
+ "default-features": false,
32
+ "features": [
33
+ "icu"
34
+ ],
35
+ "platform": "!uwp"
36
+ },
37
+ {
38
+ "name": "boost-mpi",
39
+ "default-features": false,
40
+ "features": [
41
+ "python3"
42
+ ],
43
+ "platform": "!staticcrt & !static & !uwp & !(arm & windows)"
44
+ },
45
+ {
46
+ "name": "boost-odeint",
47
+ "default-features": false
48
+ },
49
+ {
50
+ "name": "boost-odeint",
51
+ "default-features": false,
52
+ "features": [
53
+ "mpi"
54
+ ],
55
+ "platform": "!staticcrt & !uwp & !(windows & arm)"
56
+ },
57
+ {
58
+ "name": "boost-python",
59
+ "default-features": false,
60
+ "features": [
61
+ "python3"
62
+ ],
63
+ "platform": "!emscripten & !ios & !android & !uwp"
64
+ },
65
+ {
66
+ "name": "boost-python",
67
+ "default-features": false,
68
+ "features": [
69
+ "python2"
70
+ ],
71
+ "platform": "!android & !emscripten & !ios & !(arm & osx) & !(arm & windows) & !uwp"
72
+ },
73
+ {
74
+ "name": "boost-regex",
75
+ "default-features": false,
76
+ "features": [
77
+ "icu"
78
+ ]
79
+ }
80
+ ]
81
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-curl/portfile.cmake ADDED
@@ -0,0 +1 @@
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-curl/vcpkg.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vcpkg-ci-curl",
3
+ "version-date": "2024-03-05",
4
+ "description": "Port to force features of certain ports within CI",
5
+ "homepage": "https://github.com/microsoft/vcpkg",
6
+ "license": "MIT",
7
+ "dependencies": [
8
+ {
9
+ "name": "curl",
10
+ "features": [
11
+ "http2",
12
+ "zstd"
13
+ ]
14
+ },
15
+ {
16
+ "$comment": "Known to break aws-sdk-cpp.",
17
+ "name": "curl",
18
+ "features": [
19
+ "brotli"
20
+ ],
21
+ "platform": "!osx"
22
+ },
23
+ {
24
+ "$comment": "Known to be fixed by libidn2 update.",
25
+ "name": "curl",
26
+ "features": [
27
+ "idn"
28
+ ],
29
+ "platform": "!android"
30
+ },
31
+ {
32
+ "name": "curl",
33
+ "features": [
34
+ "ldap",
35
+ "tool"
36
+ ],
37
+ "platform": "!android & !uwp"
38
+ }
39
+ ]
40
+ }
cc-multilingual-main/cc_net/vcpkg/scripts/test_ports/vcpkg-ci-gdal/portfile.cmake ADDED
@@ -0,0 +1 @@
 
 
1
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)