azure-sdk-for-cpp/CMakeLists.txt
Daniel Jurek 0cfcdca725
Unified Pipelines for storage (#184)
* Add ci.yml for storage

* OSVmImage

* Use correct name for storage

* Update ci.ymls

* Documentation generation

* Fix tabbing

* More tabbing

* Use correct service directory for storage ci.yml

* Add docs assets

* Use cpp for dropdown generation

* Use cmake to generate documentation

* Use CMake to generate doxygen docs

* BuildArgs -> GenerateArgs

* Correct template path

* More CURL options

* Install curl to satisfy minimum build requirements

* use dependency variable name

* Add VCPKG_DEFAULT_TRIPLET

* Always generate documentaion when -DBUILD_DOCUMENTATION=YES

* Build docs at top level

* Change variable names, simplify cmake-build.yml

* -DBUILD_DOCUMENTATION

* Try using MathJax for formula rendering instead of Latex

* Add version.txt for storage

* artifact.Name -> artifact.Path

* Build docs by target

* Remove Doxyfile

* Remove Doxyfile.template

* Remove generate_docs.py, we are using cmake

* Pass CtestRegex to archetype-sdk-client job template)
2020-06-26 10:42:48 -07:00

47 lines
1.6 KiB
CMake

# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
cmake_minimum_required (VERSION 3.15)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules")
# Compile Options
option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" ON)
option(BUILD_CURL_TRANSPORT "Build internal http transport implementation with CURL for HTTP Pipeline" OFF)
option(BUILD_TESTING "Build test cases" OFF)
option(BUILD_DOCUMENTATION "Create HTML based API documentation (requires Doxygen)" OFF)
# VCPKG Integration
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
elseif(DEFINED ENV{VCPKG_INSTALLATION_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
endif()
if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "")
endif()
# Project definition
project(az LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if(BUILD_TESTING)
# tests
include(AddGoogleTest)
enable_testing ()
add_subdirectory(sdk/core/azure-core/test)
endif()
# compiler warning flags globally
include(global_compile_options)
# Documentation automation function
include(${CMAKE_SOURCE_DIR}/cmake-modules/doxygen_common.cmake)
# sub-projects
add_subdirectory(sdk/core/azure-core)
add_subdirectory(sdk/samples/http_client/curl) # will work only if BUILD_CURL_TRANSPORT=ON
add_subdirectory(sdk/storage)