Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions cmake-modules/add_nlohmann_json.cmake

This file was deleted.

22 changes: 11 additions & 11 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,46 @@ jobs:
matrix:
Linux_x64_gcc8:
OSVmImage: 'ubuntu-18.04'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-linux'
CC: '/usr/bin/gcc-8'
CXX: '/usr/bin/g++-8'
BuildArgs: '-j 10'
Linux_x64_gcc9:
OSVmImage: 'ubuntu-18.04'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-linux'
CC: '/usr/bin/gcc-9'
CXX: '/usr/bin/g++-9'
BuildArgs: '-j 10'
Linux_x64:
OSVmImage: 'ubuntu-18.04'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-linux'
BuildArgs: '-j 10'
Win_x86:
OSVmImage: 'windows-2019'
VcpkgInstall: 'curl[winssl] libxml2'
VcpkgInstall: 'curl[winssl] libxml2 nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x86-windows-static'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATOR_PLATFORM: Win32
CmakeArgs: ' -DBUILD_TRANSPORT_CURL=ON' #ToBeRemoved once we have WinHttp Transport and Storage makes HTTP stack user-config
Win_x64:
OSVmImage: 'windows-2019'
VcpkgInstall: 'curl[winssl] libxml2'
VcpkgInstall: 'curl[winssl] libxml2 nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATOR_PLATFORM: x64
CmakeArgs: ' -DBUILD_TRANSPORT_CURL=ON' #ToBeRemoved once we have WinHttp Transport and Storage makes HTTP stack user-config
MacOS_x64:
OSVmImage: 'macOS-10.14'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-osx'

# Unit testing ON
Linux_x64_with_unit_test:
OSVmImage: 'ubuntu-18.04'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-linux'
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_CODE_COVERAGE=ON'
AptDependencies: 'gcovr lcov'
Expand All @@ -62,21 +62,21 @@ jobs:
BuildArgs: '-j 10'
Win_x86_with_unit_test:
OSVmImage: 'windows-2019'
VcpkgInstall: 'curl[winssl] libxml2'
VcpkgInstall: 'curl[winssl] libxml2 nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x86-windows-static'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATOR_PLATFORM: Win32
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON'
Win_x64_with_unit_test:
OSVmImage: 'windows-2019'
VcpkgInstall: 'curl[winssl] libxml2'
VcpkgInstall: 'curl[winssl] libxml2 nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATOR_PLATFORM: x64
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON'
MacOS_x64_with_unit_test:
OSVmImage: 'macOS-10.14'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-osx'
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON'
pool:
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
vmImage: $(OSVmImage)
variables:
OSVmImage: windows-2019
VcpkgDependencies: curl[winssl] libxml2
VcpkgDependencies: curl[winssl] libxml2 nlohmann-json
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
steps:
- template: /eng/common/pipelines/templates/steps/verify-links.yml
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/templates/jobs/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
matrix:
Linux_x64_with_unit_test:
OSVmImage: 'ubuntu-18.04'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-linux'
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_CODE_COVERAGE=ON'
AptDependencies: 'gcovr lcov'
Expand All @@ -34,21 +34,21 @@ jobs:
CODE_COVERAGE_COLLECT_ONLY: 1
Win_x86_with_unit_test:
OSVmImage: 'windows-2019'
VcpkgInstall: 'curl[winssl] libxml2'
VcpkgInstall: 'curl[winssl] libxml2 nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x86-windows-static'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATOR_PLATFORM: Win32
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON'
Win_x64_with_unit_test:
OSVmImage: 'windows-2019'
VcpkgInstall: 'curl[winssl] libxml2'
VcpkgInstall: 'curl[winssl] libxml2 nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATOR_PLATFORM: x64
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON'
MacOS_x64_with_unit_test:
OSVmImage: 'macOS-10.14'
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VcpkgInstall: 'curl[ssl] libxml2 openssl nlohmann-json'
VCPKG_DEFAULT_TRIPLET: 'x64-osx'
CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON'
pool:
Expand Down
11 changes: 8 additions & 3 deletions sdk/core/azure-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ if(NOT CURL_FOUND)
endif()
message("Libcurl version ${CURL_VERSION_STRING}")

# Storage requires 3.6.0 version for using `contains` feature
set(NLOHMANN_JSON_MIN_REQUIRED_VERSION 3.6.0)
find_package(nlohmann_json ${NLOHMANN_JSON_MIN_REQUIRED_VERSION} CONFIG)
if(NOT nlohmann_json_FOUND)
find_package(nlohmann_json ${NLOHMANN_JSON_MIN_REQUIRED_VERSION} REQUIRED)
endif()
message("nlohmann json version ${nlohmann_json_VERSION}")

if(BUILD_TRANSPORT_CURL)
SET(CURL_TRANSPORT_ADAPTER_SRC src/http/curl/curl.cpp)
endif()
Expand All @@ -31,9 +39,6 @@ endif()
# CodeCoverage will validate requirements
include(CodeCoverage)

# nlohmann JSON
include(add_nlohmann_json)

add_library (
${TARGET_NAME}
src/context.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
const DeleteShareOptions& options) const
{
auto protocolLayerOptions = Details::ShareRestClient::Share::DeleteOptions();
if (options.IncludeSnapshots.HasValue() and options.IncludeSnapshots.GetValue())
if (options.IncludeSnapshots.HasValue() && options.IncludeSnapshots.GetValue())
{
protocolLayerOptions.XMsDeleteSnapshots = Models::DeleteSnapshotsOptionType::Include;
}
Expand Down