Fix build failure on GCC 7.
* Fix build failure on GCC 7.
Fixes
* Fix job name.
MODIFY
azure-pipelines/pipelines.yml
azure-pipelines/pipelines.yml
@@ -27,6 +27,32 @@ jobs:
arguments: '-Triplet x64-linux -WorkingRoot work -VcpkgRoot $(VCPKG_ROOT)'
workingDirectory: '$(Build.SourcesDirectory)/build.amd64.debug'
pwsh: true
+- job: linux_gcc_7
+ displayName: 'Ubuntu 18.04 with GCC 7'
+ pool:
+ vmImage: 'ubuntu-18.04'
+ variables:
+ - name: 'VCPKG_ROOT'
+ value: $(Build.SourcesDirectory)/vcpkg-root
+ steps:
+ - bash: |
+ git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT" -n
+ git -C "$VCPKG_ROOT" checkout $VCPKG_REPO_COMMIT_SHA
+ displayName: "Clone vcpkg repo to serve as root"
+ - bash: |
+ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -DCMAKE_CXX_COMPILER=g++-7 -B build.amd64.debug
+ make -j 2 -C build.amd64.debug
+ displayName: "Build vcpkg with CMake"
+ failOnStderr: true
+ - bash: build.amd64.debug/vcpkg-test
+ displayName: 'Run vcpkg tests'
+ - task: PowerShell@2
+ displayName: 'Run vcpkg end-to-end tests'
+ inputs:
+ filePath: 'azure-pipelines/end-to-end-tests.ps1'
+ arguments: '-Triplet x64-linux -WorkingRoot work -VcpkgRoot $(VCPKG_ROOT)'
+ workingDirectory: '$(Build.SourcesDirectory)/build.amd64.debug'
+ pwsh: true
- job: osx
displayName: 'OSX'
pool:

MODIFY
src/vcpkg/base/files.cpp
src/vcpkg/base/files.cpp
@@ -1362,7 +1362,7 @@ namespace vcpkg
#else // ^^^ defined(_WIN32) / !defined(_WIN32) vvv
if (target.is_absolute())
{
- return path;
+ return target;
}
else
{

Fix build failure on GCC 7. (#122)

* Fix build failure on GCC 7.

Fixes https://github.com/microsoft/vcpkg/issues/19022

* Fix job name.