Build ci gates per service (#3260)

This commit is contained in:
Victor Vazquez 2022-01-20 18:09:06 +00:00 committed by GitHub
parent 335fb0ab43
commit c10de791cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 114 additions and 28 deletions

View File

@ -13,16 +13,17 @@ option(BUILD_TRANSPORT_CURL "Build an HTTP transport implementation with CURL" O
option(BUILD_TRANSPORT_WINHTTP "Build an HTTP transport implementation with WIN HTTP" OFF)
option(BUILD_TRANSPORT_CUSTOM "Implementation for AzureSdkGetCustomHttpTransport function must be linked to the final application" OFF)
option(BUILD_TESTING "Build test cases" OFF)
option(BUILD_SAMPLES "Build sample application for Azure Storage clients" OFF)
option(BUILD_RTTI "Build libraries with run-time type information." ON)
option(BUILD_CODE_COVERAGE "Build gcov targets for HTML and XML reports. Requires debug build and BUILD_TESTING" OFF)
option(BUILD_DOCUMENTATION "Create HTML based API documentation (requires Doxygen)" OFF)
option(RUN_LONG_UNIT_TESTS "Tests that takes more than 5 minutes to complete. No effect if BUILD_TESTING is OFF" OFF)
option(BUILD_STORAGE_SAMPLES "Build sample application for Azure Storage clients" OFF)
option(BUILD_PERFORMANCE_TESTS "Build the performance test library" OFF)
option(MSVC_USE_STATIC_CRT "(MSVC only) Set to ON to link SDK with static CRT (/MT or /MTd switch)." OFF)
include(AzureTransportAdapters)
include(AzureVcpkg)
include(AzureBuildTargetForCI)
az_vcpkg_integrate()

View File

@ -7,7 +7,7 @@
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_TRANSPORT_CURL=ON -DBUILD_STORAGE_SAMPLES=ON",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_TRANSPORT_CURL=ON -DBUILD_SAMPLES=ON",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
@ -25,7 +25,7 @@
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_STORAGE_SAMPLES=ON",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [

View File

@ -138,8 +138,8 @@ The following CMake options are available for adding/removing project features.
<td>OFF</td>
</tr>
<tr>
<td>BUILD_STORAGE_SAMPLES</td>
<td>Build Azure Storage clients sample application.</td>
<td>BUILD_SAMPLES</td>
<td>Build Azure SDK for C++ sample applications. </td>
<td>OFF</td>
</tr>
<tr>

View File

@ -0,0 +1,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
#
# Defines utility functions to create build targets for CI.
#
macro(create_per_service_target_build target service)
file(APPEND ${CMAKE_BINARY_DIR}/${service}-targets-build.txt "${target}\n")
endmacro()

View File

@ -103,6 +103,7 @@ jobs:
- template: /eng/pipelines/templates/steps/cmake-build.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Build: false
GenerateArgs: >-
-DINSTALL_GTEST=OFF

View File

@ -68,7 +68,7 @@ jobs:
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VCPKG_DEFAULT_TRIPLET: 'x64-linux'
# Builds samples and run them against the deployed resources. Samples requires Azure Account, so only works on live tests.
CmakeArgs: ' -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON -DBUILD_STORAGE_SAMPLES=ON'
CmakeArgs: ' -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON '
BuildArgs: '-j 4'
RunSamples: 1
Ubuntu20_x64_no_rtti:
@ -197,6 +197,7 @@ jobs:
- template: /eng/pipelines/templates/steps/cmake-build.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
GenerateArgs: $(CmakeArgs)
BuildArgs: "$(BuildArgs)"
Env: "$(CmakeEnvArg)"

View File

@ -132,6 +132,7 @@ jobs:
- template: /eng/pipelines/templates/steps/cmake-build.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
GenerateArgs: "$(CmakeArgs)"
BuildArgs: "$(BuildArgs)"
Env: "$(CmakeEnvArg)"

View File

@ -140,7 +140,7 @@
"PublishMapFiles": "true"
},
"included_samples": {
"CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON -DBUILD_STORAGE_SAMPLES=ON",
"CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON ",
"PublishMapFiles": "true"
}
}

View File

@ -3,6 +3,7 @@ parameters:
GenerateArgs: ''
Build: true
BuildArgs: ''
ServiceDirectory: ''
steps:
@ -17,7 +18,15 @@ steps:
workingDirectory: build
displayName: cmake generate
- ${{ if eq(parameters.Build, true) }}:
# Core should build all cmake tagets
- ${{ if and(eq(parameters.Build, true), eq(parameters.ServiceDirectory, 'core')) }}:
- script: cmake --build . ${{ parameters.BuildArgs }}
workingDirectory: build
displayName: cmake build
displayName: cmake build All
# Non-core services define the list of targets to build
- ${{ if and(eq(parameters.Build, true) , ne(parameters.ServiceDirectory, 'core')) }}:
- pwsh: cmake --build . ${{ parameters.BuildArgs }} --target (Get-Content ${{ parameters.ServiceDirectory }}-targets-build.txt)
workingDirectory: build
displayName: cmake build Targets

View File

@ -19,6 +19,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
# Add create_map_file function
include(CreateMapFile)
@ -53,6 +54,7 @@ set(
)
add_library(azure-identity ${AZURE_IDENTITY_HEADER} ${AZURE_IDENTITY_SOURCE})
create_per_service_target_build(azure-identity identity)
# make sure that users can consume the project as a library.
add_library(Azure::azure-identity ALIAS azure-identity)
@ -93,12 +95,13 @@ if(BUILD_TESTING)
add_subdirectory(test/e2e)
add_subdirectory(test/ut)
endif()
if (BUILD_SAMPLES)
add_subdirectory(samples)
endif()
if (BUILD_PERFORMANCE_TESTS)
add_subdirectory(test/perf)
endif()
if (AZ_ALL_LIBRARIES)
add_subdirectory(samples)
endif()

View File

@ -10,11 +10,14 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
add_executable(client_secret_credential_sample client_secret_credential.cpp)
target_link_libraries(client_secret_credential_sample PRIVATE azure-identity)
target_include_directories(client_secret_credential_sample PRIVATE .)
create_per_service_target_build(client_secret_credential_sample identity)
add_executable(environment_credential_sample environment_credential.cpp)
target_link_libraries(environment_credential_sample PRIVATE azure-identity)
target_include_directories(environment_credential_sample PRIVATE .)
create_per_service_target_build(environment_credential_sample identity)
add_executable(managed_identity_credential_sample managed_identity_credential.cpp)
target_link_libraries(managed_identity_credential_sample PRIVATE azure-identity)
target_include_directories(managed_identity_credential_sample PRIVATE .)
create_per_service_target_build(managed_identity_credential_sample identity)

View File

@ -11,5 +11,7 @@ add_executable (
azure-identity-e2e-test
azure_identity_e2e_test.cpp
)
create_per_service_target_build(azure-identity-e2e-test identity)
create_map_file(azure-identity-e2e-test azure-identity-e2e-test.map)
target_link_libraries(azure-identity-e2e-test PRIVATE azure-identity)

View File

@ -22,6 +22,7 @@ add_executable (
azure-identity-perf
${AZURE_IDENTITY_PERF_TEST_HEADER} ${AZURE_IDENTITY_PERF_TEST_SOURCE}
)
create_per_service_target_build(azure-identity-perf identity)
create_map_file(azure-identity-perf azure-identity-perf.map)

View File

@ -26,6 +26,8 @@ add_executable (
token_credential_impl_test.cpp
token_credential_test.cpp
)
create_per_service_target_build(azure-identity-test identity)
create_map_file(azure-identity-test azure-identity-test.map)

View File

@ -29,6 +29,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
# Add create_map_file function
include(CreateMapFile)
@ -66,6 +67,7 @@ add_library(azure-security-keyvault-certificates
${AZURE_KEYVAULT_CERTIFICATES_HEADER} ${AZURE_KEYVAULT_CERTIFICATES_SOURCE}
)
add_library(Azure::azure-security-keyvault-certificates ALIAS azure-security-keyvault-certificates)
create_per_service_target_build(azure-security-keyvault-certificates keyvault)
target_include_directories(
azure-security-keyvault-certificates

View File

@ -7,7 +7,7 @@
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_TRANSPORT_CURL=ON -DBUILD_STORAGE_SAMPLES=ON",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_TRANSPORT_CURL=ON -DBUILD_SAMPLES=ON",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
@ -25,7 +25,7 @@
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_STORAGE_SAMPLES=ON",
"cmakeCommandArgs": "-DINSTALL_GTEST=OFF -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [

View File

@ -11,6 +11,7 @@ add_executable (
certificate-basic-operations
certificate_basic_operations.cpp
)
create_per_service_target_build(certificate-basic-operations keyvault)
target_link_libraries(certificate-basic-operations PRIVATE azure-security-keyvault-certificates azure-identity )

View File

@ -11,6 +11,7 @@ add_executable (
certificate-get-certificates
certificate_get_certificates.cpp
)
create_per_service_target_build(certificate-get-certificates keyvault)
target_link_libraries(certificate-get-certificates PRIVATE azure-security-keyvault-certificates azure-identity )

View File

@ -11,6 +11,7 @@ add_executable (
certificate-import-certificate
certificate_import_certificate.cpp
)
create_per_service_target_build(certificate-import-certificate keyvault)
target_link_libraries(certificate-import-certificate PRIVATE azure-security-keyvault-certificates azure-identity )

View File

@ -18,6 +18,8 @@ add_executable (
certificate_client_test.cpp
certificate_client_base_test.hpp)
create_per_service_target_build(azure-security-keyvault-certificates-test keyvault)
create_map_file(azure-security-keyvault-certificates-test azure-security-keyvault-certificates-test.map)
if (MSVC)

View File

@ -19,6 +19,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
# Add create_map_file function
include(CreateMapFile)
@ -89,6 +90,7 @@ set(
add_library(azure-security-keyvault-keys
${AZURE_KEYVAULT_KEYS_HEADER} ${AZURE_KEYVAULT_KEYS_SOURCE}
)
create_per_service_target_build(azure-security-keyvault-keys keyvault)
add_library(Azure::azure-security-keyvault-keys ALIAS azure-security-keyvault-keys)
target_include_directories(

View File

@ -22,7 +22,7 @@ add_executable (
azure-security-keyvault-keys-perf
${AZURE_KEYVAULT_KEY_PERF_TEST_HEADER} ${AZURE_KEYVAULT_KEY_PERF_TEST_SOURCE}
)
create_per_service_target_build(azure-security-keyvault-keys-perf keyvault)
create_map_file(azure-security-keyvault-keys-perf azure-security-keyvault-keys-perf.map)
# Include the headers from the project.

View File

@ -12,6 +12,8 @@ add_executable (
sample1_hello_world.cpp
)
create_per_service_target_build(sample1-hello-world keyvault)
# Add the sample to be run on CI.
# CI pipeline reads the {service}-samples.txt and runs the binaries listed there.
file(APPEND ${CMAKE_BINARY_DIR}/keyvault-samples.txt "${CMAKE_CURRENT_BINARY_DIR}/sample1-hello-world\n")

View File

@ -11,6 +11,7 @@ add_executable (
sample2-backup-and-restore
sample2_backup_and_restore.cpp
)
create_per_service_target_build(sample2-backup-and-restore keyvault)
# Add the sample to be run on CI.
# CI pipeline reads the {service}-samples.txt and runs the binaries listed there.

View File

@ -11,6 +11,7 @@ add_executable (
sample3-get-keys
sample3_get_keys.cpp
)
create_per_service_target_build(sample3-get-keys keyvault)
# Add the sample to be run on CI.
# CI pipeline reads the {service}-samples.txt and runs the binaries listed there.

View File

@ -11,6 +11,7 @@ add_executable (
sample4-encrypt-decrypt
sample4_encrypt_decrypt.cpp
)
create_per_service_target_build(sample4-encrypt-decrypt keyvault)
# Add the sample to be run on CI.
# CI pipeline reads the {service}-samples.txt and runs the binaries listed there.

View File

@ -11,6 +11,7 @@ add_executable (
sample5-sign-verify
sample5_sign_verify.cpp
)
create_per_service_target_build(sample5-sign-verify keyvault)
# Add the sample to be run on CI.
# CI pipeline reads the {service}-samples.txt and runs the binaries listed there.

View File

@ -11,6 +11,7 @@ add_executable (
sample6-wrap-unwrap
sample6_wrap_unwrap.cpp
)
create_per_service_target_build(sample6-wrap-unwrap keyvault)
# Add the sample to be run on CI.
# CI pipeline reads the {service}-samples.txt and runs the binaries listed there.

View File

@ -30,6 +30,7 @@ add_executable (
mocked_transport_adapter_test.hpp
)
create_per_service_target_build(azure-security-keyvault-keys-test keyvault)
create_map_file(azure-security-keyvault-keys-test azure-security-keyvault-keys-test.map)
if (MSVC)

View File

@ -19,6 +19,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
# Add create_map_file function
include(CreateMapFile)
@ -59,6 +60,7 @@ set(
add_library(azure-security-keyvault-secrets ${AZURE_SECURITY_KEYVAULT_SECRETS_HEADER} ${AZURE_SECURITY_KEYVAULT_SECRETS_SOURCE})
add_library(Azure::azure-security-keyvault-secrets ALIAS azure-security-keyvault-secrets)
create_per_service_target_build(azure-security-keyvault-secrets keyvault)
target_include_directories(
azure-security-keyvault-secrets

View File

@ -11,6 +11,7 @@ add_executable (
sample1-basic-operations
sample1_basic_operations.cpp
)
create_per_service_target_build(sample1-basic-operations keyvault)
target_link_libraries(sample1-basic-operations PRIVATE azure-security-keyvault-secrets azure-identity)

View File

@ -12,6 +12,8 @@ add_executable (
sample2_backup_restore.cpp
)
create_per_service_target_build(sample2-backup-restore keyvault)
target_link_libraries(sample2-backup-restore PRIVATE azure-security-keyvault-secrets azure-identity)
# Add the sample to be run on CI.

View File

@ -12,6 +12,8 @@ add_executable (
sample3_delete_recover.cpp
)
create_per_service_target_build(sample3-delete-recover keyvault)
target_link_libraries(sample3-delete-recover PRIVATE azure-security-keyvault-secrets azure-identity)
# Add the sample to be run on CI.

View File

@ -12,6 +12,8 @@ add_executable (
sample4_get_secrets_deleted.cpp
)
create_per_service_target_build(sample4-get-secrets-deleted keyvault)
target_link_libraries(sample4-get-secrets-deleted PRIVATE azure-security-keyvault-secrets azure-identity)
# Add the sample to be run on CI.

View File

@ -13,6 +13,8 @@ add_executable (
macro_guard.cpp
)
create_per_service_target_build(keyvault-secrets-test-app keyvault)
create_map_file(keyvault-secrets-test-app keyvault-secrets-test-app.map)
if (MSVC)

View File

@ -26,6 +26,7 @@ add_executable (
secret_paged_deserialize_test.hpp
secret_client_base_test.hpp)
create_per_service_target_build(azure-security-keyvault-secrets-test keyvault)
create_map_file(azure-security-keyvault-secrets-test azure-security-keyvault-secrets-test.map)
if (MSVC)

View File

@ -4,7 +4,6 @@
cmake_minimum_required (VERSION 3.13)
project (azure-storage LANGUAGES CXX)
option(BUILD_STORAGE_SAMPLES "Build storage sample codes" ON)
add_subdirectory(azure-storage-common)
add_subdirectory(azure-storage-blobs)

View File

@ -17,6 +17,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
az_vcpkg_integrate()
@ -60,6 +61,7 @@ set(
)
add_library(azure-storage-blobs ${AZURE_STORAGE_BLOB_HEADER} ${AZURE_STORAGE_BLOB_SOURCE})
create_per_service_target_build(azure-storage-blobs storage)
# make sure that users can consume the project as a library.
add_library(Azure::azure-storage-blobs ALIAS azure-storage-blobs)
@ -96,7 +98,7 @@ if(BUILD_TESTING)
add_subdirectory(test/fault-injector)
endif()
if(BUILD_STORAGE_SAMPLES)
if(BUILD_SAMPLES)
add_subdirectory(samples)
endif()

View File

@ -5,12 +5,16 @@ cmake_minimum_required (VERSION 3.13)
add_executable(blob-getting-started blob_getting_started.cpp)
target_link_libraries(blob-getting-started PRIVATE azure-storage-blobs)
create_per_service_target_build(blob-getting-started storage)
add_executable(blob-list-operation blob_list_operation.cpp)
target_link_libraries(blob-list-operation PRIVATE azure-storage-blobs)
create_per_service_target_build(blob-list-operation storage)
add_executable(blob-sas blob_sas.cpp)
target_link_libraries(blob-sas PRIVATE azure-storage-blobs)
create_per_service_target_build(blob-sas storage)
add_executable(transactional-checksum transactional_checksum.cpp)
target_link_libraries(transactional-checksum PRIVATE azure-storage-blobs)
create_per_service_target_build(transactional-checksum storage)

View File

@ -13,5 +13,6 @@ add_executable (
azure-storage-blobs-test-fault-injector
azure_storage_blobs_fault_injector_test.cpp
)
create_per_service_target_build(azure-storage-blobs-test-fault-injector storage)
target_link_libraries(azure-storage-blobs-test-fault-injector PRIVATE azure-storage-blobs)

View File

@ -33,6 +33,8 @@ add_executable (
${AZURE_STORAGE_BLOBS_PERF_TEST_HEADER} ${AZURE_STORAGE_BLOBS_PERF_TEST_SOURCE}
)
create_per_service_target_build(azure-storage-blobs-perf storage)
# Include the headers from the project.
target_include_directories(
azure-storage-blobs-perf

View File

@ -32,6 +32,8 @@ add_executable (
${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.hpp
)
create_per_service_target_build(azure-storage-blobs-test storage)
create_map_file(azure-storage-blobs-test azure-storage-blobs-test.map)
# Include shared test headers

View File

@ -17,6 +17,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
az_vcpkg_integrate()
@ -66,6 +67,7 @@ set(
)
add_library(azure-storage-common ${AZURE_STORAGE_COMMON_HEADER} ${AZURE_STORAGE_COMMON_SOURCE})
create_per_service_target_build(azure-storage-common storage)
# make sure that users can consume the project as a library.
add_library(Azure::azure-storage-common ALIAS azure-storage-common)

View File

@ -21,7 +21,7 @@ add_executable (
test_base.cpp
test_base.hpp
)
create_per_service_target_build(azure-storage-common-test storage)
create_map_file(azure-storage-common-test azure-storage-common-test.map)
if (MSVC)

View File

@ -17,6 +17,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
az_vcpkg_integrate()
@ -64,6 +65,7 @@ add_library(azure-storage-files-datalake ${AZURE_STORAGE_FILES_DATALAKE_HEADER}
# make sure that users can consume the project as a library.
add_library(Azure::azure-storage-files-datalake ALIAS azure-storage-files-datalake)
create_per_service_target_build(azure-storage-files-datalake storage)
target_include_directories(
azure-storage-files-datalake
@ -96,6 +98,6 @@ if(BUILD_TESTING)
add_subdirectory(test/ut)
endif()
if(BUILD_STORAGE_SAMPLES)
if(BUILD_SAMPLES)
add_subdirectory(samples)
endif()

View File

@ -4,4 +4,5 @@
cmake_minimum_required (VERSION 3.13)
add_executable(datalake-getting-started datalake_getting_started.cpp)
create_per_service_target_build(datalake-getting-started storage)
target_link_libraries(datalake-getting-started PRIVATE azure-storage-files-datalake)

View File

@ -30,7 +30,7 @@ add_executable (
${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.hpp
)
create_per_service_target_build(azure-storage-files-datalake-test storage)
create_map_file(azure-storage-files-datalake-test azure-storage-files-datalake-test.map)
# Include shared test headers

View File

@ -17,6 +17,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
az_vcpkg_integrate()
@ -59,7 +60,7 @@ set(
)
add_library(azure-storage-files-shares ${AZURE_STORAGE_FILES_SHARES_HEADER} ${AZURE_STORAGE_FILES_SHARES_SOURCE})
create_per_service_target_build(azure-storage-files-shares storage)
# make sure that users can consume the project as a library.
add_library(Azure::azure-storage-files-shares ALIAS azure-storage-files-shares)
@ -94,6 +95,6 @@ if(BUILD_TESTING)
add_subdirectory(test/ut)
endif()
if(BUILD_STORAGE_SAMPLES)
if(BUILD_SAMPLES)
add_subdirectory(samples)
endif()

View File

@ -4,4 +4,5 @@
cmake_minimum_required (VERSION 3.13)
add_executable(file-share-getting-started file_share_getting_started.cpp)
create_per_service_target_build(file-share-getting-started storage)
target_link_libraries(file-share-getting-started PRIVATE azure-storage-files-shares)

View File

@ -29,7 +29,7 @@ add_executable (
${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.hpp
)
create_per_service_target_build(azure-storage-files-shares-test storage)
create_map_file(azure-storage-files-shares-test azure-storage-files-shares-test.map)
# Include shared test headers

View File

@ -17,6 +17,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
az_vcpkg_integrate()
@ -51,7 +52,7 @@ set(
)
add_library(azure-storage-queues ${AZURE_STORAGE_QUEUE_HEADER} ${AZURE_STORAGE_QUEUE_SOURCE})
create_per_service_target_build(azure-storage-queues storage)
# make sure that users can consume the project as a library.
add_library(Azure::azure-storage-queues ALIAS azure-storage-queues)
@ -86,6 +87,6 @@ if(BUILD_TESTING)
add_subdirectory(test/ut)
endif()
if(BUILD_STORAGE_SAMPLES)
if(BUILD_SAMPLES)
add_subdirectory(samples)
endif()

View File

@ -5,6 +5,8 @@ cmake_minimum_required (VERSION 3.13)
add_executable(queue-getting-started queue_getting_started.cpp)
target_link_libraries(queue-getting-started PRIVATE azure-storage-queues)
create_per_service_target_build(queue-getting-started storage)
add_executable(queue-encode-message queue_encode_message.cpp)
target_link_libraries(queue-encode-message PRIVATE azure-storage-queues)
create_per_service_target_build(queue-encode-message storage)

View File

@ -24,7 +24,7 @@ add_executable (
${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.hpp
)
create_per_service_target_build(azure-storage-queues-test storage)
create_map_file(azure-storage-queues-test azure-storage-queues-test.map)
# Include shared test headers

View File

@ -17,6 +17,7 @@ include(AzureTransportAdapters)
include(AzureDoxygen)
include(AzureGlobalCompileOptions)
include(AzureConfigRTTI)
include(AzureBuildTargetForCI)
az_vcpkg_integrate()
@ -41,6 +42,7 @@ set(
)
add_library(azure-template ${AZURE_TEMPLATE_HEADER} ${AZURE_TEMPLATE_SOURCE})
create_per_service_target_build(azure-template template)
target_include_directories(
azure-template

View File

@ -16,7 +16,7 @@ add_executable (
ut/macro_guard.cpp
ut/template_test.cpp
)
create_per_service_target_build(azure-template-test template)
create_map_file(azure-template-test azure-template-test.map)
target_link_libraries(azure-template-test PRIVATE Azure::azure-template gtest_main)