Skip to content

Commit

Permalink
[Cherry-pick] Use CMAKE_PREFIX_PATH in finding libprotobuf (#5975) (#…
Browse files Browse the repository at this point in the history
…5997)

### Description
* Cherry-pick #5975 into `rel-1.16.0` fix find libprotobuf which is
suggested by https://gitlab.kitware.com/cmake/cmake/-/issues/25704

### Motivation and Context
* Required so cherry-pick #5986 can pass tests

Signed-off-by: Liqun Fu <liqfu@microsoft.com>
Co-authored-by: liqun Fu <liqfu@microsoft.com>
  • Loading branch information
cjvolzka and liqunfu committed Mar 5, 2024
1 parent c867683 commit f46a3f8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .azure-pipelines/Windows-CI.yml
Expand Up @@ -56,13 +56,6 @@ jobs:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH

# cmake 3.28.3 failed to find protobuf installed from conda-forge
# https://gitlab.kitware.com/cmake/cmake/-/issues/25704
- script: |
choco install cmake --version 3.27.9 -y
cmake --version
displayName: Install specific version of CMake and check version
- script: |
conda create --yes --quiet --name py$(python.version) python=$(python.version)
if '$(protobuf_type)' == 'External' (
Expand All @@ -72,6 +65,9 @@ jobs:
)
displayName: Create Anaconda environment
- powershell: echo "##vso[task.setvariable variable=CMAKE_PREFIX_PATH]$env:CONDA/envs/py$(python.version)/Library"
displayName: Set CMAKE_PREFIX_PATH

- script: |
call activate py$(python.version)
python -m pip install --upgrade pip
Expand Down

0 comments on commit f46a3f8

Please sign in to comment.