* prepPR * gitignore updates * cspell.json * spell * cspell typo * deisable option * need to look out for this * reenable tests * set unset location properly * building in docker * format file * final changes * PR comments * update git ignore * test cmake build * test 2 * ren steps * test new step * try again * again * oops * try again * put back * test2 * test5_46 * progress * more again * test6_35 * test 6_55 * test_again * move up * test * output params * try try again * one more test * put back curl * os * run only on one * try again * typo * switch variable * set things back * set things back * prep for next step * test source deps new * try again * try try again * typo * test rewire * params * typo * fix * get rid of vcpkg * linux * mac * try brew * try exports * try again * typo * set env * include dir * root * try again * typo * dfsfsda * try agan * try again * oops * sdfsd * typo * dsdsad * hghhg * update env * ghhgj * sAdsad * try again * fdfd * rewrew * dsadas * sdasda * ggggg * envs2 * envs3 * typo * order * try again * make sure we don't blow up other pipelines * typo * typo * fsdfs * check null * put back
56 lines
2.8 KiB
CMake
56 lines
2.8 KiB
CMake
macro(GetFolderList project)
|
|
message ("project found ${project}")
|
|
|
|
if(${project} STREQUAL CERTIFICATES)
|
|
DownloadDepVersion(sdk/core azure-core 1.3.1)
|
|
DownloadDepVersion(sdk/identity azure-identity 1.1.0)
|
|
endif()
|
|
|
|
list(REMOVE_DUPLICATES BUILD_FOLDERS)
|
|
endmacro()
|
|
|
|
macro(SetCompileOptions project)
|
|
message ("setting up compile options for ${project}")
|
|
|
|
if(${project} STREQUAL CERTIFICATES)
|
|
# Compile Options
|
|
option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" ON)
|
|
option(BUILD_TRANSPORT_CURL "Build an HTTP transport implementation with CURL" OFF)
|
|
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_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_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)
|
|
option(BUILD_FROM_SOURCE_EXPORT "if export is built from source" ON)
|
|
option(TESTING_BUILD "BUILD test cases" OFF)
|
|
endif()
|
|
endmacro()
|
|
|
|
macro(DownloadDepVersion DEP_FOLDER DEP_NAME DEP_VERSION)
|
|
|
|
file(REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/${DEP_FOLDER})
|
|
set(DOWNLOAD_FOLDER ${CMAKE_SOURCE_DIR}/downloads)
|
|
set(DOWNLOAD_FILE ${DEP_NAME}_${DEP_VERSION}.zip)
|
|
set(DEP_PREFIX azure-sdk-for-cpp)
|
|
# get the zip
|
|
file(DOWNLOAD https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/${DOWNLOAD_FILE} ${DOWNLOAD_FOLDER}/${DOWNLOAD_FILE})
|
|
|
|
#extract the zip
|
|
file(ARCHIVE_EXTRACT INPUT ${DOWNLOAD_FOLDER}/${DOWNLOAD_FILE} DESTINATION ${DOWNLOAD_FOLDER}/${DEP_NAME})
|
|
#make target folder
|
|
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/${DEP_FOLDER})
|
|
# need a nicer way to copy/move folder
|
|
# i need to archive the folder then extract at new location
|
|
execute_process(COMMAND tar -cf ${DOWNLOAD_FOLDER}/${DEP_NAME}.tar -C ${DOWNLOAD_FOLDER}/${DEP_NAME}/${DEP_PREFIX}-${DEP_NAME}_${DEP_VERSION}/${DEP_FOLDER} .)
|
|
file(ARCHIVE_EXTRACT INPUT ${DOWNLOAD_FOLDER}/${DEP_NAME}.tar DESTINATION ${CMAKE_SOURCE_DIR}/${DEP_FOLDER})
|
|
#cleanup
|
|
file(REMOVE_RECURSE ${DOWNLOAD_FOLDER})
|
|
#add dependency folder to build list
|
|
list(APPEND BUILD_FOLDERS ${DEP_FOLDER})
|
|
|
|
endmacro()
|