diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml index 4e1d328449..a31dda892d 100644 --- a/eng/pipelines/templates/jobs/perf.yml +++ b/eng/pipelines/templates/jobs/perf.yml @@ -39,6 +39,7 @@ extends: AdditionalArguments: ${{ parameters.AdditionalArguments }} EnvVars: ${{ parameters.EnvVars}} InstallLanguageSteps: - - template: /eng/pipelines/templates/steps/vcpkg-clone.yml + - template: /eng/pipelines/templates/steps/vcpkg.yml + #/eng/pipelines/templates/steps/vcpkg-clone.yml parameters: RepoOwner: Microsoft diff --git a/sdk/core/perf/test/CMakeLists.txt b/sdk/core/perf/test/CMakeLists.txt index 2e75b63adf..b06bbb3133 100644 --- a/sdk/core/perf/test/CMakeLists.txt +++ b/sdk/core/perf/test/CMakeLists.txt @@ -38,8 +38,16 @@ target_include_directories( $ ) +if(DEFINED ENV{VCPKG-AZURE-CORE-CPP}) + find_package(azure-core-cpp $ENV{VCPKG-AZURE-CORE-CPP} EXACT) + add_compile_definitions(VCPKG_CORE_VERSION="$ENV{VCPKG-AZURE-CORE-CPP}") +else() + add_compile_definitions(VCPKG_CORE_VERSION="source") +endif() + + # link the `azure-perf` lib together with any other library which will be used for the tests. -target_link_libraries(azure-perf-test PRIVATE azure-core azure-perf) +target_link_libraries(azure-perf-test PRIVATE Azure::azure-core azure-perf) # Make sure the project will appear in the test folder for Visual Studio CMake view set_target_properties(azure-perf-test PROPERTIES FOLDER "Tests/Core") diff --git a/sdk/core/perf/test/src/perf_test.cpp b/sdk/core/perf/test/src/perf_test.cpp index 9f827fcbc0..cd56f1d8de 100644 --- a/sdk/core/perf/test/src/perf_test.cpp +++ b/sdk/core/perf/test/src/perf_test.cpp @@ -18,7 +18,7 @@ int main(int argc, char** argv) { - + std::cout << "AZURE-CORE-CPP VERSION " << VCPKG_CORE_VERSION << std::endl; // Create the test list std::vector tests{ Azure::Perf::Test::NoOp::GetTestMetadata(),