azure-sdk-for-cpp/samples/integration/cmake-fetch-content
Ahson Khan 8095d85e67
Simplify the public surface design of Response<T> for usability. (#1974)
* Simplify the design of Response<T> for usability.

* Revert changes to operation<T> to keep the changes single purpose.

* Update many of the response<T> call sites based on API changes.

* Update all remaining callsites and fix clang formatting.

* Update Response<T> documentation.

* Fix clang formatting.

* Remove status code from the Response<T> public surface area.

* Update the changelog.

* Fix up CL wording and remove commented-out change to operation<T>.

* Fixed test by actually calling a method.

* Fix up key vault test by not taking ownership of raw response.

* Fix call to get status code in test.

* Add new line at end of keyvualt live test file.

* Make a local copy within keyvault pipeline to avoid compilers re-ordering things.

* Make the fixes to the recent keyvault changes.

* Fix key vault pipeline to address ImportKey test failure
2021-04-01 00:50:04 +00:00
..
src Simplify the public surface design of Response<T> for usability. (#1974) 2021-04-01 00:50:04 +00:00
CMakeLists.txt Sample for fetchContent (#1392) 2021-01-22 16:10:44 -08:00
LICENSE Sample for fetchContent (#1392) 2021-01-22 16:10:44 -08:00
README.md Sample for fetchContent (#1392) 2021-01-22 16:10:44 -08:00

Integrating the Azure SDK for C++ into your application using CMake fetch content

This application shows how to integrate the Azure SDK for C++ in your application. It uses CMake fetch content functionality to clone the Azure SDK for C++ repo into your build directory. This approach is useful when using CMake to build your application.

Pre-requisites

Install the Azure SDK for C++ dependencies.

  • CMake project (min version 3.13).
  • C++ version 14 or greater.

Build

#
# Building the application.
# Instructions from application root directory.
#

# Create build directory just the first time.
mkdir build
cd build

# Generate and build
# This code assumes that the SDK dependencies were installed with VCPKG
cmake -DCMAKE_TOOLCHAIN_FILE=path/to/vcpkg/scripts/buildsystems/vcpkg.cmake ..
cmake -build .

Run application

Review source code header for environment variables that must be set up before running the app.

#
# Running the Application
# Instructions from inside the build directory.
#

# Run binary (.exe on Windows)
./application