diff --git a/.azure/templates/build-test.yml b/.azure/templates/build-test.yml index 9526aadf60..d143c71f18 100644 --- a/.azure/templates/build-test.yml +++ b/.azure/templates/build-test.yml @@ -30,7 +30,6 @@ steps: echo "###vso[task.setvariable variable=pip_cache;]${HOME}/.cache/pip" echo "###vso[task.setvariable variable=PATH;]$(python3 -m site --user-base)/bin:${PATH}" echo "###vso[task.setvariable variable=build_tool_options;]-j 4" - echo "###vso[task.setvariable variable=cmake_system_name;]Linux" sudo apt install -y clang clang-tools clang-tidy condition: eq(variables['Agent.OS'], 'Linux') name: setup_linux @@ -40,7 +39,6 @@ steps: echo "###vso[task.setvariable variable=pip_cache;]${HOME}/Library/Caches/pip" echo "###vso[task.setvariable variable=PATH;]$(python3 -m site --user-base)/bin:${PATH}" echo "###vso[task.setvariable variable=build_tool_options;]-j 4" - echo "###vso[task.setvariable variable=cmake_system_name;]Darwin" condition: eq(variables['Agent.OS'], 'Darwin') name: setup_macos # Use PowerShell rather than Bash to ensure Windows-style paths @@ -48,7 +46,6 @@ steps: $python_bin = python -m site --user-base Write-Host "###vso[task.setvariable variable=pip_cache;]${env:LOCALAPPDATA}\\pip\\Cache" Write-Host "###vso[task.setvariable variable=PATH;]$python_bin\\bin;${env:PATH}" - Write-Host "###vso[task.setvariable variable=cmake_system_name;]Windows" # Visual Studio is most likely used on Windows agents if (${env:GENERATOR} -match "2019" -and -not ${env:PLATFORM}) { # Make sure platform matches arch if not specified @@ -123,7 +120,7 @@ steps: crosscompiling= if [[ "${SHAREDLIBS:-on}" == "off" ]] ; then prefix_path="${prefix_path}:../build-sharedlibs/install" - crosscompiling="-DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSTEM_NAME=${cmake_system_name}" + crosscompiling="-DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSTEM_NAME=${AGENT_OS}" fi cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DCMAKE_INSTALL_PREFIX=install \