From 13c6414df5e81292f3c6c68040cf56a1933abe0c Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 29 Apr 2026 13:59:43 -0700 Subject: [PATCH 01/39] Apply CMake best practices and remove stale references - Modernize CMakeLists.txt: flatten nesting, deduplicate, use consistent quoting and variable patterns - Remove stale header references from vcxproj and vcxitems files - Simplify test CMakeLists.txt files - Fix CMake conventions in packaging scripts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 66 +++++++------------ Solutions/before.targets | 5 +- Solutions/build.MIP.props | 3 +- examples/cpp/SampleCpp/SampleCpp.vcxproj | 1 - .../cpp/SampleCpp/SampleCpp.vcxproj.filters | 3 - .../cpp/SampleCppMini/SampleCppMini.vcxproj | 1 - .../SampleCppMini.vcxproj.filters | 5 -- lib/CMakeLists.txt | 44 ++++++------- lib/shared/Shared.vcxitems | 1 - lib/shared/Shared.vcxitems.filters | 1 - tests/functests/CMakeLists.txt | 40 +++++------ tests/functests/FuncTests.vcxproj | 1 - tests/functests/FuncTests.vcxproj.filters | 3 - tests/unittests/CMakeLists.txt | 33 +++++----- tests/unittests/UnitTests.vcxproj | 1 - tools/MakeDeb.cmake | 2 +- tools/MakeRpm.cmake | 2 +- tools/MakeTgz.cmake | 3 +- tools/ParseOsRelease.cmake | 4 +- 19 files changed, 85 insertions(+), 134 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9851cf4d9..e7306afe8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1.0) -project(MSTelemetry) +project(MSTelemetry LANGUAGES C CXX) # Set installation prefix for macOS and Linux if(UNIX AND NOT DEFINED CMAKE_INSTALL_PREFIX) @@ -25,7 +25,7 @@ endif() # Enable ARC for obj-c on Apple if(APPLE) - message("-- BUILD_IOS: ${BUILD_IOS}") + message(STATUS "BUILD_IOS: ${BUILD_IOS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc") # iOS build options @@ -77,9 +77,9 @@ if(APPLE) OUTPUT_VARIABLE CMAKE_OSX_SYSROOT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - message("-- CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT}") - message("-- ARCHITECTURE: ${CMAKE_SYSTEM_PROCESSOR}") - message("-- PLATFORM: ${IOS_PLATFORM}") + message(STATUS "CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT}") + message(STATUS "ARCHITECTURE: ${CMAKE_SYSTEM_PROCESSOR}") + message(STATUS "PLATFORM: ${IOS_PLATFORM}") else() if(${MAC_ARCH} STREQUAL "x86_64") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64") @@ -99,18 +99,18 @@ if(APPLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64 -arch arm64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -arch arm64") endif() - message("-- MAC_ARCH: ${MAC_ARCH}") + message(STATUS "MAC_ARCH: ${MAC_ARCH}") endif() endif() -message("-- CMAKE_SYSTEM_INFO_FILE: ${CMAKE_SYSTEM_INFO_FILE}") -message("-- CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") -message("-- CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") -message("-- CMAKE_SYSTEM: ${CMAKE_SYSTEM}") -message("-- CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}") -message("-- CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") -message("-- TARGET_ARCH: ${TARGET_ARCH}") -message("-- CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") +message(STATUS "CMAKE_SYSTEM_INFO_FILE: ${CMAKE_SYSTEM_INFO_FILE}") +message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") +message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") +message(STATUS "CMAKE_SYSTEM: ${CMAKE_SYSTEM}") +message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}") +message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") +message(STATUS "TARGET_ARCH: ${TARGET_ARCH}") +message(STATUS "CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") include(tools/ParseOsRelease.cmake) @@ -147,12 +147,12 @@ set(DBG_FLAGS "-ggdb -gdwarf-2 -O0 ${WARN_FLAGS} -fno-builtin-malloc -fno-built if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") #TODO: -fno-rtti - message("Building Release ...") + message(STATUS "Building Release ...") set(CMAKE_C_FLAGS "$ENV{CFLAGS} ${CMAKE_C_FLAGS} -std=c11 ${REL_FLAGS}") set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} -std=c++11 ${REL_FLAGS}") else() set(USE_TCMALLOC 1) - message("Building Debug ...") + message(STATUS "Building Debug ...") include(tools/FindTcmalloc.cmake) set(CMAKE_C_FLAGS "$ENV{CFLAGS} ${CMAKE_C_FLAGS} -std=c11 ${DBG_FLAGS}") set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} -std=c++11 ${DBG_FLAGS}") @@ -167,17 +167,10 @@ if(MSVC) endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - # using Clang -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # using GCC - # Prefer to generate position-independent code +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # GCC needs explicit position-independent code set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") - # using Intel C++ -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - # using Visual Studio C++ endif() include(tools/Utils.cmake) @@ -193,7 +186,7 @@ endif() set(PAL_IMPLEMENTATION ${DEFAULT_PAL_IMPLEMENTATION}) -message(STATUS "-- PAL implementation: ${PAL_IMPLEMENTATION}") +message(STATUS "PAL implementation: ${PAL_IMPLEMENTATION}") string(TOUPPER ${PAL_IMPLEMENTATION} PAL_IMPLEMENTATION_UPPER) add_definitions(-DMATSDK_PAL_${PAL_IMPLEMENTATION_UPPER}=1) @@ -225,7 +218,7 @@ add_definitions(-DNOMINMAX) set(SDK_VERSION_PREFIX "EVT") add_definitions("-DMATSDK_VERSION_PREFIX=\"${SDK_VERSION_PREFIX}\"") -set(MATSDK_API_VERSION "3.4") +set(MATSDK_API_VERSION "3.10") string(TIMESTAMP DAYNUMBER "%j") string(REGEX REPLACE "^00" "" DAYNUMBER ${DAYNUMBER}) string(REGEX REPLACE "^0" "" DAYNUMBER ${DAYNUMBER}) @@ -241,7 +234,7 @@ else() set(MATSDK_BUILD_VERSION ${MATSDK_API_VERSION}.${DAYNUMBER}.0) endif() -message(STATUS "-- SDK version: ${SDK_VERSION_PREFIX}-${MATSDK_BUILD_VERSION}") +message(STATUS "SDK version: ${SDK_VERSION_PREFIX}-${MATSDK_BUILD_VERSION}") ################################################################################################ # HTTP stack section @@ -289,9 +282,9 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif() if(BUILD_UNIT_TESTS OR BUILD_FUNC_TESTS) - message("Adding gtest") + message(STATUS "Adding gtest") add_library(gtest STATIC IMPORTED GLOBAL) - message("Adding gmock") + message(STATUS "Adding gmock") add_library(gmock STATIC IMPORTED GLOBAL) endif() @@ -299,17 +292,10 @@ if(BUILD_APPLE_HTTP) add_definitions(-DAPPLE_HTTP=1) endif() -# Bond Lite subdirectories include_directories(bondlite/include) include_directories(lib/pal) -#if(BUILD_UNIT_TESTS) -# message("Adding bondlite tests") -# enable_testing() -# add_subdirectory(bondlite/tests) -#endif() - # Include repo root to allow includes of sqlite, zlib, and nlohmann include_directories(${CMAKE_SOURCE_DIR}) @@ -323,7 +309,7 @@ if(BUILD_LIBRARY) endif() if(BUILD_UNIT_TESTS OR BUILD_FUNC_TESTS) - message("Building tests") + message(STATUS "Building tests") enable_testing() add_subdirectory(tests) endif() @@ -334,18 +320,14 @@ endif() if (BUILD_PACKAGE) if ("${CMAKE_PACKAGE_TYPE}" STREQUAL "deb") - # FIXME: hardcode it for 64-bit Linux for now set(INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/${CPACK_DEBIAN_ARCHITECTURE}-linux-gnu) include(tools/MakeDeb.cmake) endif() if ("${CMAKE_PACKAGE_TYPE}" STREQUAL "rpm") - # TODO: [MG] - fix path set(INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu) include(tools/MakeRpm.cmake) endif() if ("${CMAKE_PACKAGE_TYPE}" STREQUAL "tgz") - # TODO: [MG] - fix path... should we simply use /usr/local/lib without CPU? - # TODO: [MG] - Windows path is not ideal -- C:/Program Files (x86)/MSTelemetry/* - what should we use instead? include(tools/MakeTgz.cmake) endif() endif() diff --git a/Solutions/before.targets b/Solutions/before.targets index 63a526c90..a31ed4e93 100644 --- a/Solutions/before.targets +++ b/Solutions/before.targets @@ -6,8 +6,9 @@ v141 v142 v143 - - v141 + v145 + + $(DefaultPlatformToolset) $(PlatformToolset) $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) diff --git a/Solutions/build.MIP.props b/Solutions/build.MIP.props index 9bd6e6d91..14ed449b9 100644 --- a/Solutions/build.MIP.props +++ b/Solutions/build.MIP.props @@ -10,8 +10,7 @@ true - v141 - 14.1 + $(DefaultPlatformToolset) mip_ClientTelemetry diff --git a/examples/cpp/SampleCpp/SampleCpp.vcxproj b/examples/cpp/SampleCpp/SampleCpp.vcxproj index 9c539f10a..a8548808f 100644 --- a/examples/cpp/SampleCpp/SampleCpp.vcxproj +++ b/examples/cpp/SampleCpp/SampleCpp.vcxproj @@ -1080,7 +1080,6 @@ - diff --git a/examples/cpp/SampleCpp/SampleCpp.vcxproj.filters b/examples/cpp/SampleCpp/SampleCpp.vcxproj.filters index 9a605a027..ae87cc1f8 100644 --- a/examples/cpp/SampleCpp/SampleCpp.vcxproj.filters +++ b/examples/cpp/SampleCpp/SampleCpp.vcxproj.filters @@ -15,9 +15,6 @@ - - Header Files - Source Files diff --git a/examples/cpp/SampleCppMini/SampleCppMini.vcxproj b/examples/cpp/SampleCppMini/SampleCppMini.vcxproj index 88bca8d6d..424394f7e 100644 --- a/examples/cpp/SampleCppMini/SampleCppMini.vcxproj +++ b/examples/cpp/SampleCppMini/SampleCppMini.vcxproj @@ -1542,7 +1542,6 @@ - diff --git a/examples/cpp/SampleCppMini/SampleCppMini.vcxproj.filters b/examples/cpp/SampleCppMini/SampleCppMini.vcxproj.filters index ad3de7523..2df19ab39 100644 --- a/examples/cpp/SampleCppMini/SampleCppMini.vcxproj.filters +++ b/examples/cpp/SampleCppMini/SampleCppMini.vcxproj.filters @@ -14,11 +14,6 @@ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - Header Files - - Source Files diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 4ebe7ddb0..8824427b4 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,7 +1,7 @@ # Honor visibility properties for all target types cmake_policy(SET CMP0063 NEW) -include_directories( . ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include/public ${CMAKE_CURRENT_SOURCE_DIR}/include/public ${CMAKE_CURRENT_SOURCE_DIR}/include/mat ${CMAKE_CURRENT_SOURCE_DIR}/pal ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR}/modules/exp ${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard ${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/Reachability ${CMAKE_CURRENT_SOURCE_DIR}/modules/cds ${CMAKE_CURRENT_SOURCE_DIR}/modules/signals ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer /usr/local/include ) +include_directories( . ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include/public ${CMAKE_CURRENT_SOURCE_DIR}/include/mat ${CMAKE_CURRENT_SOURCE_DIR}/pal ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR}/modules/exp ${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard ${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/Reachability ${CMAKE_CURRENT_SOURCE_DIR}/modules/cds ${CMAKE_CURRENT_SOURCE_DIR}/modules/signals ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer /usr/local/include ) set(SRCS decorators/BaseDecorator.cpp packager/BondSplicer.cpp @@ -60,7 +60,7 @@ if(BUILD_AZMON) include(modules/azmon/CMakeLists.txt OPTIONAL) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/exp/) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/exp/") list(APPEND SRCS modules/exp/afd/afdclient/AFDClientUtils.cpp modules/exp/afd/afdclient/AFDClient.cpp @@ -74,14 +74,14 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/exp/) ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer/) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer/") list(APPEND SRCS modules/dataviewer/DefaultDataViewer.cpp modules/dataviewer/OnDisableNotificationCollection.cpp ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/ AND BUILD_PRIVACYGUARD) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) list(APPEND SRCS modules/privacyguard/PrivacyGuard.cpp modules/privacyguard/RegisteredFileTypes.cpp @@ -89,14 +89,14 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/ AND BUILD_PRIVACYGUA ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector/ AND BUILD_LIVEEVENTINSPECTOR) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector/" AND BUILD_LIVEEVENTINSPECTOR) list(APPEND SRCS modules/liveeventinspector/LiveEventInspector.cpp modules/liveeventinspector/LiveEventInspector.hpp ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/cds/ AND BUILD_CDS) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/cds/" AND BUILD_CDS) add_definitions(-DHAVE_MAT_CDS) list(APPEND SRCS modules/cds/CdsFactory.hpp @@ -104,14 +104,14 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/cds/ AND BUILD_CDS) ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/signals/ AND BUILD_SIGNALS) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/signals/" AND BUILD_SIGNALS) list(APPEND SRCS modules/signals/Signals.cpp modules/signals/SignalsEncoder.cpp ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/ AND BUILD_SANITIZER) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS modules/sanitizer/detectors/EmailAddressDetector.cpp modules/sanitizer/detectors/JwtDetector.cpp @@ -181,7 +181,7 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") ) endif() if(APPLE AND BUILD_OBJC_WRAPPER) - message("Include ObjC Wrappers") + message(STATUS "Include ObjC Wrappers") list(APPEND SRCS ../wrappers/obj-c/ODWLogger.mm ../wrappers/obj-c/ODWLogManager.mm @@ -189,19 +189,19 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") ../wrappers/obj-c/ODWLogConfiguration.mm ../wrappers/obj-c/ODWSemanticContext.mm ) - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer/) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer/") list(APPEND SRCS ../wrappers/obj-c/ODWDiagnosticDataViewer.mm ) endif() - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/ AND BUILD_PRIVACYGUARD) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) list(APPEND SRCS ../wrappers/obj-c/ODWCommonDataContext.mm ../wrappers/obj-c/ODWPrivacyGuard.mm ../wrappers/obj-c/ODWPrivacyGuardInitConfig.mm ) endif() - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/ AND BUILD_SANITIZER) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS ../wrappers/obj-c/ODWSanitizerInitConfig.mm ../wrappers/obj-c/ODWSanitizer.mm @@ -210,7 +210,7 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") endif() if(APPLE AND BUILD_SWIFT_WRAPPER) - message("Building Swift Wrappers") + message(STATUS "Building Swift Wrappers") # Run swift build for the Swift Wrappers Package string(TOLOWER ${CMAKE_BUILD_TYPE} LOWER_BUILD_TYPE) execute_process( @@ -222,9 +222,9 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") ) if(SWIFT_BUILD_RESULT EQUAL 0) - message("Swift Wrappers build succeeded!") + message(STATUS "Swift Wrappers build succeeded!") else() - message(FATAL_ERROR, "Swift build failed with error code: ${SWIFT_BUILD_RESULT}") + message(FATAL_ERROR "Swift build failed with error code: ${SWIFT_BUILD_RESULT}") endif() endif() @@ -247,7 +247,7 @@ remove_definitions(-D_MBCS) ) # UTC module - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/utc) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/utc") list(APPEND SRCS modules/utc/desktop/UtcHelpers.cpp modules/utc/UtcTelemetrySystem.cpp @@ -259,7 +259,7 @@ else() endif() # Filtering module -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/filter) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/filter") list(APPEND SRCS modules/filter/CompliantByDefaultEventFilterModule.cpp modules/filter/CompliantByDefaultFilterApi.cpp @@ -278,7 +278,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() if(BUILD_SHARED_LIBS STREQUAL "ON") - message("-- Building shared SDK library") + message(STATUS "Building shared SDK library") # include(FindCURL) # find_package(CURL REQUIRED) @@ -313,7 +313,7 @@ if(BUILD_SHARED_LIBS STREQUAL "ON") # target_link_libraries(mat PUBLIC libsqlite3 libcurl.a libz.a libssl.a libcrypto.a "${SQLITE_LIBRARY}" "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) install(TARGETS mat EXPORT mat LIBRARY DESTINATION ${INSTALL_LIB_DIR}) else() - message("-- Building static SDK library") + message(STATUS "Building static SDK library") add_library(mat STATIC ${SRCS}) if(LINK_STATIC_DEPENDS) if(PAL_IMPLEMENTATION STREQUAL "WIN32") @@ -336,10 +336,6 @@ else() install(TARGETS mat EXPORT mat ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) endif() -message("-- Library will be installed to ${INSTALL_LIB_DIR}") +message(STATUS "Library will be installed to ${INSTALL_LIB_DIR}") -#if(PAL_IMPLEMENTATION STREQUAL "CPP11") -# #target_link_libraries(mat PUBLIC libcurl.a libz.a libssl.a libcrypto.a "${SQLITE_LIBRARY}" "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) -# #target_link_libraries(mat PUBLIC libsqlite3.a libz.a ${LIBS} "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) -#endif() diff --git a/lib/shared/Shared.vcxitems b/lib/shared/Shared.vcxitems index bf3d5df64..4b7c095ff 100644 --- a/lib/shared/Shared.vcxitems +++ b/lib/shared/Shared.vcxitems @@ -24,7 +24,6 @@ - diff --git a/lib/shared/Shared.vcxitems.filters b/lib/shared/Shared.vcxitems.filters index c488b869b..1868316bf 100644 --- a/lib/shared/Shared.vcxitems.filters +++ b/lib/shared/Shared.vcxitems.filters @@ -1,7 +1,6 @@  - diff --git a/tests/functests/CMakeLists.txt b/tests/functests/CMakeLists.txt index 656f8f866..afffaf283 100644 --- a/tests/functests/CMakeLists.txt +++ b/tests/functests/CMakeLists.txt @@ -1,4 +1,4 @@ -message("--- functests") +message(STATUS "Building functests") set(SRCS APITest.cpp @@ -8,47 +8,40 @@ set(SRCS MultipleLogManagersTests.cpp ) -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/ AND BUILD_PRIVACYGUARD) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS PrivacyGuardFuncTests.cpp ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/ AND BUILD_SANITIZER) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS SanitizerFuncTests.cpp ) endif() -if(EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/) +if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/") list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/functests/DefaultDataViewerFuncTests.cpp ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector/ AND BUILD_LIVEEVENTINSPECTOR) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector/" AND BUILD_LIVEEVENTINSPECTOR) add_definitions(-DHAVE_MAT_LIVEEVENTINSPECTOR) list(APPEND SRCS LiveEventInspectorFuncTests.cpp ) endif() -if (EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests) +if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientFuncTests.cpp ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientRealworldFuncTests.cpp ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSConfigCacheFuncTests.cpp ) - if (EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json) - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.21") - # Use file(COPY_FILE ...) for CMake 3.21 and later - file(COPY_FILE ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json ${CMAKE_BINARY_DIR}/test.json) - else() - # Use file(COPY ...) as an alternative for older versions - file(COPY ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json - DESTINATION ${CMAKE_BINARY_DIR}) - endif() + if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json") + configure_file(${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json ${CMAKE_BINARY_DIR}/test.json COPYONLY) endif() endif() @@ -63,11 +56,11 @@ endif() if(PAL_IMPLEMENTATION STREQUAL "WIN32") # Link against prebuilt libraries on Windows - message("--- WIN32: Linking against prebuilt libraries") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/gtest") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/gmock") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/zlib") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/sqlite") + message(STATUS "WIN32: Linking against prebuilt libraries") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gtest") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gmock") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/zlib") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/sqlite") # link_directories(${CMAKE_BINARY_DIR}/gtest/ ${CMAKE_BINARY_DIR}/gmock/ ${CMAKE_BINARY_DIR}/zlib/ ${CMAKE_BINARY_DIR}/sqlite/) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../zlib ) target_link_libraries(FuncTests @@ -109,10 +102,9 @@ else() set (PLATFORM_LIBS "atomic") endif() - # Find libraries - message("--- Linking libraries! ") - message("Current Dir: ${CMAKE_CURRENT_SOURCE_DIR}") - message("Binary Dir: ${CMAKE_BINARY_DIR}") + message(STATUS "Linking libraries") + message(STATUS "Current Dir: ${CMAKE_CURRENT_SOURCE_DIR}") + message(STATUS "Binary Dir: ${CMAKE_BINARY_DIR}") set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) diff --git a/tests/functests/FuncTests.vcxproj b/tests/functests/FuncTests.vcxproj index b01ff58e9..f5977c7c7 100644 --- a/tests/functests/FuncTests.vcxproj +++ b/tests/functests/FuncTests.vcxproj @@ -436,7 +436,6 @@ - diff --git a/tests/functests/FuncTests.vcxproj.filters b/tests/functests/FuncTests.vcxproj.filters index 50dd37f27..7e35d8020 100644 --- a/tests/functests/FuncTests.vcxproj.filters +++ b/tests/functests/FuncTests.vcxproj.filters @@ -53,9 +53,6 @@ mocks - - mocks - mocks diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index e453df619..388b7024f 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -1,4 +1,4 @@ -message("--- unittests") +message(STATUS "Building unittests") set(SRCS AIJsonSerializerTests.cpp @@ -54,7 +54,7 @@ set_source_files_properties(${SRCS} PROPERTIES COMPILE_FLAGS -Wno-deprecated-dec # Enable Azure Monitor unit tests when the module is present. # The AIJsonSerializer test sources are guarded by HAVE_MAT_AI. -if (EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/azmon/AIJsonSerializer.hpp) +if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/azmon/AIJsonSerializer.hpp") add_definitions(-DHAVE_MAT_AI) endif() @@ -66,7 +66,7 @@ if (APPLE) endif() endif() -if (EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests) +if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSConfigCacheTests.cpp ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientUtilsTests.cpp @@ -74,7 +74,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests) ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/ AND BUILD_PRIVACYGUARD) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/InitializationConfigurationTests.cpp @@ -85,7 +85,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/ AND BUILD_PRIVACYGUA ) endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/ AND BUILD_SANITIZER) +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerJwtTests.cpp ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerProviderTests.cpp @@ -97,7 +97,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/ AND BUILD_SANITIZER) ) endif() -if(EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/) +if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/") list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/unittests/DefaultDataViewerTests.cpp DataViewerCollectionTests.cpp @@ -115,11 +115,11 @@ endif() if(PAL_IMPLEMENTATION STREQUAL "WIN32") # Link against prebuilt libraries on Windows - message("--- WIN32: Linking against prebuilt libraries") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/gtest") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/gmock") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/zlib") - message("--- WIN32: ... ${CMAKE_BINARY_DIR}/sqlite") + message(STATUS "WIN32: Linking against prebuilt libraries") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gtest") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gmock") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/zlib") + message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/sqlite") # link_directories(${CMAKE_BINARY_DIR}/gtest/ ${CMAKE_BINARY_DIR}/gmock/ ${CMAKE_BINARY_DIR}/zlib/ ${CMAKE_BINARY_DIR}/sqlite/) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../zlib ) target_link_libraries(UnitTests @@ -162,10 +162,9 @@ else() set (PLATFORM_LIBS "atomic") endif() - # Find libraries - message("--- Linking libraries! ") - message("Current Dir: ${CMAKE_CURRENT_SOURCE_DIR}") - message("Binary Dir: ${CMAKE_BINARY_DIR}") + message(STATUS "Linking libraries") + message(STATUS "Current Dir: ${CMAKE_CURRENT_SOURCE_DIR}") + message(STATUS "Binary Dir: ${CMAKE_BINARY_DIR}") include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../lib/ ) @@ -183,8 +182,8 @@ else() ${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/googletest/build/lib/ ) - message("GTEST: ${LIBGTEST}") - message("GMOCK: ${LIBGMOCK}") + message(STATUS "GTEST: ${LIBGTEST}") + message(STATUS "GMOCK: ${LIBGMOCK}") target_link_libraries(UnitTests ${LIBGTEST} diff --git a/tests/unittests/UnitTests.vcxproj b/tests/unittests/UnitTests.vcxproj index ea5e080ee..a7412e484 100644 --- a/tests/unittests/UnitTests.vcxproj +++ b/tests/unittests/UnitTests.vcxproj @@ -495,7 +495,6 @@ - diff --git a/tools/MakeDeb.cmake b/tools/MakeDeb.cmake index efec5ad32..4f839ab5b 100644 --- a/tools/MakeDeb.cmake +++ b/tools/MakeDeb.cmake @@ -24,7 +24,7 @@ set(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}") # FIXME: add architecture name in file name set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") -message("-- Package name: ${CPACK_PACKAGE_FILE_NAME}.deb") +message(STATUS "Package name: ${CPACK_PACKAGE_FILE_NAME}.deb") #install(TARGETS ${MAT_SDK_LIB_DIR}/libMAT.a ARCHIVE DESTINATION lib/MAT COMPONENT headers) #install(FILES ${MAT_SDK_INC_DIR}/*.* DESTINATION include/MAT COMPONENT libraries) diff --git a/tools/MakeRpm.cmake b/tools/MakeRpm.cmake index c4db45de0..121eba7b6 100644 --- a/tools/MakeRpm.cmake +++ b/tools/MakeRpm.cmake @@ -18,7 +18,7 @@ set(CPACK_PACKAGE_NAME "mat_sdk") set(CPACK_PACKAGE_RELEASE "0") set(CPACK_PACKAGE_VENDOR "Microsoft") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") -message("-- Package name: ${CPACK_RPM_PACKAGE_FILE_NAME}.rpm") +message(STATUS "Package name: ${CPACK_RPM_PACKAGE_FILE_NAME}.rpm") #configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mat-sdk.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/arka-sdk.spec" @ONLY IMMEDIATE) #set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/mat-sdk.spec") diff --git a/tools/MakeTgz.cmake b/tools/MakeTgz.cmake index bf159ab8d..44c308e32 100644 --- a/tools/MakeTgz.cmake +++ b/tools/MakeTgz.cmake @@ -24,8 +24,7 @@ file(GLOB ALL_TARGET_LIBS "${CMAKE_CURRENT_BINARY_DIR}/lib/libmat.*") install(FILES ${ALL_TARGET_LIBS} DESTINATION lib COMPONENT libraries) #install(FILES ${MAT_SDK_INC_DIR}/*.* DESTINATION include/mat COMPONENT libraries) -# FIXME: add architecture name in file name set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") -message("-- Package name: ${CPACK_PACKAGE_FILE_NAME}.tgz") +message(STATUS "Package name: ${CPACK_PACKAGE_FILE_NAME}.tgz") include(CPack) diff --git a/tools/ParseOsRelease.cmake b/tools/ParseOsRelease.cmake index 48bd0398a..fc3abe9af 100644 --- a/tools/ParseOsRelease.cmake +++ b/tools/ParseOsRelease.cmake @@ -1,6 +1,6 @@ # Parse /etc/os-release to determine Linux distro -if(EXISTS /etc/os-release) +if(EXISTS "/etc/os-release") file(STRINGS /etc/os-release OS_RELEASE) foreach(NameAndValue ${OS_RELEASE}) @@ -13,7 +13,7 @@ foreach(NameAndValue ${OS_RELEASE}) # Strip quotes from value string(REPLACE "\"" "" Value ${Value}) # Set the variable - message("-- /etc/os_release : ${Name}=${Value}") + message(STATUS "/etc/os_release : ${Name}=${Value}") set("OS_RELEASE_${Name}" "${Value}") endforeach() From 7d9bbde0eb7affc21b62c1e02eb536865abb6e1b Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Thu, 30 Apr 2026 06:57:19 -0700 Subject: [PATCH 02/39] Fix #1416 review follow-ups Keep the before.targets toolset selection deterministic on newer Visual Studio hosts, but only set the MIP props fallback when a consumer has not already chosen a toolset. While addressing the MSBuild review comments, also point the optional module test conditions and source paths at the real lib/modules locations and use CPACK_PACKAGE_FILE_NAME for the RPM status message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Solutions/before.targets | 13 +++++----- Solutions/build.MIP.props | 43 +++++++++++++++++++--------------- tests/functests/CMakeLists.txt | 12 +++++----- tests/unittests/CMakeLists.txt | 4 ++-- tools/MakeRpm.cmake | 2 +- 5 files changed, 39 insertions(+), 35 deletions(-) diff --git a/Solutions/before.targets b/Solutions/before.targets index a31ed4e93..052e5d77f 100644 --- a/Solutions/before.targets +++ b/Solutions/before.targets @@ -3,13 +3,12 @@ $(SolutionDir)\..\third_party\krabsetw\krabs;$(CustomIncludePath) - v141 - v142 - v143 - v145 - - $(DefaultPlatformToolset) - $(PlatformToolset) + + v145 + v143 + v142 + v141 + v141 $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) $(LatestTargetPlatformVersion) diff --git a/Solutions/build.MIP.props b/Solutions/build.MIP.props index 14ed449b9..2419c4c36 100644 --- a/Solutions/build.MIP.props +++ b/Solutions/build.MIP.props @@ -1,19 +1,24 @@ - - - - - %(PreprocessorDefinitions);CONFIG_CUSTOM_H="config-MIP.h";MATSDK_SHARED_LIB=1; - - - ucrtbased.dll; %(DelayLoadDLLs) - - - - true - $(DefaultPlatformToolset) - - - mip_ClientTelemetry - - - + + + + + %(PreprocessorDefinitions);CONFIG_CUSTOM_H="config-MIP.h";MATSDK_SHARED_LIB=1; + + + ucrtbased.dll; %(DelayLoadDLLs) + + + + true + $(DefaultPlatformToolset) + v145 + v143 + v142 + v141 + v141 + + + mip_ClientTelemetry + + + diff --git a/tests/functests/CMakeLists.txt b/tests/functests/CMakeLists.txt index afffaf283..cb295e5c8 100644 --- a/tests/functests/CMakeLists.txt +++ b/tests/functests/CMakeLists.txt @@ -8,16 +8,16 @@ set(SRCS MultipleLogManagersTests.cpp ) -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) +if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS - PrivacyGuardFuncTests.cpp + ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/functests/PrivacyGuardFuncTests.cpp ) endif() -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) +if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS - SanitizerFuncTests.cpp + ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/functests/SanitizerFuncTests.cpp ) endif() @@ -27,10 +27,10 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/") ) endif() -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector/" AND BUILD_LIVEEVENTINSPECTOR) +if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/liveeventinspector/" AND BUILD_LIVEEVENTINSPECTOR) add_definitions(-DHAVE_MAT_LIVEEVENTINSPECTOR) list(APPEND SRCS - LiveEventInspectorFuncTests.cpp + ${CMAKE_SOURCE_DIR}/lib/modules/liveeventinspector/tests/functests/LiveEventInspectorFuncTests.cpp ) endif() diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index 388b7024f..1b29db3bf 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -74,7 +74,7 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") ) endif() -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) +if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/InitializationConfigurationTests.cpp @@ -85,7 +85,7 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYG ) endif() -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) +if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerJwtTests.cpp ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerProviderTests.cpp diff --git a/tools/MakeRpm.cmake b/tools/MakeRpm.cmake index 121eba7b6..8d9cf0b67 100644 --- a/tools/MakeRpm.cmake +++ b/tools/MakeRpm.cmake @@ -18,7 +18,7 @@ set(CPACK_PACKAGE_NAME "mat_sdk") set(CPACK_PACKAGE_RELEASE "0") set(CPACK_PACKAGE_VENDOR "Microsoft") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") -message(STATUS "Package name: ${CPACK_RPM_PACKAGE_FILE_NAME}.rpm") +message(STATUS "Package name: ${CPACK_PACKAGE_FILE_NAME}.rpm") #configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mat-sdk.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/arka-sdk.spec" @ONLY IMMEDIATE) #set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/mat-sdk.spec") From 13f66c19fef6f7c5fd7f5292ccfbd6bd84bf07bd Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 15:23:36 -0500 Subject: [PATCH 03/39] Fix #1416 Apple runtime regressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 8 ++++---- lib/api/Logger.cpp | 3 ++- lib/http/HttpClientManager.cpp | 10 ++++++++-- lib/http/HttpClient_Apple.mm | 24 ++++++------------------ lib/http/HttpResponseDecoder.cpp | 6 +++--- 5 files changed, 23 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7306afe8..cc99131af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,20 +121,20 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-but-set-variable") else() # Clang / AppleClang - set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unknown-warning-option -Wno-unused-but-set-variable") + set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-nan-infinity-disabled") endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # Using GCC with -s and -Wl linker flags - set(REL_FLAGS "-s -Wl,--gc-sections -Os ${WARN_FLAGS} -ffunction-sections -fdata-sections -fmerge-all-constants -ffast-math -fno-finite-math-only") + set(REL_FLAGS "-s -Wl,--gc-sections -Os ${WARN_FLAGS} -ffunction-sections -fdata-sections -fmerge-all-constants -ffast-math") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(REL_FLAGS "${WARN_FLAGS}") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # AppleClang does not support -ffunction-sections and -fdata-sections with the -fembed-bitcode and -fembed-bitcode-marker - set(REL_FLAGS "-Os ${WARN_FLAGS} -fmerge-all-constants -ffast-math -fno-finite-math-only") + set(REL_FLAGS "-Os ${WARN_FLAGS} -fmerge-all-constants -ffast-math") else() # Using clang - strip unsupported GCC options - set(REL_FLAGS "-Os ${WARN_FLAGS} -ffunction-sections -fmerge-all-constants -ffast-math -fno-finite-math-only") + set(REL_FLAGS "-Os ${WARN_FLAGS} -ffunction-sections -fmerge-all-constants -ffast-math") endif() ## Uncomment this to reduce the volume of note warnings on RPi4 w/gcc-8 Ref. https://gcc.gnu.org/ml/gcc/2017-05/msg00073.html diff --git a/lib/api/Logger.cpp b/lib/api/Logger.cpp index 54d883664..cbe503f8c 100644 --- a/lib/api/Logger.cpp +++ b/lib/api/Logger.cpp @@ -127,7 +127,8 @@ namespace MAT_NS_BEGIN Logger::~Logger() noexcept { - LOG_TRACE("%p: Destroyed", this); + // Intentionally empty — logging here triggers a static-destruction-order + // crash on iOS simulator after logging teardown. } ISemanticContext* Logger::GetSemanticContext() const diff --git a/lib/http/HttpClientManager.cpp b/lib/http/HttpClientManager.cpp index 58fa5fb4a..eea19fd1b 100644 --- a/lib/http/HttpClientManager.cpp +++ b/lib/http/HttpClientManager.cpp @@ -149,11 +149,17 @@ namespace MAT_NS_BEGIN { void HttpClientManager::cancelAllRequests() { cancelAllRequestsAsync(); - while (!m_httpCallbacks.empty()) + while (true) + { + { + LOCKGUARD(m_httpCallbacksMtx); + if (m_httpCallbacks.empty()) + break; + } std::this_thread::yield(); + } } // start async cancellation } MAT_NS_END - diff --git a/lib/http/HttpClient_Apple.mm b/lib/http/HttpClient_Apple.mm index 05817087a..579b05313 100644 --- a/lib/http/HttpClient_Apple.mm +++ b/lib/http/HttpClient_Apple.mm @@ -132,23 +132,6 @@ void HandleResponse(NSData* data, NSURLResponse* response, NSError* error) void Cancel() { [m_dataTask cancel]; - [session getTasksWithCompletionHandler:^(NSArray* dataTasks, NSArray* uploadTasks, NSArray* downloadTasks) - { - for (NSURLSessionTask* _task in dataTasks) - { - [_task cancel]; - } - - for (NSURLSessionTask* _task in downloadTasks) - { - [_task cancel]; - } - - for (NSURLSessionTask* _task in uploadTasks) - { - [_task cancel]; - } - }]; } private: @@ -214,8 +197,13 @@ void Cancel() for (const auto &id : ids) CancelRequestAsync(id); - while (!m_requests.empty()) + while (true) { + { + std::lock_guard lock(m_requestsMtx); + if (m_requests.empty()) + break; + } PAL::sleep(100); std::this_thread::yield(); } diff --git a/lib/http/HttpResponseDecoder.cpp b/lib/http/HttpResponseDecoder.cpp index 11e9d4096..508e0e205 100644 --- a/lib/http/HttpResponseDecoder.cpp +++ b/lib/http/HttpResponseDecoder.cpp @@ -67,13 +67,11 @@ namespace MAT_NS_BEGIN { break; case HttpResult_Aborted: - ctx->httpResponse = nullptr; outcome = Abort; break; case HttpResult_LocalFailure: case HttpResult_NetworkFailure: - ctx->httpResponse = nullptr; outcome = RetryNetwork; break; } @@ -129,6 +127,7 @@ namespace MAT_NS_BEGIN { evt.param1 = 0; // response.GetStatusCode(); DispatchEvent(evt); } + delete ctx->httpResponse; ctx->httpResponse = nullptr; // eventsRejected(ctx); // FIXME: [MG] - investigate why ctx gets corrupt after eventsRejected requestAborted(ctx); @@ -159,6 +158,8 @@ namespace MAT_NS_BEGIN { evt.param1 = response.GetStatusCode(); DispatchEvent(evt); } + delete ctx->httpResponse; + ctx->httpResponse = nullptr; temporaryNetworkFailure(ctx); break; } @@ -253,4 +254,3 @@ namespace MAT_NS_BEGIN { } } MAT_NS_END - From b47f5c0e4519528ca389a7c91555f48174cb8e8e Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 17:09:41 -0500 Subject: [PATCH 04/39] Make CurlHttpOperation own CA path Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lib/http/HttpClient_Curl.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/http/HttpClient_Curl.hpp b/lib/http/HttpClient_Curl.hpp index 972cc4fec..c7a5bdecb 100644 --- a/lib/http/HttpClient_Curl.hpp +++ b/lib/http/HttpClient_Curl.hpp @@ -109,6 +109,7 @@ class CurlHttpOperation { m_callback(callback), m_method(method), m_url(url), + m_sslCaInfo(sslCaInfo), // Local vars requestHeaders(requestHeaders), @@ -140,8 +141,8 @@ class CurlHttpOperation { curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, sslVerify ? 1L : 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, sslVerify ? 2L : 0L); - if (!sslCaInfo.empty()) { - curl_easy_setopt(curl, CURLOPT_CAINFO, sslCaInfo.c_str()); + if (!m_sslCaInfo.empty()) { + curl_easy_setopt(curl, CURLOPT_CAINFO, m_sslCaInfo.c_str()); } // HTTP/2 please, fallback to HTTP/1.1 if not supported curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); @@ -434,6 +435,7 @@ class CurlHttpOperation { // Request values std::string m_method; std::string m_url; + std::string m_sslCaInfo; const std::map& requestHeaders; const std::vector& requestBody; struct curl_slist *m_headersChunk = nullptr; @@ -534,4 +536,3 @@ class CurlHttpOperation { #endif // HAVE_MAT_DEFAULT_HTTP_CLIENT #endif // HTTPCLIENTCURL_HPP - From 028199c075f96e04e90f8c979a18329228934d3f Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 18:01:29 -0500 Subject: [PATCH 05/39] Restore nonfunctional CMake comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc99131af..3117d4b29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # -Wno-unknown-warning-option is Clang-only, omitted here set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-but-set-variable") else() - # Clang / AppleClang + # No -pedantic -Wno-extra-semi -Wno-gnu-zero-variadic-macro-arguments set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-nan-infinity-disabled") endif() @@ -167,10 +167,17 @@ if(MSVC) endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # GCC needs explicit position-independent code +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # using Clang +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # using GCC + # Prefer to generate position-independent code set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + # using Intel C++ +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + # using Visual Studio C++ endif() include(tools/Utils.cmake) @@ -292,10 +299,17 @@ if(BUILD_APPLE_HTTP) add_definitions(-DAPPLE_HTTP=1) endif() +# Bond Lite subdirectories include_directories(bondlite/include) include_directories(lib/pal) +#if(BUILD_UNIT_TESTS) +# message("Adding bondlite tests") +# enable_testing() +# add_subdirectory(bondlite/tests) +#endif() + # Include repo root to allow includes of sqlite, zlib, and nlohmann include_directories(${CMAKE_SOURCE_DIR}) @@ -320,14 +334,18 @@ endif() if (BUILD_PACKAGE) if ("${CMAKE_PACKAGE_TYPE}" STREQUAL "deb") + # FIXME: hardcode it for 64-bit Linux for now set(INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/${CPACK_DEBIAN_ARCHITECTURE}-linux-gnu) include(tools/MakeDeb.cmake) endif() if ("${CMAKE_PACKAGE_TYPE}" STREQUAL "rpm") + # TODO: [MG] - fix path set(INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu) include(tools/MakeRpm.cmake) endif() if ("${CMAKE_PACKAGE_TYPE}" STREQUAL "tgz") + # TODO: [MG] - fix path... should we simply use /usr/local/lib without CPU? + # TODO: [MG] - Windows path is not ideal -- C:/Program Files (x86)/MSTelemetry/* - what should we use instead? include(tools/MakeTgz.cmake) endif() endif() From 5c0ded8aa5a53f0e1ec752b3902e95987b61237a Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 18:41:17 -0500 Subject: [PATCH 06/39] Remove runtime overlap with #1429 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lib/api/Logger.cpp | 3 +-- lib/http/HttpClientManager.cpp | 10 ++-------- lib/http/HttpClient_Apple.mm | 24 ++++++++++++++++++------ lib/http/HttpResponseDecoder.cpp | 6 +++--- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/lib/api/Logger.cpp b/lib/api/Logger.cpp index cbe503f8c..54d883664 100644 --- a/lib/api/Logger.cpp +++ b/lib/api/Logger.cpp @@ -127,8 +127,7 @@ namespace MAT_NS_BEGIN Logger::~Logger() noexcept { - // Intentionally empty — logging here triggers a static-destruction-order - // crash on iOS simulator after logging teardown. + LOG_TRACE("%p: Destroyed", this); } ISemanticContext* Logger::GetSemanticContext() const diff --git a/lib/http/HttpClientManager.cpp b/lib/http/HttpClientManager.cpp index eea19fd1b..58fa5fb4a 100644 --- a/lib/http/HttpClientManager.cpp +++ b/lib/http/HttpClientManager.cpp @@ -149,17 +149,11 @@ namespace MAT_NS_BEGIN { void HttpClientManager::cancelAllRequests() { cancelAllRequestsAsync(); - while (true) - { - { - LOCKGUARD(m_httpCallbacksMtx); - if (m_httpCallbacks.empty()) - break; - } + while (!m_httpCallbacks.empty()) std::this_thread::yield(); - } } // start async cancellation } MAT_NS_END + diff --git a/lib/http/HttpClient_Apple.mm b/lib/http/HttpClient_Apple.mm index 579b05313..05817087a 100644 --- a/lib/http/HttpClient_Apple.mm +++ b/lib/http/HttpClient_Apple.mm @@ -132,6 +132,23 @@ void HandleResponse(NSData* data, NSURLResponse* response, NSError* error) void Cancel() { [m_dataTask cancel]; + [session getTasksWithCompletionHandler:^(NSArray* dataTasks, NSArray* uploadTasks, NSArray* downloadTasks) + { + for (NSURLSessionTask* _task in dataTasks) + { + [_task cancel]; + } + + for (NSURLSessionTask* _task in downloadTasks) + { + [_task cancel]; + } + + for (NSURLSessionTask* _task in uploadTasks) + { + [_task cancel]; + } + }]; } private: @@ -197,13 +214,8 @@ void Cancel() for (const auto &id : ids) CancelRequestAsync(id); - while (true) + while (!m_requests.empty()) { - { - std::lock_guard lock(m_requestsMtx); - if (m_requests.empty()) - break; - } PAL::sleep(100); std::this_thread::yield(); } diff --git a/lib/http/HttpResponseDecoder.cpp b/lib/http/HttpResponseDecoder.cpp index 508e0e205..11e9d4096 100644 --- a/lib/http/HttpResponseDecoder.cpp +++ b/lib/http/HttpResponseDecoder.cpp @@ -67,11 +67,13 @@ namespace MAT_NS_BEGIN { break; case HttpResult_Aborted: + ctx->httpResponse = nullptr; outcome = Abort; break; case HttpResult_LocalFailure: case HttpResult_NetworkFailure: + ctx->httpResponse = nullptr; outcome = RetryNetwork; break; } @@ -127,7 +129,6 @@ namespace MAT_NS_BEGIN { evt.param1 = 0; // response.GetStatusCode(); DispatchEvent(evt); } - delete ctx->httpResponse; ctx->httpResponse = nullptr; // eventsRejected(ctx); // FIXME: [MG] - investigate why ctx gets corrupt after eventsRejected requestAborted(ctx); @@ -158,8 +159,6 @@ namespace MAT_NS_BEGIN { evt.param1 = response.GetStatusCode(); DispatchEvent(evt); } - delete ctx->httpResponse; - ctx->httpResponse = nullptr; temporaryNetworkFailure(ctx); break; } @@ -254,3 +253,4 @@ namespace MAT_NS_BEGIN { } } MAT_NS_END + From a262717e65470fa982881555a952aa7911bea510 Mon Sep 17 00:00:00 2001 From: bmehta001 Date: Mon, 11 May 2026 12:34:45 -0500 Subject: [PATCH 07/39] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- tools/ParseOsRelease.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ParseOsRelease.cmake b/tools/ParseOsRelease.cmake index fc3abe9af..61952f57f 100644 --- a/tools/ParseOsRelease.cmake +++ b/tools/ParseOsRelease.cmake @@ -13,7 +13,7 @@ foreach(NameAndValue ${OS_RELEASE}) # Strip quotes from value string(REPLACE "\"" "" Value ${Value}) # Set the variable - message(STATUS "/etc/os_release : ${Name}=${Value}") + message(STATUS "/etc/os-release : ${Name}=${Value}") set("OS_RELEASE_${Name}" "${Value}") endforeach() From 93502cc71c03e61e566e1c6211d0b947071229d0 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Mon, 11 May 2026 12:40:14 -0500 Subject: [PATCH 08/39] Quote functest configure_file paths Quote the optional ECS test.json configure_file input and output paths so CMake handles source or build directories that contain spaces. Files changed: - tests/functests/CMakeLists.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/functests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functests/CMakeLists.txt b/tests/functests/CMakeLists.txt index cb295e5c8..0c2074e99 100644 --- a/tests/functests/CMakeLists.txt +++ b/tests/functests/CMakeLists.txt @@ -41,7 +41,7 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSConfigCacheFuncTests.cpp ) if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json") - configure_file(${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json ${CMAKE_BINARY_DIR}/test.json COPYONLY) + configure_file("${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json" "${CMAKE_BINARY_DIR}/test.json" COPYONLY) endif() endif() From 704d29b5f5bdf82109545de13451daef803a24d6 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Thu, 14 May 2026 18:59:36 -0500 Subject: [PATCH 09/39] Drop -ffast-math from Unix REL_FLAGS PR #1416 inadvertently regressed PR #1415 by removing -fno-finite-math-only from the three Unix REL_FLAGS branches and adding -Wno-nan-infinity-disabled to silence the Clang diagnostic. That left release builds using -ffast-math without preserving the NaN/Inf semantics needed by nlohmann::json and SQLite paths. Remove -ffast-math entirely from the GCC, AppleClang, and generic Clang release flags rather than relying on -fno-finite-math-only to partially undo it. This SDK is not floating-point compute-bound; its hot paths are string, Bond/JSON serialization, HTTP I/O, and SQLite reads/writes. Avoiding -ffast-math: - preserves std::isnan/std::isinf behavior for JSON and storage code, - avoids compiler/runtime fast-math side effects such as x86 GCC's crtfastmath.o changing MXCSR FTZ/DAZ behavior process-wide, and - aligns with SQLite's guidance to avoid fast-math. This subsumes #1415's partial mitigation and aligns with #1392's intent, extended to GCC because GCC fast-math has the same broad assumptions and runtime side effects. Also remove -Wno-nan-infinity-disabled because the warning should not be suppressed once the cause is gone. Validation: - CMake Release build of UnitTests on macOS arm64 (AppleClang 21). - UnitTests passed on macOS arm64. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3117d4b29..51d09802a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,20 +121,20 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-but-set-variable") else() # No -pedantic -Wno-extra-semi -Wno-gnu-zero-variadic-macro-arguments - set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-nan-infinity-disabled") + set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unknown-warning-option -Wno-unused-but-set-variable") endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # Using GCC with -s and -Wl linker flags - set(REL_FLAGS "-s -Wl,--gc-sections -Os ${WARN_FLAGS} -ffunction-sections -fdata-sections -fmerge-all-constants -ffast-math") + set(REL_FLAGS "-s -Wl,--gc-sections -Os ${WARN_FLAGS} -ffunction-sections -fdata-sections -fmerge-all-constants") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(REL_FLAGS "${WARN_FLAGS}") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # AppleClang does not support -ffunction-sections and -fdata-sections with the -fembed-bitcode and -fembed-bitcode-marker - set(REL_FLAGS "-Os ${WARN_FLAGS} -fmerge-all-constants -ffast-math") + set(REL_FLAGS "-Os ${WARN_FLAGS} -fmerge-all-constants") else() # Using clang - strip unsupported GCC options - set(REL_FLAGS "-Os ${WARN_FLAGS} -ffunction-sections -fmerge-all-constants -ffast-math") + set(REL_FLAGS "-Os ${WARN_FLAGS} -ffunction-sections -fmerge-all-constants") endif() ## Uncomment this to reduce the volume of note warnings on RPi4 w/gcc-8 Ref. https://gcc.gnu.org/ml/gcc/2017-05/msg00073.html From 1cfe3260d65c7aa0ac43d811c3fc5adac30cf399 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Thu, 21 May 2026 19:52:23 -0500 Subject: [PATCH 10/39] Restore Clang warning comment clarity Avoid carrying a confusing note about warning flags that are not used, and keep CMakeLists.txt focused on active compiler settings. Files changed: - CMakeLists.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51d09802a..e9d1fdabe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # -Wno-unknown-warning-option is Clang-only, omitted here set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-but-set-variable") else() - # No -pedantic -Wno-extra-semi -Wno-gnu-zero-variadic-macro-arguments + # Clang / AppleClang set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unknown-warning-option -Wno-unused-but-set-variable") endif() From 1de44ae2334af354003d7c61f3c631e38fa5c4ea Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 12:34:51 -0500 Subject: [PATCH 11/39] tests(cmake): quote module source paths in list(APPEND SRCS) blocks Copilot review on PR #1416 flagged 7 unquoted ${CMAKE_SOURCE_DIR}/... paths inside list(APPEND SRCS ...) calls. CMake splits unquoted arguments on whitespace, so a checkout path containing spaces (very common on Windows: C:\Users\First Last\source\...) would fragment a single source path into multiple list elements and the test wouldn't compile. Quote every ${CMAKE_SOURCE_DIR}/.../*.cpp path inside list(APPEND SRCS ...) in both tests/unittests/CMakeLists.txt and tests/functests/CMakeLists.txt (23 paths total, including the privacyguard + sanitizer blocks Copilot didn't cite but that share the same hazard). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/functests/CMakeLists.txt | 14 +++++++------- tests/unittests/CMakeLists.txt | 32 ++++++++++++++++---------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/functests/CMakeLists.txt b/tests/functests/CMakeLists.txt index 0c2074e99..29198bb96 100644 --- a/tests/functests/CMakeLists.txt +++ b/tests/functests/CMakeLists.txt @@ -11,34 +11,34 @@ set(SRCS if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/functests/PrivacyGuardFuncTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/functests/PrivacyGuardFuncTests.cpp" ) endif() if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/functests/SanitizerFuncTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/functests/SanitizerFuncTests.cpp" ) endif() if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/") list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/functests/DefaultDataViewerFuncTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/functests/DefaultDataViewerFuncTests.cpp" ) endif() if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/liveeventinspector/" AND BUILD_LIVEEVENTINSPECTOR) add_definitions(-DHAVE_MAT_LIVEEVENTINSPECTOR) list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/liveeventinspector/tests/functests/LiveEventInspectorFuncTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/liveeventinspector/tests/functests/LiveEventInspectorFuncTests.cpp" ) endif() if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientFuncTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientRealworldFuncTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSConfigCacheFuncTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientFuncTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientRealworldFuncTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSConfigCacheFuncTests.cpp" ) if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json") configure_file("${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json" "${CMAKE_BINARY_DIR}/test.json" COPYONLY) diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index 1b29db3bf..41c734a31 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -68,38 +68,38 @@ endif() if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSConfigCacheTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientUtilsTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSConfigCacheTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientUtilsTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientTests.cpp" ) endif() if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/InitializationConfigurationTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernEventTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernMetadataProviderTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyGuardTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/SystematicSamplerTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/InitializationConfigurationTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernEventTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernMetadataProviderTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyGuardTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/SystematicSamplerTests.cpp" ) endif() if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerJwtTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerProviderTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerSitePathTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerStringUtilsTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerUrlTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerTrieTests.cpp - ${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SPOPasswordTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerJwtTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerProviderTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerSitePathTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerStringUtilsTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerUrlTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerTrieTests.cpp" + "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SPOPasswordTests.cpp" ) endif() if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/") list(APPEND SRCS - ${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/unittests/DefaultDataViewerTests.cpp + "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/unittests/DefaultDataViewerTests.cpp" DataViewerCollectionTests.cpp ) endif() From 337028a7bc33c717552a1bd09d45e8678fc0448d Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 12:46:30 -0500 Subject: [PATCH 12/39] Solutions: drop speculative v145 PlatformToolset mapping for VS 18.0+ Copilot review on PR #1416 flagged that mapping VisualStudioVersion >= 18.0 to PlatformToolset v145 is a guess: VS 2025/2026/etc. has not shipped, the toolset moniker for that release may differ, and pinning to a non-existent toolset name causes MSBuild to fail early with "unknown PlatformToolset" on any machine that does pick up that VS version. Drop the v145 mapping from both before.targets and build.MIP.props. Future VS versions fall through to the v141 fallback (same behavior as before PR #1416, just one less wrong-toolset-name failure mode). Add explicit mappings for new toolsets as they actually ship. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Solutions/before.targets | 2 +- Solutions/build.MIP.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Solutions/before.targets b/Solutions/before.targets index 052e5d77f..9145f2d4d 100644 --- a/Solutions/before.targets +++ b/Solutions/before.targets @@ -4,7 +4,7 @@ - v145 + v143 v142 v141 diff --git a/Solutions/build.MIP.props b/Solutions/build.MIP.props index 2419c4c36..a72841ce5 100644 --- a/Solutions/build.MIP.props +++ b/Solutions/build.MIP.props @@ -11,7 +11,7 @@ true $(DefaultPlatformToolset) - v145 + v143 v142 v141 From c4b3c98f1b46393ecc3da2fed4bf7bc25658f87c Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Thu, 28 May 2026 16:16:58 -0500 Subject: [PATCH 13/39] cmake: stop overriding CMAKE_CXX_STANDARD with -std=c++11 The top-level CMakeLists.txt asks for C++14 (CMAKE_CXX_STANDARD 14, set in 2018) but then re-injects -std=c++11 into CMAKE_CXX_FLAGS for both Release and Debug Unix builds (set in 2019 when gcc-4.x / gcc-5.x C++14 support was still spotty). That explicit flag wins, so the Unix builds have actually been C++11 ever since, contradicting the stated standard. This is a vestige: gcc-5+, clang-3.4+, and MSVC 2015+ all support C++14 fully, and Android (lib/android_build/) already sets CMAKE_CXX_STANDARD 14 explicitly. Removing the override aligns the Unix CMake builds with the intended standard. - Drop the stale gcc-4.x/5.x caveat comment and add CMAKE_CXX_STANDARD_REQUIRED ON so the build fails loudly on toolchains that cannot do C++14, rather than silently falling back. - Drop the -std=c++11 fragment from both REL and DBG CMAKE_CXX_FLAGS lines. C and C11 are left alone (C11 remains the C floor). Not touched in this commit: - examples/**/CMakeLists.txt and wrappers/obj-c/CMakeLists.txt also pin -std=c++11. Those are standalone sample/wrapper build scripts not wired via add_subdirectory and not built by any CI workflow; their pins are intentional statements of each sample's minimum and can stay. - This commit does not bump the project to C++17. Cleanup ideas like cpp_client_telemetry_modules#302 (std::string::data() -> char*) require C++17 and are still out of scope. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9d1fdabe..6aee84cda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,9 @@ set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation d #set(CMAKE_CXX_FLAGS -m32) # End of i386 build -# We ask for 14, but we may get C++11 on older gcc-4.x and gcc-5.x +# Project's required C++ standard. gcc-5+, clang-3.4+, and MSVC 2015+ all support C++14. set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) if (NOT TARGET_ARCH) set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) @@ -149,13 +150,14 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") #TODO: -fno-rtti message(STATUS "Building Release ...") set(CMAKE_C_FLAGS "$ENV{CFLAGS} ${CMAKE_C_FLAGS} -std=c11 ${REL_FLAGS}") - set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} -std=c++11 ${REL_FLAGS}") + # C++ standard is set via CMAKE_CXX_STANDARD above; do not override here. + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} ${REL_FLAGS}") else() set(USE_TCMALLOC 1) message(STATUS "Building Debug ...") include(tools/FindTcmalloc.cmake) set(CMAKE_C_FLAGS "$ENV{CFLAGS} ${CMAKE_C_FLAGS} -std=c11 ${DBG_FLAGS}") - set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} -std=c++11 ${DBG_FLAGS}") + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} ${DBG_FLAGS}") endif() #Remove /Zi for Win32 debug compiler issue From e21c50a38979644d19ca24ec076b24f8089ea357 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 29 May 2026 15:40:28 -0500 Subject: [PATCH 14/39] Address CMake review comments Derive package version components from MATSDK_BUILD_VERSION so CPack packages stay aligned with the SDK version. Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR for test CMake paths so the SDK remains subproject-friendly. Files changed: - CMakeLists.txt - tools/MakeDeb.cmake - tools/MakeRpm.cmake - tools/MakeTgz.cmake - tests/functests/CMakeLists.txt - tests/unittests/CMakeLists.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 5 +++ tests/functests/CMakeLists.txt | 50 +++++++++++++------------- tests/unittests/CMakeLists.txt | 64 +++++++++++++++++----------------- tools/MakeDeb.cmake | 6 ++-- tools/MakeRpm.cmake | 6 ++-- tools/MakeTgz.cmake | 6 ++-- 6 files changed, 71 insertions(+), 66 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6aee84cda..542052320 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,6 +243,11 @@ else() set(MATSDK_BUILD_VERSION ${MATSDK_API_VERSION}.${DAYNUMBER}.0) endif() +string(REPLACE "." ";" MATSDK_BUILD_VERSION_PARTS "${MATSDK_BUILD_VERSION}") +list(GET MATSDK_BUILD_VERSION_PARTS 0 MATSDK_PACKAGE_VERSION_MAJOR) +list(GET MATSDK_BUILD_VERSION_PARTS 1 MATSDK_PACKAGE_VERSION_MINOR) +list(GET MATSDK_BUILD_VERSION_PARTS 2 MATSDK_PACKAGE_VERSION_PATCH) + message(STATUS "SDK version: ${SDK_VERSION_PREFIX}-${MATSDK_BUILD_VERSION}") ################################################################################################ diff --git a/tests/functests/CMakeLists.txt b/tests/functests/CMakeLists.txt index 29198bb96..323a8e2f9 100644 --- a/tests/functests/CMakeLists.txt +++ b/tests/functests/CMakeLists.txt @@ -8,40 +8,40 @@ set(SRCS MultipleLogManagersTests.cpp ) -if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) +if(EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/functests/PrivacyGuardFuncTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/tests/functests/PrivacyGuardFuncTests.cpp" ) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) +if(EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/functests/SanitizerFuncTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/functests/SanitizerFuncTests.cpp" ) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/") +if(EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/dataviewer/") list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/functests/DefaultDataViewerFuncTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/dataviewer/tests/functests/DefaultDataViewerFuncTests.cpp" ) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/liveeventinspector/" AND BUILD_LIVEEVENTINSPECTOR) +if(EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/liveeventinspector/" AND BUILD_LIVEEVENTINSPECTOR) add_definitions(-DHAVE_MAT_LIVEEVENTINSPECTOR) list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/liveeventinspector/tests/functests/LiveEventInspectorFuncTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/liveeventinspector/tests/functests/LiveEventInspectorFuncTests.cpp" ) endif() -if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") +if (EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests") list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientFuncTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientRealworldFuncTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSConfigCacheFuncTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientFuncTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientRealworldFuncTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSConfigCacheFuncTests.cpp" ) - if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json") - configure_file("${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json" "${CMAKE_BINARY_DIR}/test.json" COPYONLY) + if (EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json") + configure_file("${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json" "${PROJECT_BINARY_DIR}/test.json" COPYONLY) endif() endif() @@ -57,19 +57,19 @@ endif() if(PAL_IMPLEMENTATION STREQUAL "WIN32") # Link against prebuilt libraries on Windows message(STATUS "WIN32: Linking against prebuilt libraries") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gtest") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gmock") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/zlib") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/sqlite") - # link_directories(${CMAKE_BINARY_DIR}/gtest/ ${CMAKE_BINARY_DIR}/gmock/ ${CMAKE_BINARY_DIR}/zlib/ ${CMAKE_BINARY_DIR}/sqlite/) + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/gtest") + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/gmock") + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/zlib") + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/sqlite") + # link_directories(${PROJECT_BINARY_DIR}/gtest/ ${PROJECT_BINARY_DIR}/gmock/ ${PROJECT_BINARY_DIR}/zlib/ ${PROJECT_BINARY_DIR}/sqlite/) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../zlib ) target_link_libraries(FuncTests mat wininet.lib - ${CMAKE_BINARY_DIR}/gtest/gtest.lib - ${CMAKE_BINARY_DIR}/gmock/gmock.lib - ${CMAKE_BINARY_DIR}/zlib/zlib.lib - ${CMAKE_BINARY_DIR}/sqlite/sqlite.lib + ${PROJECT_BINARY_DIR}/gtest/gtest.lib + ${PROJECT_BINARY_DIR}/gmock/gmock.lib + ${PROJECT_BINARY_DIR}/zlib/zlib.lib + ${PROJECT_BINARY_DIR}/sqlite/sqlite.lib ) else() @@ -104,7 +104,7 @@ else() message(STATUS "Linking libraries") message(STATUS "Current Dir: ${CMAKE_CURRENT_SOURCE_DIR}") - message(STATUS "Binary Dir: ${CMAKE_BINARY_DIR}") + message(STATUS "Binary Dir: ${PROJECT_BINARY_DIR}") set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) @@ -135,4 +135,4 @@ else() endif() -add_test(FuncTests FuncTests "--gtest_output=xml:${CMAKE_BINARY_DIR}/test-reports/FuncTests.xml") +add_test(FuncTests FuncTests "--gtest_output=xml:${PROJECT_BINARY_DIR}/test-reports/FuncTests.xml") diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index 41c734a31..8b52a5fb3 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -54,7 +54,7 @@ set_source_files_properties(${SRCS} PROPERTIES COMPILE_FLAGS -Wno-deprecated-dec # Enable Azure Monitor unit tests when the module is present. # The AIJsonSerializer test sources are guarded by HAVE_MAT_AI. -if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/azmon/AIJsonSerializer.hpp") +if (EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/azmon/AIJsonSerializer.hpp") add_definitions(-DHAVE_MAT_AI) endif() @@ -66,40 +66,40 @@ if (APPLE) endif() endif() -if (EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests") +if (EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests") list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSConfigCacheTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientUtilsTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSConfigCacheTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientUtilsTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/exp/tests/unittests/ECSClientTests.cpp" ) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) +if(EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/" AND BUILD_PRIVACYGUARD) add_definitions(-DHAVE_MAT_PRIVACYGUARD) list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/InitializationConfigurationTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernEventTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernMetadataProviderTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyGuardTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/SystematicSamplerTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/InitializationConfigurationTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernEventTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyConcernMetadataProviderTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/PrivacyGuardTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/privacyguard/tests/unittests/SystematicSamplerTests.cpp" ) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) +if(EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/" AND BUILD_SANITIZER) list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerJwtTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerProviderTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerSitePathTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerStringUtilsTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerUrlTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerTrieTests.cpp" - "${CMAKE_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SPOPasswordTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerJwtTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerProviderTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerSitePathTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerStringUtilsTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerUrlTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SanitizerTrieTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/sanitizer/tests/unittests/SPOPasswordTests.cpp" ) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/") +if(EXISTS "${PROJECT_SOURCE_DIR}/lib/modules/dataviewer/") list(APPEND SRCS - "${CMAKE_SOURCE_DIR}/lib/modules/dataviewer/tests/unittests/DefaultDataViewerTests.cpp" + "${PROJECT_SOURCE_DIR}/lib/modules/dataviewer/tests/unittests/DefaultDataViewerTests.cpp" DataViewerCollectionTests.cpp ) endif() @@ -116,19 +116,19 @@ endif() if(PAL_IMPLEMENTATION STREQUAL "WIN32") # Link against prebuilt libraries on Windows message(STATUS "WIN32: Linking against prebuilt libraries") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gtest") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/gmock") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/zlib") - message(STATUS "WIN32: ... ${CMAKE_BINARY_DIR}/sqlite") - # link_directories(${CMAKE_BINARY_DIR}/gtest/ ${CMAKE_BINARY_DIR}/gmock/ ${CMAKE_BINARY_DIR}/zlib/ ${CMAKE_BINARY_DIR}/sqlite/) + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/gtest") + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/gmock") + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/zlib") + message(STATUS "WIN32: ... ${PROJECT_BINARY_DIR}/sqlite") + # link_directories(${PROJECT_BINARY_DIR}/gtest/ ${PROJECT_BINARY_DIR}/gmock/ ${PROJECT_BINARY_DIR}/zlib/ ${PROJECT_BINARY_DIR}/sqlite/) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../zlib ) target_link_libraries(UnitTests mat wininet.lib - ${CMAKE_BINARY_DIR}/gtest/gtest.lib - ${CMAKE_BINARY_DIR}/gmock/gmock.lib - ${CMAKE_BINARY_DIR}/zlib/zlib.lib - ${CMAKE_BINARY_DIR}/sqlite/sqlite.lib + ${PROJECT_BINARY_DIR}/gtest/gtest.lib + ${PROJECT_BINARY_DIR}/gmock/gmock.lib + ${PROJECT_BINARY_DIR}/zlib/zlib.lib + ${PROJECT_BINARY_DIR}/sqlite/sqlite.lib ) else() @@ -164,7 +164,7 @@ else() message(STATUS "Linking libraries") message(STATUS "Current Dir: ${CMAKE_CURRENT_SOURCE_DIR}") - message(STATUS "Binary Dir: ${CMAKE_BINARY_DIR}") + message(STATUS "Binary Dir: ${PROJECT_BINARY_DIR}") include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../lib/ ) @@ -200,4 +200,4 @@ else() endif() -add_test(UnitTests UnitTests "--gtest_output=xml:${CMAKE_BINARY_DIR}/test-reports/UnitTests.xml") +add_test(UnitTests UnitTests "--gtest_output=xml:${PROJECT_BINARY_DIR}/test-reports/UnitTests.xml") diff --git a/tools/MakeDeb.cmake b/tools/MakeDeb.cmake index 4f839ab5b..b63cff1e3 100644 --- a/tools/MakeDeb.cmake +++ b/tools/MakeDeb.cmake @@ -9,10 +9,10 @@ set(CPACK_SYSTEM_NAME "${OS_RELEASE_ID}-${OS_RELEASE_VERSION_ID}") set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") set(CPACK_GENERATOR "DEB") -set(MAJOR_VERSION "3") -set(MINOR_VERSION "5") +set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") +set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") string(TIMESTAMP DAYNUMBER "%j") -set(PATCH_VERSION "${DAYNUMBER}") +set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry SDK for Linux") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Microsoft Applications Telemetry SDK for events ingestion from Linux hosts") diff --git a/tools/MakeRpm.cmake b/tools/MakeRpm.cmake index 8d9cf0b67..885df8df8 100644 --- a/tools/MakeRpm.cmake +++ b/tools/MakeRpm.cmake @@ -7,10 +7,10 @@ set(CPACK_RPM_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry SDK for Linu set(CPACK_RPM_PACKAGE_DESCRIPTION_SUMMARY "Microsoft Applications Telemetry SDK for events ingestion from Linux hosts") set(CPACK_RPM_PACKAGE_CONTACT "1ds.sdk.cpp@service.microsoft.com") -set(MAJOR_VERSION "3") -set(MINOR_VERSION "5") +set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") +set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") string(TIMESTAMP DAYNUMBER "%j") -set(PATCH_VERSION "${DAYNUMBER}") +set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}) set(CPACK_GENERATOR "RPM") diff --git a/tools/MakeTgz.cmake b/tools/MakeTgz.cmake index 44c308e32..ad8012fba 100644 --- a/tools/MakeTgz.cmake +++ b/tools/MakeTgz.cmake @@ -6,10 +6,10 @@ set(CPACK_SYSTEM_NAME "${OS_RELEASE_ID}-${OS_RELEASE_VERSION_ID}") set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") set(CPACK_GENERATOR "TGZ") -set(MAJOR_VERSION "3") -set(MINOR_VERSION "4") +set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") +set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") string(TIMESTAMP DAYNUMBER "%j") -set(PATCH_VERSION "${DAYNUMBER}") +set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry C/C++ SDK for Unix") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Microsoft Applications Telemetry SDK for events ingestion from Unix hosts") From 624abf62b43c424fa50efca1b3b9ce2339ae5da6 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 29 May 2026 15:52:06 -0500 Subject: [PATCH 15/39] Harden package version parsing Validate MATSDK_BUILD_VERSION before deriving CPack version components and remove now-dead DAYNUMBER calculations from package scripts. Files changed: - CMakeLists.txt - tools/MakeDeb.cmake - tools/MakeRpm.cmake - tools/MakeTgz.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 11 +++++++---- tools/MakeDeb.cmake | 1 - tools/MakeRpm.cmake | 1 - tools/MakeTgz.cmake | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 542052320..fbd6c012e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,10 +243,13 @@ else() set(MATSDK_BUILD_VERSION ${MATSDK_API_VERSION}.${DAYNUMBER}.0) endif() -string(REPLACE "." ";" MATSDK_BUILD_VERSION_PARTS "${MATSDK_BUILD_VERSION}") -list(GET MATSDK_BUILD_VERSION_PARTS 0 MATSDK_PACKAGE_VERSION_MAJOR) -list(GET MATSDK_BUILD_VERSION_PARTS 1 MATSDK_PACKAGE_VERSION_MINOR) -list(GET MATSDK_BUILD_VERSION_PARTS 2 MATSDK_PACKAGE_VERSION_PATCH) +if(MATSDK_BUILD_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") + set(MATSDK_PACKAGE_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(MATSDK_PACKAGE_VERSION_MINOR "${CMAKE_MATCH_2}") + set(MATSDK_PACKAGE_VERSION_PATCH "${CMAKE_MATCH_3}") +else() + message(FATAL_ERROR "MATSDK_BUILD_VERSION (${MATSDK_BUILD_VERSION}) must include at least major.minor.patch components.") +endif() message(STATUS "SDK version: ${SDK_VERSION_PREFIX}-${MATSDK_BUILD_VERSION}") diff --git a/tools/MakeDeb.cmake b/tools/MakeDeb.cmake index b63cff1e3..7c5919ebf 100644 --- a/tools/MakeDeb.cmake +++ b/tools/MakeDeb.cmake @@ -11,7 +11,6 @@ set(CPACK_GENERATOR "DEB") set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") -string(TIMESTAMP DAYNUMBER "%j") set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry SDK for Linux") diff --git a/tools/MakeRpm.cmake b/tools/MakeRpm.cmake index 885df8df8..e5e515712 100644 --- a/tools/MakeRpm.cmake +++ b/tools/MakeRpm.cmake @@ -9,7 +9,6 @@ set(CPACK_RPM_PACKAGE_CONTACT "1ds.sdk.cpp@service.microsoft.com") set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") -string(TIMESTAMP DAYNUMBER "%j") set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}) diff --git a/tools/MakeTgz.cmake b/tools/MakeTgz.cmake index ad8012fba..16fa32c64 100644 --- a/tools/MakeTgz.cmake +++ b/tools/MakeTgz.cmake @@ -8,7 +8,6 @@ set(CPACK_GENERATOR "TGZ") set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") -string(TIMESTAMP DAYNUMBER "%j") set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry C/C++ SDK for Unix") From 435e73064356d5c0c599d1eff1b649f66d43cfc2 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 29 May 2026 16:35:41 -0500 Subject: [PATCH 16/39] Remove leftover CMake merge markers The previous merge from main left a conflict marker block in lib/CMakeLists.txt's trailing commented-link section. Remove the marker block and keep the cleaned-up file content. Files changed: - lib/CMakeLists.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lib/CMakeLists.txt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index ff772fc75..7321a6de5 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -335,12 +335,3 @@ else() endif() message(STATUS "Library will be installed to ${INSTALL_LIB_DIR}") - -<<<<<<< HEAD - -======= -#if(PAL_IMPLEMENTATION STREQUAL "CPP11") -# #target_link_libraries(mat PUBLIC libcurl.a libz.a libssl.a libcrypto.a "${SQLITE_LIBRARY}" "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) -# #target_link_libraries(mat PUBLIC libsqlite3.a libz.a ${LIBS} "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) -#endif() ->>>>>>> msft/main From be040135a042f7e7ea7e8cde0ff1c4173461822f Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 29 May 2026 17:28:30 -0500 Subject: [PATCH 17/39] Revert package version alignment Keep package script version cleanup out of the CMake cleanup PR; package version alignment can be handled separately before the next release. Files changed: - CMakeLists.txt - tools/MakeDeb.cmake - tools/MakeRpm.cmake - tools/MakeTgz.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 8 -------- tools/MakeDeb.cmake | 7 ++++--- tools/MakeRpm.cmake | 7 ++++--- tools/MakeTgz.cmake | 7 ++++--- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbd6c012e..6aee84cda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,14 +243,6 @@ else() set(MATSDK_BUILD_VERSION ${MATSDK_API_VERSION}.${DAYNUMBER}.0) endif() -if(MATSDK_BUILD_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") - set(MATSDK_PACKAGE_VERSION_MAJOR "${CMAKE_MATCH_1}") - set(MATSDK_PACKAGE_VERSION_MINOR "${CMAKE_MATCH_2}") - set(MATSDK_PACKAGE_VERSION_PATCH "${CMAKE_MATCH_3}") -else() - message(FATAL_ERROR "MATSDK_BUILD_VERSION (${MATSDK_BUILD_VERSION}) must include at least major.minor.patch components.") -endif() - message(STATUS "SDK version: ${SDK_VERSION_PREFIX}-${MATSDK_BUILD_VERSION}") ################################################################################################ diff --git a/tools/MakeDeb.cmake b/tools/MakeDeb.cmake index 7c5919ebf..4f839ab5b 100644 --- a/tools/MakeDeb.cmake +++ b/tools/MakeDeb.cmake @@ -9,9 +9,10 @@ set(CPACK_SYSTEM_NAME "${OS_RELEASE_ID}-${OS_RELEASE_VERSION_ID}") set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") set(CPACK_GENERATOR "DEB") -set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") -set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") -set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") +set(MAJOR_VERSION "3") +set(MINOR_VERSION "5") +string(TIMESTAMP DAYNUMBER "%j") +set(PATCH_VERSION "${DAYNUMBER}") set(CPACK_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry SDK for Linux") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Microsoft Applications Telemetry SDK for events ingestion from Linux hosts") diff --git a/tools/MakeRpm.cmake b/tools/MakeRpm.cmake index e5e515712..8d9cf0b67 100644 --- a/tools/MakeRpm.cmake +++ b/tools/MakeRpm.cmake @@ -7,9 +7,10 @@ set(CPACK_RPM_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry SDK for Linu set(CPACK_RPM_PACKAGE_DESCRIPTION_SUMMARY "Microsoft Applications Telemetry SDK for events ingestion from Linux hosts") set(CPACK_RPM_PACKAGE_CONTACT "1ds.sdk.cpp@service.microsoft.com") -set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") -set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") -set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") +set(MAJOR_VERSION "3") +set(MINOR_VERSION "5") +string(TIMESTAMP DAYNUMBER "%j") +set(PATCH_VERSION "${DAYNUMBER}") set(CPACK_PACKAGE_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}) set(CPACK_GENERATOR "RPM") diff --git a/tools/MakeTgz.cmake b/tools/MakeTgz.cmake index 16fa32c64..44c308e32 100644 --- a/tools/MakeTgz.cmake +++ b/tools/MakeTgz.cmake @@ -6,9 +6,10 @@ set(CPACK_SYSTEM_NAME "${OS_RELEASE_ID}-${OS_RELEASE_VERSION_ID}") set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") set(CPACK_GENERATOR "TGZ") -set(MAJOR_VERSION "${MATSDK_PACKAGE_VERSION_MAJOR}") -set(MINOR_VERSION "${MATSDK_PACKAGE_VERSION_MINOR}") -set(PATCH_VERSION "${MATSDK_PACKAGE_VERSION_PATCH}") +set(MAJOR_VERSION "3") +set(MINOR_VERSION "4") +string(TIMESTAMP DAYNUMBER "%j") +set(PATCH_VERSION "${DAYNUMBER}") set(CPACK_PACKAGE_DESCRIPTION "Microsoft Applications Telemetry C/C++ SDK for Unix") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Microsoft Applications Telemetry SDK for events ingestion from Unix hosts") From b99ff144ab400fc882b2ac6c87e5faba30a9ed5e Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Sat, 30 May 2026 12:16:44 -0500 Subject: [PATCH 18/39] Document current Visual Studio build toolsets Add an explicit VS2026/v145 command-line build entry alongside the existing VS2022/v143 script so Windows consumers can choose the right supported toolset without guessing from MSBuild internals. Files changed: - docs/cpp-start-windows.md - build-all-v145.bat - tools/vcvars.cmd - Solutions/before.targets Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Solutions/before.targets | 1 + build-all-v145.bat | 6 ++++ docs/cpp-start-windows.md | 9 +++-- tools/vcvars.cmd | 69 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 build-all-v145.bat diff --git a/Solutions/before.targets b/Solutions/before.targets index 9145f2d4d..ce4cb42e4 100644 --- a/Solutions/before.targets +++ b/Solutions/before.targets @@ -5,6 +5,7 @@ + v145 v143 v142 v141 diff --git a/build-all-v145.bat b/build-all-v145.bat new file mode 100644 index 000000000..f1b43d658 --- /dev/null +++ b/build-all-v145.bat @@ -0,0 +1,6 @@ +@echo off + +set VSTOOLS_VERSION=vs2026 +set PlatformToolset=v145 +call build-all.bat + diff --git a/docs/cpp-start-windows.md b/docs/cpp-start-windows.md index ef5850d84..e2a6ae3a1 100644 --- a/docs/cpp-start-windows.md +++ b/docs/cpp-start-windows.md @@ -16,13 +16,18 @@ If your project requires the Universal Telemetry Client (a.k.a. UTC) to send tel ## **Windows prerequisites and dependencies for building from source** -* Visual Studio 2019 or 2022 (2022 is recommended). +* Visual Studio 2019, 2022, or 2026 (2022 or newer is recommended). * C++ Dev Tools ## **Option 1: Build the SDK from source using Visual Studio** * Open the *cpp_client_telemetry/Solutions/MSTelemetrySDK.sln* solution in Visual Studio. -* Alternatively you can use *build-all.bat* located in workspace root folder to build from command line +* Alternatively, build from the workspace root with the script that matches your Visual Studio toolset: + * Visual Studio 2019: `build-all-v142.bat` + * Visual Studio 2022: `build-all-v143.bat` + * Visual Studio 2026: `build-all-v145.bat` + +The version-specific scripts set `VSTOOLS_VERSION` and `PlatformToolset` before calling `build-all.bat`. If you already have a developer command prompt configured, you can also call `build-all.bat` directly and override `PlatformToolset` yourself. If your build fails, then you most likely missing the following optional Visual Studio components: diff --git a/tools/vcvars.cmd b/tools/vcvars.cmd index 18ae09e0a..ee8a3a8d1 100644 --- a/tools/vcvars.cmd +++ b/tools/vcvars.cmd @@ -8,6 +8,14 @@ REM 2. Visual Studio 2017 BuildTools REM 3. Visual Studio 2019 Enterprise REM 4. Visual Studio 2019 Community REM 5. Visual Studio 2019 BuildTools +REM 6. Visual Studio 2022 Enterprise +REM 7. Visual Studio 2022 Professional +REM 8. Visual Studio 2022 Community +REM 9. Visual Studio 2022 BuildTools +REM 10. Visual Studio 2026 Enterprise +REM 11. Visual Studio 2026 Professional +REM 12. Visual Studio 2026 Community +REM 13. Visual Studio 2026 BuildTools REM REM 1st parameter - Visual Studio version @@ -84,6 +92,16 @@ if exist "%VSDEVCMD%" ( goto tools_configured ) +:vs2022_professional +SET VSVERSION=2022 +set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\2022\Professional\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\2022\Professional" + echo Building with vs2022 Professional... + call "%VSDEVCMD%" + goto tools_configured +) + :vs2022_community SET VSVERSION=2022 set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" @@ -94,6 +112,57 @@ if exist "%VSDEVCMD%" ( goto tools_configured ) +:vs2022_buildtools +SET VSVERSION=2022 +set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" + echo Building with vs2022 BuildTools... + call "%VSDEVCMD%" + goto tools_configured +) + +:vs2026 +:vs2026_enterprise +SET VSVERSION=2026 +set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\18\Enterprise" + echo Building with vs2026 Enterprise... + call "%VSDEVCMD%" + goto tools_configured +) + +:vs2026_professional +SET VSVERSION=2026 +set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\18\Professional\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\18\Professional" + echo Building with vs2026 Professional... + call "%VSDEVCMD%" + goto tools_configured +) + +:vs2026_community +SET VSVERSION=2026 +set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\18\Community\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\18\Community" + echo Building with vs2026 Community... + call "%VSDEVCMD%" + goto tools_configured +) + +:vs2026_buildtools +SET VSVERSION=2026 +set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\18\BuildTools\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\18\BuildTools" + echo Building with vs2026 BuildTools... + call "%VSDEVCMD%" + goto tools_configured +) + echo WARNING:********************************************* echo WARNING: cannot auto-detect Visual Studio version !!! echo WARNING:********************************************* From b721bc5d3a8709148e958c99c81ac4f96c751743 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Sat, 30 May 2026 12:47:50 -0500 Subject: [PATCH 19/39] Revert "Document current Visual Studio build toolsets" This reverts commit b99ff144ab400fc882b2ac6c87e5faba30a9ed5e. --- Solutions/before.targets | 1 - build-all-v145.bat | 6 ---- docs/cpp-start-windows.md | 9 ++--- tools/vcvars.cmd | 69 --------------------------------------- 4 files changed, 2 insertions(+), 83 deletions(-) delete mode 100644 build-all-v145.bat diff --git a/Solutions/before.targets b/Solutions/before.targets index ce4cb42e4..9145f2d4d 100644 --- a/Solutions/before.targets +++ b/Solutions/before.targets @@ -5,7 +5,6 @@ - v145 v143 v142 v141 diff --git a/build-all-v145.bat b/build-all-v145.bat deleted file mode 100644 index f1b43d658..000000000 --- a/build-all-v145.bat +++ /dev/null @@ -1,6 +0,0 @@ -@echo off - -set VSTOOLS_VERSION=vs2026 -set PlatformToolset=v145 -call build-all.bat - diff --git a/docs/cpp-start-windows.md b/docs/cpp-start-windows.md index e2a6ae3a1..ef5850d84 100644 --- a/docs/cpp-start-windows.md +++ b/docs/cpp-start-windows.md @@ -16,18 +16,13 @@ If your project requires the Universal Telemetry Client (a.k.a. UTC) to send tel ## **Windows prerequisites and dependencies for building from source** -* Visual Studio 2019, 2022, or 2026 (2022 or newer is recommended). +* Visual Studio 2019 or 2022 (2022 is recommended). * C++ Dev Tools ## **Option 1: Build the SDK from source using Visual Studio** * Open the *cpp_client_telemetry/Solutions/MSTelemetrySDK.sln* solution in Visual Studio. -* Alternatively, build from the workspace root with the script that matches your Visual Studio toolset: - * Visual Studio 2019: `build-all-v142.bat` - * Visual Studio 2022: `build-all-v143.bat` - * Visual Studio 2026: `build-all-v145.bat` - -The version-specific scripts set `VSTOOLS_VERSION` and `PlatformToolset` before calling `build-all.bat`. If you already have a developer command prompt configured, you can also call `build-all.bat` directly and override `PlatformToolset` yourself. +* Alternatively you can use *build-all.bat* located in workspace root folder to build from command line If your build fails, then you most likely missing the following optional Visual Studio components: diff --git a/tools/vcvars.cmd b/tools/vcvars.cmd index ee8a3a8d1..18ae09e0a 100644 --- a/tools/vcvars.cmd +++ b/tools/vcvars.cmd @@ -8,14 +8,6 @@ REM 2. Visual Studio 2017 BuildTools REM 3. Visual Studio 2019 Enterprise REM 4. Visual Studio 2019 Community REM 5. Visual Studio 2019 BuildTools -REM 6. Visual Studio 2022 Enterprise -REM 7. Visual Studio 2022 Professional -REM 8. Visual Studio 2022 Community -REM 9. Visual Studio 2022 BuildTools -REM 10. Visual Studio 2026 Enterprise -REM 11. Visual Studio 2026 Professional -REM 12. Visual Studio 2026 Community -REM 13. Visual Studio 2026 BuildTools REM REM 1st parameter - Visual Studio version @@ -92,16 +84,6 @@ if exist "%VSDEVCMD%" ( goto tools_configured ) -:vs2022_professional -SET VSVERSION=2022 -set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\2022\Professional\Common7\Tools\VsDevCmd.bat" -if exist "%VSDEVCMD%" ( - set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\2022\Professional" - echo Building with vs2022 Professional... - call "%VSDEVCMD%" - goto tools_configured -) - :vs2022_community SET VSVERSION=2022 set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" @@ -112,57 +94,6 @@ if exist "%VSDEVCMD%" ( goto tools_configured ) -:vs2022_buildtools -SET VSVERSION=2022 -set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat" -if exist "%VSDEVCMD%" ( - set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" - echo Building with vs2022 BuildTools... - call "%VSDEVCMD%" - goto tools_configured -) - -:vs2026 -:vs2026_enterprise -SET VSVERSION=2026 -set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat" -if exist "%VSDEVCMD%" ( - set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\18\Enterprise" - echo Building with vs2026 Enterprise... - call "%VSDEVCMD%" - goto tools_configured -) - -:vs2026_professional -SET VSVERSION=2026 -set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\18\Professional\Common7\Tools\VsDevCmd.bat" -if exist "%VSDEVCMD%" ( - set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\18\Professional" - echo Building with vs2026 Professional... - call "%VSDEVCMD%" - goto tools_configured -) - -:vs2026_community -SET VSVERSION=2026 -set "VSDEVCMD=%ProgramFiles%\Microsoft Visual Studio\18\Community\Common7\Tools\VsDevCmd.bat" -if exist "%VSDEVCMD%" ( - set "VSINSTALLDIR=%ProgramFiles%\Microsoft Visual Studio\18\Community" - echo Building with vs2026 Community... - call "%VSDEVCMD%" - goto tools_configured -) - -:vs2026_buildtools -SET VSVERSION=2026 -set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\18\BuildTools\Common7\Tools\VsDevCmd.bat" -if exist "%VSDEVCMD%" ( - set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\18\BuildTools" - echo Building with vs2026 BuildTools... - call "%VSDEVCMD%" - goto tools_configured -) - echo WARNING:********************************************* echo WARNING: cannot auto-detect Visual Studio version !!! echo WARNING:********************************************* From 3b31d156881ee5f31047d36186532be448aaebe9 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 29 Apr 2026 14:37:42 -0700 Subject: [PATCH 20/39] Rearchitect vcpkg port for official submission Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitattributes | 6 + .github/workflows/test-vcpkg.yml | 111 + .gitignore | 3 + CMakeLists.txt | 226 +- cmake/MSTelemetryConfig.cmake.in | 27 + docs/building-with-vcpkg.md | 195 +- examples/c/SampleC-Guest/CMakeLists.txt | 25 +- examples/cmake/MSTelemetrySample.cmake | 48 + examples/cpp/EventSender/CMakeLists.txt | 25 +- examples/cpp/MacProxy/CMakeLists.txt | 25 +- examples/cpp/SampleCpp/CMakeLists.txt | 31 +- examples/cpp/SampleCppMini/CMakeLists.txt | 27 +- examples/cpp/SampleCppMini/main.cpp | 4 +- examples/objc/cocoa-app/CMakeLists.txt | 22 +- examples/swift/SamplePackage/Package.swift | 5 +- .../SwiftWrapperApp.xcodeproj/project.pbxproj | 849 +-- lib/CMakeLists.txt | 247 +- tests/vcpkg/CMakeLists.txt | 19 + tests/vcpkg/README.md | 111 + tests/vcpkg/main.cpp | 81 + tests/vcpkg/test-vcpkg-android.sh | 99 + tests/vcpkg/test-vcpkg-ios.sh | 153 + tests/vcpkg/test-vcpkg-linux.sh | 58 + tests/vcpkg/test-vcpkg-macos.sh | 63 + tests/vcpkg/test-vcpkg-windows.ps1 | 128 + tests/vcpkg/vcpkg.json | 8 + tools/ports/mstelemetry/CONTROL | 4 - tools/ports/mstelemetry/TODO.md | 9 - tools/ports/mstelemetry/get_repo_name.sh | 6 - tools/ports/mstelemetry/portfile.cmake | 128 +- .../ports/mstelemetry/response_file_linux.txt | 6 - tools/ports/mstelemetry/response_file_mac.txt | 6 - tools/ports/mstelemetry/usage | 4 + tools/ports/mstelemetry/v142-build.patch | 5701 ----------------- tools/ports/mstelemetry/vcpkg.json | 29 + wrappers/obj-c/ODWLogger.mm | 32 +- wrappers/swift/Package.swift | 44 +- .../swift/Sources/OneDSSwift/Logger.swift | 4 +- 38 files changed, 2001 insertions(+), 6568 deletions(-) create mode 100644 .github/workflows/test-vcpkg.yml create mode 100644 cmake/MSTelemetryConfig.cmake.in create mode 100644 examples/cmake/MSTelemetrySample.cmake create mode 100644 tests/vcpkg/CMakeLists.txt create mode 100644 tests/vcpkg/README.md create mode 100644 tests/vcpkg/main.cpp create mode 100755 tests/vcpkg/test-vcpkg-android.sh create mode 100755 tests/vcpkg/test-vcpkg-ios.sh create mode 100755 tests/vcpkg/test-vcpkg-linux.sh create mode 100755 tests/vcpkg/test-vcpkg-macos.sh create mode 100644 tests/vcpkg/test-vcpkg-windows.ps1 create mode 100644 tests/vcpkg/vcpkg.json delete mode 100644 tools/ports/mstelemetry/CONTROL delete mode 100644 tools/ports/mstelemetry/TODO.md delete mode 100755 tools/ports/mstelemetry/get_repo_name.sh delete mode 100644 tools/ports/mstelemetry/response_file_linux.txt delete mode 100644 tools/ports/mstelemetry/response_file_mac.txt create mode 100644 tools/ports/mstelemetry/usage delete mode 100644 tools/ports/mstelemetry/v142-build.patch create mode 100644 tools/ports/mstelemetry/vcpkg.json diff --git a/.gitattributes b/.gitattributes index 8fc60d592..429fefd5c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -87,6 +87,12 @@ GNUmakefile text *.xml text *.cfg text +## Exclude vcpkg port and test scaffolding from GitHub tarballs. +## This avoids a chicken-and-egg problem: the portfile contains a SHA512 +## of the tarball, so changes to the portfile must not change the tarball. +tools/ports/ export-ignore +tests/vcpkg/ export-ignore + ## Self-reference =) .gitignore text .gitattributes text diff --git a/.github/workflows/test-vcpkg.yml b/.github/workflows/test-vcpkg.yml new file mode 100644 index 000000000..cdd8ee1bb --- /dev/null +++ b/.github/workflows/test-vcpkg.yml @@ -0,0 +1,111 @@ +name: Vcpkg port tests + +on: + push: + branches: + - master + - main + - dev + - dev/* + - release/* + - buildme/* + + pull_request: + branches: + - master + - main + - dev + + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + windows: + runs-on: windows-latest + name: Windows (x64-windows-static) + steps: + - uses: actions/checkout@v4 + + - name: Bootstrap vcpkg + run: | + git clone https://github.com/microsoft/vcpkg.git ${{ runner.temp }}\vcpkg + & "${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat" -disableMetrics + shell: pwsh + + - name: Run vcpkg port test + run: .\tests\vcpkg\test-vcpkg-windows.ps1 -VcpkgRoot "${{ runner.temp }}\vcpkg" + shell: pwsh + + linux: + runs-on: ubuntu-latest + name: Linux (x64-linux) + steps: + - uses: actions/checkout@v4 + + - name: Bootstrap vcpkg + run: | + git clone https://github.com/microsoft/vcpkg.git "${{ runner.temp }}/vcpkg" + "${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh" -disableMetrics + + - name: Run vcpkg port test + env: + VCPKG_ROOT: ${{ runner.temp }}/vcpkg + run: | + chmod +x tests/vcpkg/test-vcpkg-linux.sh + ./tests/vcpkg/test-vcpkg-linux.sh + + macos: + runs-on: macos-latest + name: macOS (native) + steps: + - uses: actions/checkout@v4 + + - name: Bootstrap vcpkg + run: | + git clone https://github.com/microsoft/vcpkg.git "${{ runner.temp }}/vcpkg" + "${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh" -disableMetrics + + - name: Run vcpkg port test + env: + VCPKG_ROOT: ${{ runner.temp }}/vcpkg + run: | + chmod +x tests/vcpkg/test-vcpkg-macos.sh + ./tests/vcpkg/test-vcpkg-macos.sh + + ios: + runs-on: macos-latest + name: iOS (arm64-ios cross-compile) + steps: + - uses: actions/checkout@v4 + + - name: Bootstrap vcpkg + run: | + git clone https://github.com/microsoft/vcpkg.git "${{ runner.temp }}/vcpkg" + "${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh" -disableMetrics + + - name: Run vcpkg port test (device) + env: + VCPKG_ROOT: ${{ runner.temp }}/vcpkg + run: | + chmod +x tests/vcpkg/test-vcpkg-ios.sh + ./tests/vcpkg/test-vcpkg-ios.sh + + android: + runs-on: ubuntu-latest + name: Android (arm64-v8a cross-compile) + steps: + - uses: actions/checkout@v4 + + - name: Bootstrap vcpkg + run: | + git clone https://github.com/microsoft/vcpkg.git "${{ runner.temp }}/vcpkg" + "${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh" -disableMetrics + + - name: Run vcpkg port test + env: + VCPKG_ROOT: ${{ runner.temp }}/vcpkg + run: | + chmod +x tests/vcpkg/test-vcpkg-android.sh + ./tests/vcpkg/test-vcpkg-android.sh arm64-v8a diff --git a/.gitignore b/.gitignore index 515445ff7..af5733868 100644 --- a/.gitignore +++ b/.gitignore @@ -405,3 +405,6 @@ build/.cmake/api/v1/query/client-vscode/query.json #Test files generated locally. *.ses + +# vcpkg test build directories +tests/vcpkg/build-*/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 6aee84cda..ab11ebc50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,15 @@ cmake_minimum_required(VERSION 3.1.0) project(MSTelemetry LANGUAGES C CXX) -# Set installation prefix for macOS and Linux -if(UNIX AND NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation directory prefix" FORCE) +################################################################################################ +# Vcpkg dependency mode: detect early so it can guard platform-specific flag logic +################################################################################################ +if(DEFINED VCPKG_TOOLCHAIN OR DEFINED VCPKG_TARGET_TRIPLET) + option(MATSDK_USE_VCPKG_DEPS "Use vcpkg-provided dependencies via find_package()" ON) +else() + option(MATSDK_USE_VCPKG_DEPS "Use vcpkg-provided dependencies via find_package()" OFF) endif() - -set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") -set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") -set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") +message(STATUS "MATSDK_USE_VCPKG_DEPS: ${MATSDK_USE_VCPKG_DEPS}") # Begin Uncomment for i386 build #set(CMAKE_SYSTEM_PROCESSOR i386) @@ -25,6 +26,14 @@ if (NOT TARGET_ARCH) endif() # Enable ARC for obj-c on Apple +# Initialize platform options before conditional blocks (needed for config templates) +if(NOT DEFINED BUILD_IOS) + set(BUILD_IOS OFF) +endif() +if(NOT APPLE AND NOT DEFINED BUILD_APPLE_HTTP) + set(BUILD_APPLE_HTTP OFF) +endif() + if(APPLE) message(STATUS "BUILD_IOS: ${BUILD_IOS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc") @@ -36,75 +45,86 @@ if(APPLE) set(FORCE_RESET_OSX_DEPLOYMENT_TARGET ${FORCE_RESET_DEPLOYMENT_TARGET}) endif() - if(BUILD_IOS) - set(TARGET_ARCH "APPLE") - set(IOS True) - set(APPLE True) + # When building via vcpkg, the toolchain file handles architecture, sysroot, + # deployment target, and platform flags. Skip manual flag configuration. + if(NOT MATSDK_USE_VCPKG_DEPS) + if(BUILD_IOS) + set(TARGET_ARCH "APPLE") + set(IOS True) + set(APPLE True) - if(FORCE_RESET_OSX_DEPLOYMENT_TARGET) - set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) - if (${IOS_PLAT} STREQUAL "iphonesimulator") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") + if(FORCE_RESET_OSX_DEPLOYMENT_TARGET) + set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) + if (${IOS_PLAT} STREQUAL "iphonesimulator") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_TARGET}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_TARGET}") + endif() + endif() + + if((${IOS_PLAT} STREQUAL "iphoneos") OR (${IOS_PLAT} STREQUAL "iphonesimulator") OR (${IOS_PLAT} STREQUAL "xros") OR (${IOS_PLAT} STREQUAL "xrsimulator")) + set(IOS_PLATFORM "${IOS_PLAT}") else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_TARGET}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_TARGET}") + message(FATAL_ERROR "Unrecognized iOS platform '${IOS_PLAT}'") endif() - endif() - if((${IOS_PLAT} STREQUAL "iphoneos") OR (${IOS_PLAT} STREQUAL "iphonesimulator") OR (${IOS_PLAT} STREQUAL "xros") OR (${IOS_PLAT} STREQUAL "xrsimulator")) - set(IOS_PLATFORM "${IOS_PLAT}") - else() - message(FATAL_ERROR "Unrecognized iOS platform '${IOS_PLAT}'") - endif() + if(${IOS_ARCH} STREQUAL "x86_64") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64") + set(CMAKE_SYSTEM_PROCESSOR x86_64) + elseif(${IOS_ARCH} STREQUAL "arm64") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64") + set(CMAKE_SYSTEM_PROCESSOR arm64) + elseif(${IOS_ARCH} STREQUAL "arm64e") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64e") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64e") + set(CMAKE_SYSTEM_PROCESSOR arm64e) + else() + message(FATAL_ERROR "Unrecognized iOS architecture '${IOS_ARCH}'") + endif() - if(${IOS_ARCH} STREQUAL "x86_64") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64") - set(CMAKE_SYSTEM_PROCESSOR x86_64) - elseif(${IOS_ARCH} STREQUAL "arm64") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64") - set(CMAKE_SYSTEM_PROCESSOR arm64) - elseif(${IOS_ARCH} STREQUAL "arm64e") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64e") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64e") - set(CMAKE_SYSTEM_PROCESSOR arm64e) + execute_process(COMMAND xcodebuild -version -sdk ${IOS_PLATFORM} ONLY_ACTIVE_ARCH=NO Path + OUTPUT_VARIABLE CMAKE_OSX_SYSROOT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT}") + message(STATUS "ARCHITECTURE: ${CMAKE_SYSTEM_PROCESSOR}") + message(STATUS "PLATFORM: ${IOS_PLATFORM}") else() - message(FATAL_ERROR "Unrecognized iOS architecture '${IOS_ARCH}'") + if("${MAC_ARCH}" STREQUAL "x86_64") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64") + set(CMAKE_SYSTEM_PROCESSOR x86_64) + set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) + set(CMAKE_OSX_ARCHITECTURES ${MAC_ARCH}) + set(APPLE True) + elseif("${MAC_ARCH}" STREQUAL "arm64") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64") + set(CMAKE_SYSTEM_PROCESSOR arm64) + set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) + set(CMAKE_OSX_ARCHITECTURES ${MAC_ARCH}) + set(APPLE True) + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64 -arch arm64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -arch arm64") + endif() + message(STATUS "MAC_ARCH: ${MAC_ARCH}") endif() - - execute_process(COMMAND xcodebuild -version -sdk ${IOS_PLATFORM} ONLY_ACTIVE_ARCH=NO Path - OUTPUT_VARIABLE CMAKE_OSX_SYSROOT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT}") - message(STATUS "ARCHITECTURE: ${CMAKE_SYSTEM_PROCESSOR}") - message(STATUS "PLATFORM: ${IOS_PLATFORM}") else() - if(${MAC_ARCH} STREQUAL "x86_64") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64") - set(CMAKE_SYSTEM_PROCESSOR x86_64) - set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) - set(CMAKE_OSX_ARCHITECTURES ${MAC_ARCH}) - set(APPLE True) - elseif(${MAC_ARCH} STREQUAL "arm64") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64") - set(CMAKE_SYSTEM_PROCESSOR arm64) - set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) - set(CMAKE_OSX_ARCHITECTURES ${MAC_ARCH}) - set(APPLE True) - else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64 -arch arm64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -arch arm64") + # vcpkg mode: just set internal flags from what the toolchain provides + if(BUILD_IOS OR CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(BUILD_IOS ON) + set(TARGET_ARCH "APPLE") + set(IOS True) endif() - message(STATUS "MAC_ARCH: ${MAC_ARCH}") + message(STATUS "vcpkg toolchain managing architecture and platform flags") endif() endif() -message(STATUS "CMAKE_SYSTEM_INFO_FILE: ${CMAKE_SYSTEM_INFO_FILE}") message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_SYSTEM: ${CMAKE_SYSTEM}") @@ -115,14 +135,22 @@ message(STATUS "CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") include(tools/ParseOsRelease.cmake) +# When building via vcpkg, let the toolchain manage compiler flags. +# Only apply project-specific flags for non-vcpkg (legacy) builds. +if(NOT MATSDK_USE_VCPKG_DEPS) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(WARN_FLAGS "/W4 /WX") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # -Wno-unknown-warning-option is Clang-only, omitted here set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-but-set-variable") + # -Wno-reorder is C++-only; added to CXX_FLAGS below (suppresses member-init-order warnings in submodule code) + set(CXX_EXTRA_WARN_FLAGS "-Wno-reorder") else() # Clang / AppleClang set(WARN_FLAGS "-Wall -Werror -Wextra -Wno-unused-parameter -Wno-unknown-warning-option -Wno-unused-but-set-variable") + # -Wno-reorder is C++-only; added to CXX_FLAGS below (suppresses member-init-order warnings in submodule code) + set(CXX_EXTRA_WARN_FLAGS "-Wno-reorder") endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") @@ -182,7 +210,11 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # using Visual Studio C++ endif() +endif() # NOT MATSDK_USE_VCPKG_DEPS (compiler flags) + include(tools/Utils.cmake) +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) if (NOT DEFAULT_PAL_IMPLEMENTATION) if(MSVC) @@ -214,7 +246,7 @@ if(USE_ONEDS_SECURE_MEM_FUNCTIONS) add_definitions(-DUSE_ONEDS_SECURE_MEM_FUNCTIONS) endif() -if(PAL_IMPLEMENTATION STREQUAL "WIN32") +if(PAL_IMPLEMENTATION STREQUAL "WIN32" AND NOT MATSDK_USE_VCPKG_DEPS) add_definitions(-DZLIB_WINAPI) endif() @@ -246,26 +278,7 @@ endif() message(STATUS "SDK version: ${SDK_VERSION_PREFIX}-${MATSDK_BUILD_VERSION}") ################################################################################################ -# HTTP stack section -################################################################################################ - -# Only use custom curl if compiling with CPP11 PAL -if (PAL_IMPLEMENTATION STREQUAL "CPP11") - - if(NOT BUILD_IOS) - include(FindCURL) - find_package(CURL REQUIRED) - if (NOT CURL_FOUND) - message (FATAL_ERROR "libcurl not found! Have you installed deps?") - endif (NOT CURL_FOUND) - include_directories(CURL_INCLUDE_DIRS) - set(CMAKE_REQUIRED_LIBRARIES "${CURL_LIBRARIES}") - list(APPEND LIBS "${CURL_LIBRARIES}") - endif() -endif() - -################################################################################################ -# User options +# User options (must be before HTTP stack section for BUILD_APPLE_HTTP) ################################################################################################ option(BUILD_HEADERS "Build API headers" YES) option(BUILD_LIBRARY "Build library" YES) @@ -290,6 +303,45 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") option(BUILD_APPLE_HTTP "Build Apple HTTP client" YES) endif() +if(BUILD_APPLE_HTTP) + add_definitions(-DAPPLE_HTTP=1) +endif() + +################################################################################################ +# HTTP stack section +################################################################################################ + +# Only use custom curl if compiling with CPP11 PAL +set(MATSDK_NEEDS_CURL OFF) +if(PAL_IMPLEMENTATION STREQUAL "CPP11" + AND NOT BUILD_IOS + AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android" + AND NOT BUILD_APPLE_HTTP) + set(MATSDK_NEEDS_CURL ON) + find_package(CURL REQUIRED) + if(MATSDK_USE_VCPKG_DEPS) + list(APPEND LIBS CURL::libcurl) + else() + include_directories(CURL_INCLUDE_DIRS) + set(CMAKE_REQUIRED_LIBRARIES "${CURL_LIBRARIES}") + list(APPEND LIBS "${CURL_LIBRARIES}") + endif() +endif() + +################################################################################################ +# Dependency resolution (vcpkg mode vs vendored) +################################################################################################ +if(MATSDK_USE_VCPKG_DEPS) + find_package(unofficial-sqlite3 CONFIG REQUIRED) + find_package(ZLIB REQUIRED) + find_package(nlohmann_json CONFIG REQUIRED) + message(STATUS "Using vcpkg-provided sqlite3, zlib, nlohmann-json") +else() + # Include repo root to allow includes of vendored sqlite, zlib, and nlohmann + include_directories(${CMAKE_SOURCE_DIR}) + message(STATUS "Using vendored sqlite3, zlib, nlohmann-json") +endif() + if(BUILD_UNIT_TESTS OR BUILD_FUNC_TESTS) message(STATUS "Adding gtest") add_library(gtest STATIC IMPORTED GLOBAL) @@ -311,10 +363,6 @@ include_directories(lib/pal) # enable_testing() # add_subdirectory(bondlite/tests) #endif() - -# Include repo root to allow includes of sqlite, zlib, and nlohmann -include_directories(${CMAKE_SOURCE_DIR}) - if(BUILD_HEADERS) add_subdirectory(lib/include) endif() diff --git a/cmake/MSTelemetryConfig.cmake.in b/cmake/MSTelemetryConfig.cmake.in new file mode 100644 index 000000000..6c15631ca --- /dev/null +++ b/cmake/MSTelemetryConfig.cmake.in @@ -0,0 +1,27 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +# Re-find dependencies that consumers need +if(@MATSDK_USE_VCPKG_DEPS@) + find_dependency(unofficial-sqlite3 CONFIG) + find_dependency(ZLIB) + find_dependency(nlohmann_json CONFIG) +endif() + +# Curl is needed on Linux (not Windows/iOS/Android/macOS-with-Apple-HTTP). +# We capture the build-time decision as a boolean rather than re-deriving +# it, because the macOS BUILD_APPLE_HTTP edge case can't be inferred from +# CMAKE_SYSTEM_NAME alone. +if(@MATSDK_NEEDS_CURL@) + find_dependency(CURL) +endif() + +# Pthreads are needed on Linux and Android (POSIX threading) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") + find_dependency(Threads) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/MSTelemetryTargets.cmake") + +check_required_components(MSTelemetry) diff --git a/docs/building-with-vcpkg.md b/docs/building-with-vcpkg.md index 6312fa18d..aaa831351 100644 --- a/docs/building-with-vcpkg.md +++ b/docs/building-with-vcpkg.md @@ -1,10 +1,12 @@ # Building 1DS C++ SDK with vcpkg -vcpkg is a Microsoft cross-platform open source C++ package manager. Onboarding instructions for Windows, Linux and Mac OS X [available here](https://docs.microsoft.com/en-us/cpp/build/vcpkg). This document assumes that the customer build system is already configured to use vcpkg. 1DS C++ SDK maintainers provide a build recipe, `mstelemetry` port or CONTROL file for vcpkg. Mainline vcpkg repo is refreshed to point to latest stable open source release of 1DS C++ SDK. Public build of SDK does not include private submodules. However, local port / CONTROL file included in 1DS C++ SDK git repo allows to build SDK with additional Microsoft-proprietary private submodules. +[vcpkg](https://vcpkg.io/) is a Microsoft cross-platform open source C++ package manager. Onboarding instructions for Windows, Linux and Mac OS X [available here](https://docs.microsoft.com/en-us/cpp/build/vcpkg). This document assumes that the customer build system is already configured to use vcpkg ([getting started guide](https://learn.microsoft.com/en-us/vcpkg/get_started/overview)). 1DS C++ SDK maintainers provide a build recipe, `mstelemetry` port or CONTROL file for vcpkg. The mainline vcpkg repo is refreshed to point to latest stable open source release of 1DS C++ SDK. -## Installing open source mstelemetry package +## Quick Start -The following command can be used to install the public open source release: +### Installing from the vcpkg registry + +Once a new port has been accepted into the official vcpkg registry, install with: ```console vcpkg install mstelemetry @@ -12,83 +14,184 @@ vcpkg install mstelemetry That's it! The package should be compiled for the current OS. -See instructions below to build the SDK with additional Microsoft-proprietary modules. - -## Windows build with submodules +### Installing from the overlay port (development / pre-release) -`cmd.exe` command line prompt commands: +Before the port is published, or to test local changes, use the overlay port +shipped in this repository: ```console -git clone --recurse-submodules https://github.com/microsoft/cpp_client_telemetry +git clone https://github.com/microsoft/cpp_client_telemetry cd cpp_client_telemetry -vcpkg install --head --overlay-ports=%CD%\tools\ports mstelemetry +vcpkg install --overlay-ports=tools/ports mstelemetry ``` -## POSIX (Linux and Mac) build with submodules +### Using in your CMake project -Shell commands: +After installing, add the SDK to your CMake project: -```console -git clone --recurse-submodules https://github.com/microsoft/cpp_client_telemetry -cd cpp_client_telemetry -vcpkg install --head --overlay-ports=`pwd`/tools/ports mstelemetry +```cmake +find_package(MSTelemetry CONFIG REQUIRED) +target_link_libraries(your_target PRIVATE MSTelemetry::mat) ``` -## Using response files to specify dependencies +If you use vcpkg manifest mode (recommended), add `mstelemetry` to your +project's `vcpkg.json`: -vcpkg allows to consolidate parameters passed to vcpkg in a response file. All 3rd party dependencies needed for 1DS SDK can be described and installed via response file. +```json +{ + "dependencies": ["mstelemetry"] +} +``` -Example for Mac: +## Platform-Specific Instructions -```console -vcpkg install @tools/ports/mstelemetry/response_file_mac.txt +### Windows + +```powershell +vcpkg install mstelemetry --triplet=x64-windows-static ``` -Example for Linux: +### Linux -```console -vcpkg install @tools/ports/mstelemetry/response_file_linux.txt +```bash +vcpkg install mstelemetry --triplet=x64-linux ``` -vcpkg build log files are created in `${VCPKG_INSTALL_DIR}/buildtrees/mstelemetry/build-[err|out].log` . Review the logs in case if you encounter package installation failures. +### macOS -## Using triplets +```bash +# Apple Silicon +vcpkg install mstelemetry --triplet=arm64-osx -In order to enable custom build flags - vcpkg triplets and custom environment variables may be used. Please see [triplets instruction here](https://vcpkg.readthedocs.io/en/latest/users/triplets/). Response file for a custom build, e.g. `response_file_linux_PRODUCTNAME.txt` may specify a custom triplet. For example, custom triplet controls if the library is built as static or dynamic. Default triplets may also be overridden with [custom triplets](https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/#overlay-triplets-example). Custom triplets specific to various products must be maintained by product teams. Product teams may optionally decide to integrate their triplets in the mainline 1DS C++ SDK repo as-needed. +# Intel +vcpkg install mstelemetry --triplet=x64-osx +``` -## Build with vcpkg dependencies +### iOS (cross-compile) -This section needs to be updated with more detailed info. Default `CMakeLists.txt` in top-level directory utilize the following dependencies: +```bash +vcpkg install mstelemetry --triplet=arm64-ios +``` -- OS-provided `sqlite3` library. -- OS-provided `zlib` library. -- SDK-provided snapshot of `nlohmann-json` header-only library. +### iOS Simulator -It is possible to adjust the build system to use vcpkg-installed dependencies instead. +vcpkg ships a built-in community triplet for the iOS Simulator: -### nlohmann-json +```bash +vcpkg install mstelemetry --triplet=arm64-ios-simulator +``` -The package `nlohmann-json` provides CMake targets: +See the [vcpkg triplet documentation](https://learn.microsoft.com/en-us/vcpkg/users/triplets) +for details on creating your own custom triplets for other platforms. -```console - find_package(nlohmann_json CONFIG REQUIRED) - target_link_libraries(main PRIVATE nlohmann_json nlohmann_json::nlohmann_json) +### Android (cross-compile) + +Requires the Android NDK (`ANDROID_NDK_HOME` must be set): + +```bash +vcpkg install mstelemetry --triplet=arm64-android ``` -### sqlite3 +Supported triplets: `arm64-android`, `arm-neon-android`, `x64-android`, +`x86-android`. + +## Dependencies + +The vcpkg port automatically resolves the following dependencies: -The package `sqlite3` provides CMake targets: +| Dependency | vcpkg Package | CMake Target | Platforms | +| -------------- | --------------- | --------------------------------- | ------------------ | +| SQLite3 | `sqlite3` | `unofficial::sqlite3::sqlite3` | All | +| zlib | `zlib` | `ZLIB::ZLIB` | All | +| nlohmann JSON | `nlohmann-json` | `nlohmann_json::nlohmann_json` | All | +| libcurl | `curl[ssl]` | `CURL::libcurl` | Linux | + +Windows, macOS/iOS, and Android use platform-native HTTP clients (WinInet, +NSURLSession, and HttpClient_Android respectively), so curl is not required +on those platforms. + +## Optional: SIMD-Optimized zlib with zlib-ng + +The vcpkg port depends on stock `zlib` by default. If you want SIMD-optimized +compression (Intel PCLMULQDQ/AVX2, ARM NEON, etc.), you can transparently +replace zlib with [zlib-ng](https://github.com/zlib-ng/zlib-ng) in +compatibility mode. No changes to the port or SDK code are needed. + +**Add one line to your vcpkg triplet file** (e.g., `x64-windows-static.cmake`): + +```cmake +set(ZLIB_COMPAT ON) +``` + +Then install `zlib-ng` instead of `zlib`: ```console - find_package(unofficial-sqlite3 CONFIG REQUIRED) - target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3) +vcpkg install zlib-ng mstelemetry --triplet=x64-windows-static ``` -### zlib +With `ZLIB_COMPAT=ON`, zlib-ng installs as a drop-in replacement — it provides +the same `zlib.h` header, the same function names (`deflate`, `inflate`, +`crc32`), and the same `ZLIB::ZLIB` CMake target. All packages that depend on +`zlib` (including `mstelemetry` and any other libraries like `onnxruntime`) +will automatically use the optimized zlib-ng build. -The package zlib is compatible with built-in CMake targets: +> **Important:** All libraries in the same binary should link against the same +> zlib. When using `ZLIB_COMPAT=ON`, ensure all dependencies resolve to +> zlib-ng rather than mixing stock zlib and zlib-ng. -```console - find_package(ZLIB REQUIRED) - target_link_libraries(main PRIVATE ZLIB::ZLIB) +## How It Works: MATSDK_USE_VCPKG_DEPS + +When the SDK detects it is being built via vcpkg (by checking for +`VCPKG_TOOLCHAIN` or `VCPKG_TARGET_TRIPLET`), it automatically sets +`MATSDK_USE_VCPKG_DEPS=ON`. This switches dependency resolution from +vendored sources to vcpkg-provided packages via `find_package()`. + +You can also set this explicitly for custom CMake workflows: + +```bash +cmake -DMATSDK_USE_VCPKG_DEPS=ON \ + -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \ + .. +``` + +## Troubleshooting + +vcpkg build log files are created in +`${VCPKG_INSTALL_DIR}/buildtrees/mstelemetry/`. Review the following logs +if you encounter package installation failures: + +| File | Contents | +| ---- | -------- | +| `build-out.log` | Build stdout (compiler output) | +| `build-err.log` | Build stderr (compiler errors/warnings) | +| `config-*.log` | CMake configure output | + +You can also pass `--debug` to `vcpkg install` for verbose diagnostics. + +## Testing the Port + +Integration tests are provided in `tests/vcpkg/`. Each script builds the +port from the overlay, compiles a test consumer, and runs runtime checks: + +```bash +# Windows (from Developer Command Prompt) +.\tests\vcpkg\test-vcpkg-windows.ps1 -VcpkgRoot C:\path\to\vcpkg + +# Linux +./tests/vcpkg/test-vcpkg-linux.sh + +# macOS +./tests/vcpkg/test-vcpkg-macos.sh + +# iOS (cross-compile — verifies binary is produced) +./tests/vcpkg/test-vcpkg-ios.sh + +# iOS Simulator (builds and runs on simulator) +./tests/vcpkg/test-vcpkg-ios.sh --simulator + +# Android (cross-compile — verifies binary is produced) +./tests/vcpkg/test-vcpkg-android.sh ``` + +See [tests/vcpkg/README.md](../tests/vcpkg/README.md) for prerequisites and +detailed usage. diff --git a/examples/c/SampleC-Guest/CMakeLists.txt b/examples/c/SampleC-Guest/CMakeLists.txt index d5932af4e..2022c4d76 100644 --- a/examples/c/SampleC-Guest/CMakeLists.txt +++ b/examples/c/SampleC-Guest/CMakeLists.txt @@ -4,43 +4,24 @@ project(SampleC-Guest) # Uncomment for building i386 binary on x86_64 system #set(CMAKE_SYSTEM_PROCESSOR i386) -# For ARM / Raspberry Pi 3 cross-compile -# set(MATSDK_LIB /usr/local/lib/armv7l-linux-gnu) - -# Point example to SDK dirs for x86_64 Desktop -if(EXISTS "/usr/local/lib/libmat.a") -# Use local libmat.a -set(MATSDK_LIB /usr/local/lib/) -else() -# Use architecture-specific libmat.a -set(MATSDK_LIB /usr/local/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb -gdwarf-2 -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb -gdwarf-2 -std=c++11") find_package (Threads) -set(MATSDK_INCLUDE /usr/local/include/mat) - # 1DS SDK to include dirs -include_directories( . ${MATSDK_INCLUDE} ) +include_directories(. ${MATSDK_SAMPLE_INCLUDE_DIRS}) # Link main.cpp to executable add_executable(SampleC-Guest main.cpp demo.c) source_group(" " REGULAR_EXPRESSION "") -# Prefer linking to more recent local sqlite3 -if(EXISTS "/usr/local/lib/libsqlite3.a") -set (SQLITE3_LIB "/usr/local/lib/libsqlite3.a") -else() -set (SQLITE3_LIB "sqlite3") -endif() - set (PLATFORM_LIBS "") # Add flags for obtaining system UUID via IOKit if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") set (PLATFORM_LIBS "-framework CoreFoundation -framework IOKit") endif() -target_link_libraries(SampleC-Guest ${MATSDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) +target_link_libraries(SampleC-Guest ${MATSDK_LIBRARY} curl z ${CMAKE_THREAD_LIBS_INIT} ${MATSDK_SQLITE3_LIB} ${MATSDK_SAMPLE_PLATFORM_LIBS} ${PLATFORM_LIBS} dl) diff --git a/examples/cmake/MSTelemetrySample.cmake b/examples/cmake/MSTelemetrySample.cmake new file mode 100644 index 000000000..588dd6727 --- /dev/null +++ b/examples/cmake/MSTelemetrySample.cmake @@ -0,0 +1,48 @@ +set(_MATSDK_DEFAULT_INSTALL_DIR "/usr/local") +if(NOT "$ENV{MATSDK_INSTALL_DIR}" STREQUAL "") + set(_MATSDK_DEFAULT_INSTALL_DIR "$ENV{MATSDK_INSTALL_DIR}") +endif() + +set(MATSDK_INSTALL_DIR "${_MATSDK_DEFAULT_INSTALL_DIR}" CACHE PATH "MSTelemetry install prefix") +set(MATSDK_INCLUDE_DIR "${MATSDK_INSTALL_DIR}/include/mat" CACHE PATH "MSTelemetry public headers") +set(MATSDK_LIB_DIR "${MATSDK_INSTALL_DIR}/lib" CACHE PATH "MSTelemetry library directory") + +if(NOT EXISTS "${MATSDK_LIB_DIR}/libmat.a" + AND NOT EXISTS "${MATSDK_LIB_DIR}/libmat.dylib" + AND EXISTS "${MATSDK_LIB_DIR}/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/libmat.a") + set(MATSDK_LIB_DIR "${MATSDK_LIB_DIR}/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu" CACHE PATH "MSTelemetry library directory" FORCE) +endif() + +find_library(MATSDK_LIBRARY NAMES mat HINTS "${MATSDK_LIB_DIR}" NO_DEFAULT_PATH) +if(NOT MATSDK_LIBRARY) + message(FATAL_ERROR "Could not find libmat under ${MATSDK_LIB_DIR}. Set MATSDK_INSTALL_DIR or MATSDK_LIB_DIR.") +endif() + +if(NOT EXISTS "${MATSDK_INCLUDE_DIR}") + message(FATAL_ERROR "Could not find mat headers under ${MATSDK_INCLUDE_DIR}. Set MATSDK_INSTALL_DIR or MATSDK_INCLUDE_DIR.") +endif() + +set(MATSDK_SAMPLE_INCLUDE_DIRS "${MATSDK_INCLUDE_DIR}") + +set(MATSDK_SAMPLE_PLATFORM_LIBS "") +if(APPLE) + list(APPEND MATSDK_SAMPLE_PLATFORM_LIBS + "-framework CoreFoundation" + "-framework Foundation" + "-framework CFNetwork" + "-framework Network" + "-framework SystemConfiguration" + ) + if(CMAKE_SYSTEM_NAME STREQUAL "iOS") + list(APPEND MATSDK_SAMPLE_PLATFORM_LIBS "-framework UIKit") + else() + list(APPEND MATSDK_SAMPLE_PLATFORM_LIBS "-framework IOKit") + endif() +endif() + +find_library(MATSDK_SQLITE3_LIB NAMES sqlite3 HINTS "${MATSDK_INSTALL_DIR}/lib" NO_DEFAULT_PATH) +if(NOT MATSDK_SQLITE3_LIB) + set(MATSDK_SQLITE3_LIB sqlite3) +endif() + +mark_as_advanced(MATSDK_INSTALL_DIR MATSDK_INCLUDE_DIR MATSDK_LIB_DIR MATSDK_LIBRARY MATSDK_SQLITE3_LIB) diff --git a/examples/cpp/EventSender/CMakeLists.txt b/examples/cpp/EventSender/CMakeLists.txt index 67a1a3ae6..14d4b95af 100644 --- a/examples/cpp/EventSender/CMakeLists.txt +++ b/examples/cpp/EventSender/CMakeLists.txt @@ -4,39 +4,20 @@ project(EventSender) # Uncomment for building i386 binary on x86_64 system #set(CMAKE_SYSTEM_PROCESSOR i386) -# For ARM / Raspberry Pi 3 cross-compile -# set(MAT_SDK_LIB /usr/local/lib/armv7l-linux-gnu) - -# Point example to SDK dirs for x86_64 Desktop -if(EXISTS "/usr/local/lib/libmat.a") -# Use local libmat.a -set(MAT_SDK_LIB /usr/local/lib/) -else() -# Use architecture-specific libmat.a -set(MAT_SDK_LIB /usr/local/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb -gdwarf-2 -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb -gdwarf-2 -std=c++11") find_package (Threads) -set(MAT_SDK_INCLUDE /usr/local/include/mat) - # 1DS SDK to include dirs -include_directories( . ${MAT_SDK_INCLUDE} ) +include_directories(. ${MATSDK_SAMPLE_INCLUDE_DIRS}) # Link main.cpp to executable add_executable(EventSender EventSender.cpp) source_group(" " REGULAR_EXPRESSION "") -# Prefer linking to more recent local sqlite3 -if(EXISTS "/usr/local/lib/libsqlite3.a") -set (SQLITE3_LIB "/usr/local/lib/libsqlite3.a") -else() -set (SQLITE3_LIB "sqlite3") -endif() - set (PLATFORM_LIBS "") # Add flags for obtaining system UUID via IOKit if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") @@ -46,4 +27,4 @@ endif() #tcmalloc turned off by default #target_link_libraries(EventSender ${MAT_SDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} dl tcmalloc) -target_link_libraries(EventSender ${MAT_SDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) +target_link_libraries(EventSender ${MATSDK_LIBRARY} curl z ${CMAKE_THREAD_LIBS_INIT} ${MATSDK_SQLITE3_LIB} ${MATSDK_SAMPLE_PLATFORM_LIBS} ${PLATFORM_LIBS} dl) diff --git a/examples/cpp/MacProxy/CMakeLists.txt b/examples/cpp/MacProxy/CMakeLists.txt index 89d4cb233..f10ef1609 100644 --- a/examples/cpp/MacProxy/CMakeLists.txt +++ b/examples/cpp/MacProxy/CMakeLists.txt @@ -4,39 +4,20 @@ project(MacProxy) # Uncomment for building i386 binary on x86_64 system #set(CMAKE_SYSTEM_PROCESSOR i386) -# For ARM / Raspberry Pi 3 cross-compile -# set(MAT_SDK_LIB /usr/local/lib/armv7l-linux-gnu) - -# Point example to SDK dirs for x86_64 Desktop -if(EXISTS "/usr/local/lib/libmat.a") -# Use local libmat.a -set(MAT_SDK_LIB /usr/local/lib/) -else() -# Use architecture-specific libmat.a -set(MAT_SDK_LIB /usr/local/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb -gdwarf-2 -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb -gdwarf-2 -std=c++11") find_package (Threads) -set(MAT_SDK_INCLUDE /usr/local/include/mat) - # 1DS SDK to include dirs -include_directories( . ${MAT_SDK_INCLUDE} ) +include_directories(. ${MATSDK_SAMPLE_INCLUDE_DIRS}) # Link main.cpp to executable add_executable(MacProxy main.cpp HttpEventListener.cpp) source_group(" " REGULAR_EXPRESSION "") -# Prefer linking to more recent local sqlite3 -if(EXISTS "/usr/local/lib/libsqlite3.a") -set (SQLITE3_LIB "/usr/local/lib/libsqlite3.a") -else() -set (SQLITE3_LIB "sqlite3") -endif() - set (PLATFORM_LIBS "") # Add flags for obtaining system UUID via IOKit if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") @@ -48,4 +29,4 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") set (PLATFORM_LIBS "atomic") endif() -target_link_libraries(MacProxy ${MAT_SDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) +target_link_libraries(MacProxy ${MATSDK_LIBRARY} curl z ${CMAKE_THREAD_LIBS_INIT} ${MATSDK_SQLITE3_LIB} ${MATSDK_SAMPLE_PLATFORM_LIBS} ${PLATFORM_LIBS} dl) diff --git a/examples/cpp/SampleCpp/CMakeLists.txt b/examples/cpp/SampleCpp/CMakeLists.txt index b377d0ab2..4118eb463 100644 --- a/examples/cpp/SampleCpp/CMakeLists.txt +++ b/examples/cpp/SampleCpp/CMakeLists.txt @@ -4,43 +4,20 @@ project(SampleCpp) # Uncomment for building i386 binary on x86_64 system #set(CMAKE_SYSTEM_PROCESSOR i386) -if (NOT TARGET_ARCH) - set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) -endif() - -# For ARM / Raspberry Pi 3 cross-compile -# set(MAT_SDK_LIB /usr/local/lib/armv7l-linux-gnu) - -# Search for static lib first -find_path(MAT_SDK_LIB_PATH NAMES libmat.a PATHS /usr/lib /usr/local/lib /usr/local/lib/${TARGET_ARCH}-linux-gnu) -if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - # Search for .dylib on Mac OS X - find_path(MAT_SDK_DYLIB_PATH NAMES libmat.dylib PATHS /usr/lib /usr/local/lib) -endif() -find_library(LIBMAT NAMES libmat.a libmat.dylib HINTS ${MAT_SDK_LIB_PATH} ${MAT_SDK_DYLIB_PATH}) +include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb -gdwarf-2 -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb -gdwarf-2 -std=c++11") find_package (Threads) -set(MAT_SDK_INCLUDE /usr/local/include/mat) - # 1DS SDK to include dirs -include_directories( . ${MAT_SDK_INCLUDE} ) +include_directories(. ${MATSDK_SAMPLE_INCLUDE_DIRS}) # Link main.cpp to executable add_executable(SampleCpp main.cpp DebugCallback.cpp demo.c) source_group(" " REGULAR_EXPRESSION "") -# NOTE: modify this sample if necessary to use vcpkg-provided sqlite library -# Prefer linking to more recent local sqlite3 -if(EXISTS "/usr/local/lib/libsqlite3.a") -set (SQLITE3_LIB "/usr/local/lib/libsqlite3.a") -else() -set (SQLITE3_LIB "sqlite3") -endif() - set (PLATFORM_LIBS "") # Add flags for obtaining system UUID via IOKit if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") @@ -55,5 +32,5 @@ endif() #tcmalloc turned off by default #target_link_libraries(SampleCpp ${MAT_SDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} dl tcmalloc) -# TODO: use add_library to allow linking against ${LIBMAT_STATIC} -target_link_libraries(SampleCpp ${LIBMAT} curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) +# TODO: use add_library to allow linking against a proper exported SDK target +target_link_libraries(SampleCpp ${MATSDK_LIBRARY} curl z ${CMAKE_THREAD_LIBS_INIT} ${MATSDK_SQLITE3_LIB} ${MATSDK_SAMPLE_PLATFORM_LIBS} ${PLATFORM_LIBS} dl) diff --git a/examples/cpp/SampleCppMini/CMakeLists.txt b/examples/cpp/SampleCppMini/CMakeLists.txt index af0fbf873..4d1cefe3c 100644 --- a/examples/cpp/SampleCppMini/CMakeLists.txt +++ b/examples/cpp/SampleCppMini/CMakeLists.txt @@ -4,39 +4,20 @@ project(SampleCppMini) # Uncomment for building i386 binary on x86_64 system #set(CMAKE_SYSTEM_PROCESSOR i386) -# For ARM / Raspberry Pi 3 cross-compile -# set(MAT_SDK_LIB /usr/local/lib/armv7l-linux-gnu) - -# Point example to SDK dirs for x86_64 Desktop -if(EXISTS "/usr/local/lib/libmat.a") -# Use local libmat.a -set(MAT_SDK_LIB /usr/local/lib/) -else() -# Use architecture-specific libmat.a -set(MAT_SDK_LIB /usr/local/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb -gdwarf-2 -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb -gdwarf-2 -std=c++11") find_package (Threads) -set(MAT_SDK_INCLUDE /usr/local/include/aria) - # 1DS SDK to include dirs -include_directories( . ${MAT_SDK_INCLUDE} ) +include_directories(. ${MATSDK_SAMPLE_INCLUDE_DIRS}) # Link main.cpp to executable -add_executable(SampleCppMini main.cpp DebugCallback.cpp demo.c) +add_executable(SampleCppMini main.cpp demo.c) source_group(" " REGULAR_EXPRESSION "") -# Prefer linking to more recent local sqlite3 -if(EXISTS "/usr/local/lib/libsqlite3.a") -set (SQLITE3_LIB "/usr/local/lib/libsqlite3.a") -else() -set (SQLITE3_LIB "sqlite3") -endif() - set (PLATFORM_LIBS "") # Add flags for obtaining system UUID via IOKit if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") @@ -46,4 +27,4 @@ endif() #tcmalloc turned off by default #target_link_libraries(SampleCppMini ${MAT_SDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} dl tcmalloc) -target_link_libraries(SampleCppMini ${MAT_SDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) +target_link_libraries(SampleCppMini ${MATSDK_LIBRARY} curl z ${CMAKE_THREAD_LIBS_INIT} ${MATSDK_SQLITE3_LIB} ${MATSDK_SAMPLE_PLATFORM_LIBS} ${PLATFORM_LIBS} dl) diff --git a/examples/cpp/SampleCppMini/main.cpp b/examples/cpp/SampleCppMini/main.cpp index 5214ebc22..9a94146ce 100644 --- a/examples/cpp/SampleCppMini/main.cpp +++ b/examples/cpp/SampleCppMini/main.cpp @@ -56,8 +56,10 @@ void test_cpp_api(const char * token, int ticketType, const char *ticket) // Log detailed event with various properties EventProperties detailed_event("MyApp.detailed_event", { +#ifdef _MSC_VER // Log compiler version { "_MSC_VER", _MSC_VER }, +#endif // Pii-typed fields { "piiKind.None", EventProperty("field_value", PiiKind_None) }, { "piiKind.DistinguishedName", EventProperty("/CN=Jack Frost,OU=PIE,DC=REDMOND,DC=COM", PiiKind_DistinguishedName) }, @@ -75,7 +77,7 @@ void test_cpp_api(const char * token, int ticketType, const char *ticket) // Various typed key-values { "strKey1", "hello1" }, { "strKey2", "hello2" }, - { "int64Key", 1L }, + { "int64Key", 1LL }, { "dblKey", 3.14 }, { "boolKey", false }, { "guidKey0", GUID_t("00000000-0000-0000-0000-000000000000") }, diff --git a/examples/objc/cocoa-app/CMakeLists.txt b/examples/objc/cocoa-app/CMakeLists.txt index 4d5456a83..188fbc4ee 100644 --- a/examples/objc/cocoa-app/CMakeLists.txt +++ b/examples/objc/cocoa-app/CMakeLists.txt @@ -1,31 +1,15 @@ cmake_minimum_required(VERSION 2.8.8) project(foo) -# Point example to SDK dirs for x86_64 Desktop -if(EXISTS "/usr/local/lib/libmat.a") -# Use local libmat.a -set(MATSDK_LIB /usr/local/lib/) -else() -# Use architecture-specific libmat.a -set(MATSDK_LIB /usr/local/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb -gdwarf-2 -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb -gdwarf-2 -std=c++11") find_package (Threads) -set(MATSDK_INCLUDE /usr/local/include/mat) - # 1DS SDK to include dirs -include_directories( . ${MATSDK_INCLUDE} ) - -# Prefer linking to more recent local sqlite3 -if(EXISTS "/usr/local/lib/libsqlite3.a") -set (SQLITE3_LIB "/usr/local/lib/libsqlite3.a") -else() -set (SQLITE3_LIB "sqlite3") -endif() +include_directories(. ${MATSDK_SAMPLE_INCLUDE_DIRS}) set (PLATFORM_LIBS "") # Add flags for obtaining system UUID via IOKit @@ -57,4 +41,4 @@ set_target_properties( ${CMAKE_CURRENT_LIST_DIR}/plist.in ) -target_link_libraries(foo ${MATSDK_LIB}/libmat.a curl z ${CMAKE_THREAD_LIBS_INIT} ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) +target_link_libraries(foo ${MATSDK_LIBRARY} curl z ${CMAKE_THREAD_LIBS_INIT} ${MATSDK_SQLITE3_LIB} ${MATSDK_SAMPLE_PLATFORM_LIBS} ${PLATFORM_LIBS} dl) diff --git a/examples/swift/SamplePackage/Package.swift b/examples/swift/SamplePackage/Package.swift index eb32822c2..66930e19b 100644 --- a/examples/swift/SamplePackage/Package.swift +++ b/examples/swift/SamplePackage/Package.swift @@ -2,6 +2,9 @@ // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription +import Foundation + +let matsdkInstallDir = ProcessInfo.processInfo.environment["MATSDK_INSTALL_DIR"] ?? "/usr/local" let package = Package( name: "SamplePackage", @@ -26,7 +29,7 @@ let package = Package( .unsafeFlags(["-Xcc", "-I../../../wrappers/swift/Modules/"]), ], linkerSettings: [ - .unsafeFlags(["-L/usr/local/lib"]), + .unsafeFlags(["-L\(matsdkInstallDir)/lib"]), // Libs to be linked. .linkedLibrary("mat"), .linkedLibrary("sqlite3"), diff --git a/examples/swift/SampleXcodeApp/SwiftWrapperApp.xcodeproj/project.pbxproj b/examples/swift/SampleXcodeApp/SwiftWrapperApp.xcodeproj/project.pbxproj index 50111aaf0..4000bc664 100644 --- a/examples/swift/SampleXcodeApp/SwiftWrapperApp.xcodeproj/project.pbxproj +++ b/examples/swift/SampleXcodeApp/SwiftWrapperApp.xcodeproj/project.pbxproj @@ -1,423 +1,426 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 56; - objects = { - -/* Begin PBXBuildFile section */ - 2711D2652A45438A000712BD /* SwiftWrapperExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2711D2642A45438A000712BD /* SwiftWrapperExampleApp.swift */; }; - 2711D2672A45438A000712BD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2711D2662A45438A000712BD /* ContentView.swift */; }; - 2711D26D2A45438C000712BD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2711D26C2A45438C000712BD /* Preview Assets.xcassets */; }; - A34744202A4642300039D419 /* OneDSSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A347441F2A4642300039D419 /* OneDSSwift */; }; - A34744242A4643B20039D419 /* libmat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744232A4643B20039D419 /* libmat.a */; }; - A34744262A4643FE0039D419 /* libsqlite3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744252A4643FE0039D419 /* libsqlite3.a */; }; - A34744282A46440F0039D419 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744272A46440F0039D419 /* SystemConfiguration.framework */; }; - A347442A2A46441A0039D419 /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744292A46441A0039D419 /* Network.framework */; }; - A347442C2A46442C0039D419 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A347442B2A46442C0039D419 /* libz.tbd */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2711D2612A45438A000712BD /* SwiftWrapperApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftWrapperApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2711D2642A45438A000712BD /* SwiftWrapperExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftWrapperExampleApp.swift; sourceTree = ""; }; - 2711D2662A45438A000712BD /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 2711D26A2A45438C000712BD /* SwiftWrapperApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SwiftWrapperApp.entitlements; sourceTree = ""; }; - 2711D26C2A45438C000712BD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 2711D2732A45452E000712BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 277E76FF2A45FE4D004A3A8F /* swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = swift; path = ../../../wrappers/swift; sourceTree = ""; }; - A34744232A4643B20039D419 /* libmat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmat.a; path = /usr/local/lib/libmat.a; sourceTree = ""; }; - A34744252A4643FE0039D419 /* libsqlite3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsqlite3.a; path = /usr/local/lib/libsqlite3.a; sourceTree = ""; }; - A34744272A46440F0039D419 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; - A34744292A46441A0039D419 /* Network.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Network.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Network.framework; sourceTree = DEVELOPER_DIR; }; - A347442B2A46442C0039D419 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 2711D25E2A45438A000712BD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A347442C2A46442C0039D419 /* libz.tbd in Frameworks */, - A347442A2A46441A0039D419 /* Network.framework in Frameworks */, - A34744282A46440F0039D419 /* SystemConfiguration.framework in Frameworks */, - A34744202A4642300039D419 /* OneDSSwift in Frameworks */, - A34744242A4643B20039D419 /* libmat.a in Frameworks */, - A34744262A4643FE0039D419 /* libsqlite3.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2711D2582A45438A000712BD = { - isa = PBXGroup; - children = ( - 277E76FE2A45FE4D004A3A8F /* Packages */, - 2711D2632A45438A000712BD /* SwiftWrapperApp */, - 2711D2622A45438A000712BD /* Products */, - A347441E2A4642300039D419 /* Frameworks */, - ); - sourceTree = ""; - }; - 2711D2622A45438A000712BD /* Products */ = { - isa = PBXGroup; - children = ( - 2711D2612A45438A000712BD /* SwiftWrapperApp.app */, - ); - name = Products; - sourceTree = ""; - }; - 2711D2632A45438A000712BD /* SwiftWrapperApp */ = { - isa = PBXGroup; - children = ( - 2711D2732A45452E000712BD /* Info.plist */, - 2711D2642A45438A000712BD /* SwiftWrapperExampleApp.swift */, - 2711D2662A45438A000712BD /* ContentView.swift */, - 2711D26A2A45438C000712BD /* SwiftWrapperApp.entitlements */, - 2711D26B2A45438C000712BD /* Preview Content */, - ); - path = SwiftWrapperApp; - sourceTree = ""; - }; - 2711D26B2A45438C000712BD /* Preview Content */ = { - isa = PBXGroup; - children = ( - 2711D26C2A45438C000712BD /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 277E76FE2A45FE4D004A3A8F /* Packages */ = { - isa = PBXGroup; - children = ( - 277E76FF2A45FE4D004A3A8F /* swift */, - ); - name = Packages; - sourceTree = ""; - }; - A347441E2A4642300039D419 /* Frameworks */ = { - isa = PBXGroup; - children = ( - A347442B2A46442C0039D419 /* libz.tbd */, - A34744292A46441A0039D419 /* Network.framework */, - A34744272A46440F0039D419 /* SystemConfiguration.framework */, - A34744252A4643FE0039D419 /* libsqlite3.a */, - A34744232A4643B20039D419 /* libmat.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 2711D2602A45438A000712BD /* SwiftWrapperApp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2711D2702A45438C000712BD /* Build configuration list for PBXNativeTarget "SwiftWrapperApp" */; - buildPhases = ( - 2711D25D2A45438A000712BD /* Sources */, - 2711D25E2A45438A000712BD /* Frameworks */, - 2711D25F2A45438A000712BD /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 277E77012A460B83004A3A8F /* PBXTargetDependency */, - ); - name = SwiftWrapperApp; - packageProductDependencies = ( - A347441F2A4642300039D419 /* OneDSSwift */, - ); - productName = SwiftWrapperApp; - productReference = 2711D2612A45438A000712BD /* SwiftWrapperApp.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2711D2592A45438A000712BD /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1430; - LastUpgradeCheck = 1430; - TargetAttributes = { - 2711D2602A45438A000712BD = { - CreatedOnToolsVersion = 14.3; - }; - }; - }; - buildConfigurationList = 2711D25C2A45438A000712BD /* Build configuration list for PBXProject "SwiftWrapperApp" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 2711D2582A45438A000712BD; - productRefGroup = 2711D2622A45438A000712BD /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 2711D2602A45438A000712BD /* SwiftWrapperApp */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 2711D25F2A45438A000712BD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2711D26D2A45438C000712BD /* Preview Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 2711D25D2A45438A000712BD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2711D2672A45438A000712BD /* ContentView.swift in Sources */, - 2711D2652A45438A000712BD /* SwiftWrapperExampleApp.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 277E77012A460B83004A3A8F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - productRef = 277E77002A460B83004A3A8F /* OneDSSwift */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 2711D26E2A45438C000712BD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_INCLUDE_PATHS = ""; - "SWIFT_INCLUDE_PATHS[arch=*]" = ../../../wrappers/swift/Modules/; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 2711D26F2A45438C000712BD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_INCLUDE_PATHS = ""; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 2711D2712A45438C000712BD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = SwiftWrapperApp/SwiftWrapperApp.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"SwiftWrapperApp/Preview Content\""; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = SwiftWrapperApp/Info.plist; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16.4; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[arch=*]" = /usr/local/lib/; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = /usr/local/lib; - MACOSX_DEPLOYMENT_TARGET = 13.3; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = OneDSSwift.SwiftWrapperApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 2711D2722A45438C000712BD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = SwiftWrapperApp/SwiftWrapperApp.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"SwiftWrapperApp/Preview Content\""; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = SwiftWrapperApp/Info.plist; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16.4; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = /usr/local/lib; - MACOSX_DEPLOYMENT_TARGET = 13.3; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = OneDSSwift.SwiftWrapperApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2711D25C2A45438A000712BD /* Build configuration list for PBXProject "SwiftWrapperApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2711D26E2A45438C000712BD /* Debug */, - 2711D26F2A45438C000712BD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2711D2702A45438C000712BD /* Build configuration list for PBXNativeTarget "SwiftWrapperApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2711D2712A45438C000712BD /* Debug */, - 2711D2722A45438C000712BD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCSwiftPackageProductDependency section */ - 277E77002A460B83004A3A8F /* OneDSSwift */ = { - isa = XCSwiftPackageProductDependency; - productName = OneDSSwift; - }; - A347441F2A4642300039D419 /* OneDSSwift */ = { - isa = XCSwiftPackageProductDependency; - productName = OneDSSwift; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 2711D2592A45438A000712BD /* Project object */; -} +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 2711D2652A45438A000712BD /* SwiftWrapperExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2711D2642A45438A000712BD /* SwiftWrapperExampleApp.swift */; }; + 2711D2672A45438A000712BD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2711D2662A45438A000712BD /* ContentView.swift */; }; + 2711D26D2A45438C000712BD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2711D26C2A45438C000712BD /* Preview Assets.xcassets */; }; + A34744202A4642300039D419 /* OneDSSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A347441F2A4642300039D419 /* OneDSSwift */; }; + A34744242A4643B20039D419 /* libmat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744232A4643B20039D419 /* libmat.a */; }; + A34744262A4643FE0039D419 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744252A4643FE0039D419 /* libsqlite3.tbd */; }; + A34744282A46440F0039D419 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744272A46440F0039D419 /* SystemConfiguration.framework */; }; + A347442A2A46441A0039D419 /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A34744292A46441A0039D419 /* Network.framework */; }; + A347442C2A46442C0039D419 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A347442B2A46442C0039D419 /* libz.tbd */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2711D2612A45438A000712BD /* SwiftWrapperApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftWrapperApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2711D2642A45438A000712BD /* SwiftWrapperExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftWrapperExampleApp.swift; sourceTree = ""; }; + 2711D2662A45438A000712BD /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 2711D26A2A45438C000712BD /* SwiftWrapperApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SwiftWrapperApp.entitlements; sourceTree = ""; }; + 2711D26C2A45438C000712BD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 2711D2732A45452E000712BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 277E76FF2A45FE4D004A3A8F /* swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = swift; path = ../../../wrappers/swift; sourceTree = ""; }; + A34744232A4643B20039D419 /* libmat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmat.a; path = "$(MATSDK_INSTALL_DIR)/lib/libmat.a"; sourceTree = ""; }; + A34744252A4643FE0039D419 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; + A34744272A46440F0039D419 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; + A34744292A46441A0039D419 /* Network.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Network.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Network.framework; sourceTree = DEVELOPER_DIR; }; + A347442B2A46442C0039D419 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2711D25E2A45438A000712BD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A347442C2A46442C0039D419 /* libz.tbd in Frameworks */, + A347442A2A46441A0039D419 /* Network.framework in Frameworks */, + A34744282A46440F0039D419 /* SystemConfiguration.framework in Frameworks */, + A34744202A4642300039D419 /* OneDSSwift in Frameworks */, + A34744242A4643B20039D419 /* libmat.a in Frameworks */, + A34744262A4643FE0039D419 /* libsqlite3.tbd in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2711D2582A45438A000712BD = { + isa = PBXGroup; + children = ( + 277E76FE2A45FE4D004A3A8F /* Packages */, + 2711D2632A45438A000712BD /* SwiftWrapperApp */, + 2711D2622A45438A000712BD /* Products */, + A347441E2A4642300039D419 /* Frameworks */, + ); + sourceTree = ""; + }; + 2711D2622A45438A000712BD /* Products */ = { + isa = PBXGroup; + children = ( + 2711D2612A45438A000712BD /* SwiftWrapperApp.app */, + ); + name = Products; + sourceTree = ""; + }; + 2711D2632A45438A000712BD /* SwiftWrapperApp */ = { + isa = PBXGroup; + children = ( + 2711D2732A45452E000712BD /* Info.plist */, + 2711D2642A45438A000712BD /* SwiftWrapperExampleApp.swift */, + 2711D2662A45438A000712BD /* ContentView.swift */, + 2711D26A2A45438C000712BD /* SwiftWrapperApp.entitlements */, + 2711D26B2A45438C000712BD /* Preview Content */, + ); + path = SwiftWrapperApp; + sourceTree = ""; + }; + 2711D26B2A45438C000712BD /* Preview Content */ = { + isa = PBXGroup; + children = ( + 2711D26C2A45438C000712BD /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 277E76FE2A45FE4D004A3A8F /* Packages */ = { + isa = PBXGroup; + children = ( + 277E76FF2A45FE4D004A3A8F /* swift */, + ); + name = Packages; + sourceTree = ""; + }; + A347441E2A4642300039D419 /* Frameworks */ = { + isa = PBXGroup; + children = ( + A347442B2A46442C0039D419 /* libz.tbd */, + A34744292A46441A0039D419 /* Network.framework */, + A34744272A46440F0039D419 /* SystemConfiguration.framework */, + A34744252A4643FE0039D419 /* libsqlite3.tbd */, + A34744232A4643B20039D419 /* libmat.a */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2711D2602A45438A000712BD /* SwiftWrapperApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2711D2702A45438C000712BD /* Build configuration list for PBXNativeTarget "SwiftWrapperApp" */; + buildPhases = ( + 2711D25D2A45438A000712BD /* Sources */, + 2711D25E2A45438A000712BD /* Frameworks */, + 2711D25F2A45438A000712BD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 277E77012A460B83004A3A8F /* PBXTargetDependency */, + ); + name = SwiftWrapperApp; + packageProductDependencies = ( + A347441F2A4642300039D419 /* OneDSSwift */, + ); + productName = SwiftWrapperApp; + productReference = 2711D2612A45438A000712BD /* SwiftWrapperApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2711D2592A45438A000712BD /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1430; + LastUpgradeCheck = 1430; + TargetAttributes = { + 2711D2602A45438A000712BD = { + CreatedOnToolsVersion = 14.3; + }; + }; + }; + buildConfigurationList = 2711D25C2A45438A000712BD /* Build configuration list for PBXProject "SwiftWrapperApp" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2711D2582A45438A000712BD; + productRefGroup = 2711D2622A45438A000712BD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2711D2602A45438A000712BD /* SwiftWrapperApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2711D25F2A45438A000712BD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2711D26D2A45438C000712BD /* Preview Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2711D25D2A45438A000712BD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2711D2672A45438A000712BD /* ContentView.swift in Sources */, + 2711D2652A45438A000712BD /* SwiftWrapperExampleApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 277E77012A460B83004A3A8F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 277E77002A460B83004A3A8F /* OneDSSwift */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 2711D26E2A45438C000712BD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_INCLUDE_PATHS = ""; + "SWIFT_INCLUDE_PATHS[arch=*]" = ../../../wrappers/swift/Modules/; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 2711D26F2A45438C000712BD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_INCLUDE_PATHS = ""; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 2711D2712A45438C000712BD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = SwiftWrapperApp/SwiftWrapperApp.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SwiftWrapperApp/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SwiftWrapperApp/Info.plist; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[arch=*]" = "$(MATSDK_INSTALL_DIR)/lib"; + LIBRARY_SEARCH_PATHS = "$(MATSDK_INSTALL_DIR)/lib"; + MATSDK_INSTALL_DIR = /usr/local; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 13.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = OneDSSwift.SwiftWrapperApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2711D2722A45438C000712BD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = SwiftWrapperApp/SwiftWrapperApp.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SwiftWrapperApp/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SwiftWrapperApp/Info.plist; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[arch=*]" = "$(MATSDK_INSTALL_DIR)/lib"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + LIBRARY_SEARCH_PATHS = "$(MATSDK_INSTALL_DIR)/lib"; + MACOSX_DEPLOYMENT_TARGET = 13.3; + MATSDK_INSTALL_DIR = /usr/local; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = OneDSSwift.SwiftWrapperApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2711D25C2A45438A000712BD /* Build configuration list for PBXProject "SwiftWrapperApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2711D26E2A45438C000712BD /* Debug */, + 2711D26F2A45438C000712BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2711D2702A45438C000712BD /* Build configuration list for PBXNativeTarget "SwiftWrapperApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2711D2712A45438C000712BD /* Debug */, + 2711D2722A45438C000712BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 277E77002A460B83004A3A8F /* OneDSSwift */ = { + isa = XCSwiftPackageProductDependency; + productName = OneDSSwift; + }; + A347441F2A4642300039D419 /* OneDSSwift */ = { + isa = XCSwiftPackageProductDependency; + productName = OneDSSwift; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 2711D2592A45438A000712BD /* Project object */; +} diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7321a6de5..d1ec2e09f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,7 +1,15 @@ # Honor visibility properties for all target types cmake_policy(SET CMP0063 NEW) -include_directories( . ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include/public ${CMAKE_CURRENT_SOURCE_DIR}/include/mat ${CMAKE_CURRENT_SOURCE_DIR}/pal ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR}/modules/exp ${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard ${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector ${CMAKE_CURRENT_SOURCE_DIR}/modules/cds ${CMAKE_CURRENT_SOURCE_DIR}/modules/signals ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer /usr/local/include ) +# Legacy (non-target) include paths that apply globally within this directory and +# are used by build.sh / MSBuild / standalone CMake workflows. They do NOT propagate +# to downstream consumers via find_package() (see target_include_directories below). +include_directories( . ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include/public ${CMAKE_CURRENT_SOURCE_DIR}/include/mat ${CMAKE_CURRENT_SOURCE_DIR}/pal ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR}/modules/exp ${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer ${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard ${CMAKE_CURRENT_SOURCE_DIR}/modules/liveeventinspector ${CMAKE_CURRENT_SOURCE_DIR}/modules/cds ${CMAKE_CURRENT_SOURCE_DIR}/modules/signals ${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer ) + +# Legacy builds may need system-installed deps from /usr/local/include +if(NOT MATSDK_USE_VCPKG_DEPS) + include_directories(/usr/local/include) +endif() set(SRCS decorators/BaseDecorator.cpp packager/BondSplicer.cpp @@ -172,11 +180,18 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") pal/posix/NetworkInformationImpl.mm ) else() - list(APPEND SRCS - http/HttpClient_Curl.cpp - http/HttpClient_Curl.hpp - pal/posix/NetworkInformationImpl.cpp - ) + list(APPEND SRCS pal/posix/NetworkInformationImpl.cpp) + if(CMAKE_SYSTEM_NAME STREQUAL "Android") + list(APPEND SRCS + http/HttpClient_Android.cpp + http/HttpClient_Android.hpp + ) + else() + list(APPEND SRCS + http/HttpClient_Curl.cpp + http/HttpClient_Curl.hpp + ) + endif() endif() if(APPLE AND BUILD_OBJC_WRAPPER) message(STATUS "Include ObjC Wrappers") @@ -230,8 +245,10 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") elseif(PAL_IMPLEMENTATION STREQUAL "WIN32") # Win32 Desktop for now. # TODO: define a separate PAL for Win10 cmake build -include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../zlib ${CMAKE_CURRENT_SOURCE_DIR}/../sqlite) -add_definitions(-D_UNICODE -DUNICODE -DZLIB_WINAPI -DWIN32 -DMATSDK_PLATFORM_WINDOWS=1 -DMATSDK_SHARED_LIB=1 -D_UTC_SDK -DUSE_BOND -D_WINDOWS -D_USRDLL -DWINVER=_WIN32_WINNT_WIN7) +if(NOT MATSDK_USE_VCPKG_DEPS) + include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../zlib ${CMAKE_CURRENT_SOURCE_DIR}/../sqlite) +endif() +add_definitions(-D_UNICODE -DUNICODE -DWIN32 -DMATSDK_PLATFORM_WINDOWS=1 -DMATSDK_SHARED_LIB=1 -D_UTC_SDK -DUSE_BOND -D_WINDOWS -D_USRDLL -DWINVER=_WIN32_WINNT_WIN7) remove_definitions(-D_MBCS) list(APPEND SRCS http/HttpClient_WinInet.cpp @@ -267,71 +284,183 @@ endif() create_source_files_groups_per_folder(${SRCS}) -# MinGW does not require pthread -if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +# Linux and Android require pthreads +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") find_package(Threads REQUIRED) - if(THREADS_HAVE_PTHREAD_ARG) - target_compile_options(mat PUBLIC "-pthread") - endif() endif() +################################################################################################ +# Build the library +################################################################################################ if(BUILD_SHARED_LIBS STREQUAL "ON") message(STATUS "Building shared SDK library") + add_library(mat SHARED ${SRCS}) +else() + message(STATUS "Building static SDK library") + add_library(mat STATIC ${SRCS}) +endif() - # include(FindCURL) - # find_package(CURL REQUIRED) - # set(CMAKE_REQUIRED_LIBRARIES "${CURL_LIBRARIES}") - - # find_package(sqlite3 REQUIRED) +# Target-based include paths for vcpkg / install workflow. +# PUBLIC propagates to consumers; PRIVATE is SDK-internal only. +# BUILD_INTERFACE is used during the SDK build; INSTALL_INTERFACE is used +# by consumers after cmake --install. +target_include_directories(mat + PUBLIC + $ + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/pal + ${CMAKE_CURRENT_SOURCE_DIR}/utils +) - add_library(mat SHARED ${SRCS}) +################################################################################################ +# Link dependencies +################################################################################################ +if(MATSDK_USE_VCPKG_DEPS) + # vcpkg mode: all deps resolved via find_package() in root CMakeLists.txt + target_link_libraries(mat + PRIVATE + unofficial::sqlite3::sqlite3 + ZLIB::ZLIB + nlohmann_json::nlohmann_json + ${LIBS} + ) +else() + # Legacy mode: use vendored or system-installed deps + if(CMAKE_SYSTEM_NAME STREQUAL "Android") + # Android NDK has no system sqlite3 or zlib — build from bundled source. + add_library(sqlite3_bundled STATIC "${CMAKE_CURRENT_SOURCE_DIR}/../sqlite/sqlite3.c") + target_include_directories(sqlite3_bundled PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../sqlite") + # When -ffast-math is enabled globally, re-enable finite math for sqlite3 (uses INFINITY macro). + # Also suppress warnings treated as errors in vendored code. + target_compile_options(sqlite3_bundled PRIVATE -fno-finite-math-only -Wno-unused-function) - # Add flags for obtaining system UUID via IOKit - if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(CMAKE_SHARED_LINKER_FLAGS - "-framework CoreFoundation -framework IOKit -framework Foundation" + # Build zlib from bundled source, excluding Intel SIMD files (crc_folding.c, + # fill_window_sse.c, x86.c) that require SSE4.2/PCLMULQDQ and cannot compile + # on ARM. simd_stub.c provides the necessary stubs instead. + add_library(zlib_bundled STATIC + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/adler32.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/compress.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/crc32.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/deflate.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/gzclose.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/gzlib.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/gzread.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/gzwrite.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/infback.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/inffast.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/inflate.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/inftrees.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/trees.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/uncompr.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/zutil.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/simd_stub.c" ) - endif() + target_include_directories(zlib_bundled PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../zlib") + # Bundled zlib 1.2.11 uses K&R-style function definitions and POSIX functions + # (close/read/write) without explicit includes; suppress warnings from + # vendored code we don't modify. + target_compile_options(zlib_bundled PRIVATE + -Wno-strict-prototypes -Wno-deprecated-non-prototype -Wno-implicit-function-declaration) - # - # TODO: allow adding "${Tcmalloc_LIBRARIES}" to target_link_libraries for memory leak debugging - # - if (BUILD_STATIC_SQLITE STREQUAL "ON") - # Build dynamic library, but prefer statically linking sqlite3 and zlib + target_link_libraries(mat PRIVATE sqlite3_bundled zlib_bundled ${LIBS}) + elseif(PAL_IMPLEMENTATION STREQUAL "WIN32") + # Windows legacy: vendored sqlite/zlib headers are included via + # include_directories in the PAL section above; link only ${LIBS} + # (e.g. CURL if needed — sqlite/zlib come from .vcxproj references). + target_link_libraries(mat PRIVATE ${LIBS}) + else() + # Linux/macOS legacy: link system-installed sqlite3 and zlib add_library(sqlite3 STATIC IMPORTED GLOBAL) + find_library(SQLITE3_STATIC_LIB NAMES libsqlite3.a + PATHS /usr/local/lib /usr/local/opt/sqlite/lib /opt/homebrew/opt/sqlite/lib + NO_DEFAULT_PATH) + if(SQLITE3_STATIC_LIB) + set_target_properties(sqlite3 PROPERTIES IMPORTED_LOCATION ${SQLITE3_STATIC_LIB}) + endif() add_library(z STATIC IMPORTED GLOBAL) - target_link_libraries(mat PRIVATE sqlite3 PUBLIC z ${LIBS} "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" "${CMAKE_REQUIRED_LIBRARIES}") - else() - # Prefer shared libraries for sqlite3 and zlib - add_library(sqlite3 SHARED IMPORTED GLOBAL) - add_library(z SHARED IMPORTED GLOBAL) - target_link_libraries(mat PUBLIC sqlite3 PUBLIC z ${LIBS} "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" "${CMAKE_REQUIRED_LIBRARIES}") + target_link_libraries(mat PRIVATE sqlite3 z ${LIBS}) endif() +endif() - # target_link_libraries(mat PUBLIC libsqlite3 libcurl.a libz.a libssl.a libcrypto.a "${SQLITE_LIBRARY}" "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) - install(TARGETS mat EXPORT mat LIBRARY DESTINATION ${INSTALL_LIB_DIR}) -else() - message(STATUS "Building static SDK library") - add_library(mat STATIC ${SRCS}) - if(LINK_STATIC_DEPENDS) - if(PAL_IMPLEMENTATION STREQUAL "WIN32") - target_link_libraries(mat ${LIBS} "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) - else() - add_library(sqlite3 STATIC IMPORTED GLOBAL) - find_library(SQLITE3_STATIC_LIB NAMES libsqlite3.a - PATHS /usr/local/lib /usr/local/opt/sqlite/lib /opt/homebrew/opt/sqlite/lib - NO_DEFAULT_PATH) - if(SQLITE3_STATIC_LIB) - set_target_properties(sqlite3 PROPERTIES IMPORTED_LOCATION ${SQLITE3_STATIC_LIB}) - endif() - add_library(z STATIC IMPORTED GLOBAL) - # - # TODO: allow adding "${Tcmalloc_LIBRARIES}" to target_link_libraries for memory leak debugging - # - target_link_libraries(mat PRIVATE libsqlite3.a PUBLIC libz.a ${LIBS} "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}" ) - endif() +# Platform-specific link dependencies +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") + target_link_libraries(mat PUBLIC "${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_DL_LIBS}") + if(THREADS_HAVE_PTHREAD_ARG) + target_compile_options(mat PUBLIC "-pthread") + endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Android") + target_link_libraries(mat PUBLIC log) + endif() +elseif(PAL_IMPLEMENTATION STREQUAL "WIN32") + target_link_libraries(mat PUBLIC wininet crypt32 ws2_32) +elseif(APPLE) + target_link_libraries(mat PUBLIC + "-framework CoreFoundation" + "-framework Foundation" + "-framework CFNetwork" + "-framework Network" + "-framework SystemConfiguration" + ) + if(BUILD_IOS OR CMAKE_SYSTEM_NAME STREQUAL "iOS") + target_link_libraries(mat PUBLIC "-framework UIKit") + else() + target_link_libraries(mat PUBLIC "-framework IOKit") endif() - install(TARGETS mat EXPORT mat ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) endif() -message(STATUS "Library will be installed to ${INSTALL_LIB_DIR}") +################################################################################################ +# Installation +################################################################################################ +# The CMake package config / export workflow is used by vcpkg and any CMake-based +# consumer that does find_package(MSTelemetry). Legacy (non-vcpkg) builds install +# via install.sh or MSBuild output directories and don't need this. +if(MATSDK_USE_VCPKG_DEPS) + install(TARGETS mat + EXPORT MSTelemetryTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + + message(STATUS "Library will be installed to ${CMAKE_INSTALL_LIBDIR}") + + # Generate and install CMake package config files + install(EXPORT MSTelemetryTargets + FILE MSTelemetryTargets.cmake + NAMESPACE MSTelemetry:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MSTelemetry + ) + + configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/MSTelemetryConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/MSTelemetryConfig.cmake" + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MSTelemetry + ) + + if(NOT DEFINED MATSDK_BUILD_VERSION OR MATSDK_BUILD_VERSION STREQUAL "") + message(FATAL_ERROR "MATSDK_BUILD_VERSION is not set. Cannot generate package version file.") + endif() + + write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/MSTelemetryConfigVersion.cmake" + VERSION ${MATSDK_BUILD_VERSION} + COMPATIBILITY AnyNewerVersion + ) + + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/MSTelemetryConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/MSTelemetryConfigVersion.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MSTelemetry + ) +else() + # Legacy install: just put the library and headers in standard locations + install(TARGETS mat + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + message(STATUS "Library will be installed to ${CMAKE_INSTALL_LIBDIR}") +endif() diff --git a/tests/vcpkg/CMakeLists.txt b/tests/vcpkg/CMakeLists.txt new file mode 100644 index 000000000..42636fa16 --- /dev/null +++ b/tests/vcpkg/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.15) +project(mstelemetry_vcpkg_test LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# Match vcpkg static triplet CRT linkage +if(MSVC AND VCPKG_TARGET_TRIPLET MATCHES "-static$") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() + +find_package(MSTelemetry CONFIG REQUIRED) + +add_executable(vcpkg_test main.cpp) +target_link_libraries(vcpkg_test PRIVATE MSTelemetry::mat) + +enable_testing() +add_test(NAME vcpkg_integration_test COMMAND vcpkg_test) diff --git a/tests/vcpkg/README.md b/tests/vcpkg/README.md new file mode 100644 index 000000000..d9ffcba72 --- /dev/null +++ b/tests/vcpkg/README.md @@ -0,0 +1,111 @@ +# Vcpkg Port Integration Tests + +End-to-end tests that verify the `mstelemetry` vcpkg port can be installed, found via `find_package(MSTelemetry CONFIG)`, linked, and executed on all supported platforms. + +## Prerequisites + +1. **vcpkg** — [Install and bootstrap](https://vcpkg.io/en/getting-started): + ```bash + git clone https://github.com/microsoft/vcpkg ~/vcpkg + ~/vcpkg/bootstrap-vcpkg.sh # Linux/macOS + ``` + ```powershell + git clone https://github.com/microsoft/vcpkg C:\vcpkg + .\vcpkg\bootstrap-vcpkg.bat # Windows + ``` +2. **Set `VCPKG_ROOT`**: + ```bash + export VCPKG_ROOT=~/vcpkg # Linux/macOS (add to ~/.bashrc) + ``` + ```powershell + $env:VCPKG_ROOT = "$HOME\vcpkg" # Windows (or set system env var) + ``` +3. **Platform tools** — see per-platform sections below. + +## Running Tests + +All scripts are run from the repo root. + +### Windows + +**Requires:** Visual Studio 2019+ with C++ workload, cmake + +Best run from a **VS Developer Command Prompt** (ensures the same compiler version as vcpkg uses): +```powershell +.\tests\vcpkg\test-vcpkg-windows.ps1 -VcpkgRoot C:\path\to\vcpkg +``` + +> **Note:** Visual Studio's `vcvarsall.bat` overrides the `VCPKG_ROOT` environment variable. +> Always pass `-VcpkgRoot` explicitly to point at your vcpkg installation. + +Optional: specify a different triplet (default auto-detects host architecture): +```powershell +.\tests\vcpkg\test-vcpkg-windows.ps1 -VcpkgRoot C:\path\to\vcpkg -Triplet x64-windows +``` + +### Linux + +**Requires:** gcc/g++, cmake, pkg-config + +```bash +./tests/vcpkg/test-vcpkg-linux.sh +``` + +### macOS + +**Requires:** Xcode command line tools, cmake + +```bash +./tests/vcpkg/test-vcpkg-macos.sh +``` + +### iOS + +**Requires:** macOS with Xcode + iOS SDK, cmake + +**Device build** (cross-compile only — verifies the binary is produced): +```bash +./tests/vcpkg/test-vcpkg-ios.sh +``` + +**Simulator build** (builds and runs on iOS Simulator): +```bash +./tests/vcpkg/test-vcpkg-ios.sh --simulator +``` + +The simulator mode uses the built-in vcpkg community triplet `arm64-ios-simulator` that targets the `iphonesimulator` SDK, then executes the binary via `xcrun simctl spawn`. + +### Android (cross-compile) + +**Requires:** Android NDK, cmake, VCPKG_ROOT set + +```bash +# Default: arm64-v8a +./tests/vcpkg/test-vcpkg-android.sh + +# Other ABIs: +./tests/vcpkg/test-vcpkg-android.sh armeabi-v7a +./tests/vcpkg/test-vcpkg-android.sh x86_64 +``` + +Set `ANDROID_NDK_HOME` if the script can't find your NDK automatically. Cross-compiled binary can be tested on device via `adb push`/`adb shell`. + +## What Gets Tested + +Each script runs 3 steps: + +1. **Configure** — CMake configures a minimal consumer project with the vcpkg toolchain. Dependencies (including the `mstelemetry` overlay port) are installed automatically. +2. **Build** — The consumer links against `MSTelemetry::mat` +3. **Run** — The test binary exercises `LogManager`, `EventProperties`, and verifies all symbols resolve + +## Troubleshooting + +| Problem | Fix | +|---------|-----| +| `VCPKG_ROOT is not set` | Set the environment variable to your vcpkg installation | +| vcvarsall overrides `VCPKG_ROOT` | Pass `-VcpkgRoot C:\path\to\vcpkg` explicitly on Windows | +| `RuntimeLibrary mismatch` (Windows) | Run from a VS Developer Command Prompt matching vcpkg's compiler | +| Dependency build fails | Check vcpkg logs in `build-*/consumer/vcpkg-manifest-install.log` | +| iOS SDK not found | Install Xcode and run `xcode-select --install` | +| Android NDK not found | Set `ANDROID_NDK_HOME` to your NDK path (e.g., `$ANDROID_HOME/ndk/26.x.x`) | +| First run is slow | Dependencies (sqlite3, zlib, nlohmann-json, curl) are built on first run | diff --git a/tests/vcpkg/main.cpp b/tests/vcpkg/main.cpp new file mode 100644 index 000000000..6a5e3bbc6 --- /dev/null +++ b/tests/vcpkg/main.cpp @@ -0,0 +1,81 @@ +// Vcpkg integration test for mstelemetry +// Verifies that find_package(MSTelemetry) works and core APIs are callable + +#include +#include +#include +#include + +#include "LogManager.hpp" + +LOGMANAGER_INSTANCE + +using namespace MAT; + +static int test_count = 0; +static int pass_count = 0; + +static void check(bool cond, const char* name) +{ + test_count++; + if (cond) { + pass_count++; + printf(" [PASS] %s\n", name); + } else { + printf(" [FAIL] %s\n", name); + } +} + +int main() +{ + printf("=== MSTelemetry vcpkg integration test ===\n"); + + // ---- Core API tests ---- + printf("\n-- Core API --\n"); + + // 1. Verify headers compile and link + check(true, "Headers found and compiled successfully"); + + // 2. LogManager configuration + auto& config = LogManager::GetLogConfiguration(); + check(true, "LogManager::GetLogConfiguration() callable"); + + // 3. EventProperties with multiple types + { + EventProperties props("TestEvent"); + props.SetProperty("strProp", "value"); + props.SetProperty("intProp", (int64_t)42); + props.SetProperty("dblProp", 3.14); + props.SetProperty("boolProp", true); + check(props.GetName() == "TestEvent", "Event name matches"); + check(true, "SetProperty for string, int, double, bool"); + } + + // 4. Multiple event types + { + std::vector names = {"App.Started", "App.PageView", "App.Error"}; + for (const auto& name : names) { + EventProperties ep(name); + ep.SetProperty("timestamp", (int64_t)1234567890); + } + check(true, "Created multiple event types"); + } + + // 5. PII annotations + { + EventProperties props("PiiTest"); + props.SetProperty("userId", "user@example.com", PiiKind_Identity); + props.SetProperty("ip", "127.0.0.1", PiiKind_IPv4Address); + check(true, "PII-annotated properties compile and link"); + } + + // 6. Event priority + { + EventProperties props("PriorityTest"); + props.SetPriority(EventPriority_High); + check(true, "SetPriority compiles and links"); + } + + printf("\n=== Results: %d/%d passed ===\n", pass_count, test_count); + return (pass_count == test_count) ? 0 : 1; +} diff --git a/tests/vcpkg/test-vcpkg-android.sh b/tests/vcpkg/test-vcpkg-android.sh new file mode 100755 index 000000000..6d57c232c --- /dev/null +++ b/tests/vcpkg/test-vcpkg-android.sh @@ -0,0 +1,99 @@ +#!/bin/bash +# Test script: Verify mstelemetry vcpkg port for Android (cross-compile only) +# Usage: ./tests/vcpkg/test-vcpkg-android.sh [ABI] +# ABI: arm64-v8a (default), armeabi-v7a, x86_64, x86 +# Prerequisites: VCPKG_ROOT set, ANDROID_NDK_HOME set, cmake +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" +OVERLAY_PORTS="${REPO_ROOT}/tools/ports" + +# Android ABI (default: arm64-v8a) +ANDROID_ABI="${1:-arm64-v8a}" + +# Map ABI to vcpkg triplet +case "${ANDROID_ABI}" in + arm64-v8a) TRIPLET="arm64-android" ;; + armeabi-v7a) TRIPLET="arm-neon-android" ;; + x86_64) TRIPLET="x64-android" ;; + x86) TRIPLET="x86-android" ;; + *) + echo "ERROR: Unsupported ABI '${ANDROID_ABI}'. Use: arm64-v8a, armeabi-v7a, x86_64, x86" + exit 1 + ;; +esac + +BUILD_DIR="${SCRIPT_DIR}/build-android-${ANDROID_ABI}" + +echo "=== MSTelemetry vcpkg port test (Android cross-compile) ===" +echo "Repository root: ${REPO_ROOT}" +echo "ABI: ${ANDROID_ABI}" +echo "Triplet: ${TRIPLET}" + +# Check prerequisites +if [ -z "${VCPKG_ROOT}" ]; then + echo "ERROR: VCPKG_ROOT is not set. Please set it to your vcpkg installation directory." + exit 1 +fi + +VCPKG_TOOLCHAIN="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" +if [ ! -f "${VCPKG_TOOLCHAIN}" ]; then + echo "ERROR: vcpkg toolchain not found at ${VCPKG_TOOLCHAIN}" + exit 1 +fi + +# Find NDK +if [ -z "${ANDROID_NDK_HOME}" ]; then + # Try common locations + if [ -n "${ANDROID_HOME}" ] && [ -d "${ANDROID_HOME}/ndk" ]; then + ANDROID_NDK_HOME=$(ls -d "${ANDROID_HOME}/ndk/"* 2>/dev/null | sort -t. -k1,1n -k2,2n -k3,3n | tail -1) + elif [ -n "${ANDROID_SDK_ROOT}" ] && [ -d "${ANDROID_SDK_ROOT}/ndk" ]; then + ANDROID_NDK_HOME=$(ls -d "${ANDROID_SDK_ROOT}/ndk/"* 2>/dev/null | sort -t. -k1,1n -k2,2n -k3,3n | tail -1) + fi +fi + +if [ -z "${ANDROID_NDK_HOME}" ] || [ ! -d "${ANDROID_NDK_HOME}" ]; then + echo "ERROR: Android NDK not found. Set ANDROID_NDK_HOME to your NDK path." + echo " e.g., export ANDROID_NDK_HOME=\$ANDROID_HOME/ndk/26.1.10909125" + exit 1 +fi +echo "NDK: ${ANDROID_NDK_HOME}" + +# Clean previous build +rm -rf "${BUILD_DIR}" +mkdir -p "${BUILD_DIR}" + +echo "" +echo "--- Step 1: Configure (vcpkg installs deps automatically) ---" +cmake -S "${SCRIPT_DIR}" -B "${BUILD_DIR}/consumer" \ + -DCMAKE_TOOLCHAIN_FILE="${VCPKG_TOOLCHAIN}" \ + -DVCPKG_TARGET_TRIPLET="${TRIPLET}" \ + -DVCPKG_OVERLAY_PORTS="${OVERLAY_PORTS}" \ + -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" \ + -DANDROID_ABI="${ANDROID_ABI}" \ + -DANDROID_PLATFORM=android-24 \ + -DCMAKE_BUILD_TYPE=Release + +echo "" +echo "--- Step 2: Build test consumer for Android ---" +cmake --build "${BUILD_DIR}/consumer" --config Release + +echo "" +echo "--- Step 3: Verify output ---" +BINARY=$(find "${BUILD_DIR}/consumer" -name "vcpkg_test" -type f 2>/dev/null | head -1) +if [ -n "${BINARY}" ]; then + echo "[PASS] Android binary produced: ${BINARY}" + file "${BINARY}" + echo "" + echo "NOTE: Cross-compiled binary cannot be executed on the host." + echo " Deploy to device or emulator via adb for runtime verification:" + echo " adb push ${BINARY} /data/local/tmp/" + echo " adb shell /data/local/tmp/vcpkg_test" +else + echo "[FAIL] Android binary not found" + exit 1 +fi + +echo "" +echo "=== Android vcpkg port cross-compile test PASSED ===" diff --git a/tests/vcpkg/test-vcpkg-ios.sh b/tests/vcpkg/test-vcpkg-ios.sh new file mode 100755 index 000000000..37f5391f2 --- /dev/null +++ b/tests/vcpkg/test-vcpkg-ios.sh @@ -0,0 +1,153 @@ +#!/bin/bash +# Test script: Verify mstelemetry vcpkg port for iOS +# Usage: ./tests/vcpkg/test-vcpkg-ios.sh [--simulator] +# Prerequisites: VCPKG_ROOT set, macOS with Xcode + iOS SDK, cmake +# +# By default builds for arm64-ios (device). With --simulator, builds for +# the iOS Simulator and runs the binary via xcrun simctl. +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" +OVERLAY_PORTS="${REPO_ROOT}/tools/ports" +USE_SIMULATOR=false + +for arg in "$@"; do + case "$arg" in + --simulator) USE_SIMULATOR=true ;; + *) echo "Unknown option: $arg"; exit 1 ;; + esac +done + +if [ "${USE_SIMULATOR}" = true ]; then + TRIPLET="arm64-ios-simulator" + BUILD_DIR="${SCRIPT_DIR}/build-iossim" + APPLE_SDK="iphonesimulator" + echo "=== MSTelemetry vcpkg port test (iOS Simulator) ===" +else + TRIPLET="arm64-ios" + BUILD_DIR="${SCRIPT_DIR}/build-ios" + APPLE_SDK="iphoneos" + echo "=== MSTelemetry vcpkg port test (iOS device cross-compile) ===" +fi + +echo "Repository root: ${REPO_ROOT}" + +# Check prerequisites +if [ -z "${VCPKG_ROOT}" ]; then + echo "ERROR: VCPKG_ROOT is not set. Please set it to your vcpkg installation directory." + exit 1 +fi + +if [ "$(uname)" != "Darwin" ]; then + echo "ERROR: iOS builds require macOS with Xcode installed." + exit 1 +fi + +if ! command -v python3 &> /dev/null; then + echo "ERROR: python3 is required for simulator device detection but was not found." + exit 1 +fi + +# Verify Xcode SDK +if [ "${USE_SIMULATOR}" = true ]; then + xcrun --sdk iphonesimulator --show-sdk-path > /dev/null 2>&1 || { + echo "ERROR: iOS Simulator SDK not found. Install Xcode and iOS Simulator runtime." + exit 1 + } +else + xcrun --sdk iphoneos --show-sdk-path > /dev/null 2>&1 || { + echo "ERROR: iOS SDK not found. Install Xcode and iOS SDK." + exit 1 + } +fi + +VCPKG_TOOLCHAIN="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" +if [ ! -f "${VCPKG_TOOLCHAIN}" ]; then + echo "ERROR: vcpkg toolchain not found at ${VCPKG_TOOLCHAIN}" + exit 1 +fi + +echo "Triplet: ${TRIPLET}" +echo "Apple SDK: ${APPLE_SDK}" + +# Clean previous build +rm -rf "${BUILD_DIR}" +mkdir -p "${BUILD_DIR}" + +echo "" +echo "--- Step 1: Configure (vcpkg installs deps automatically) ---" +cmake -S "${SCRIPT_DIR}" -B "${BUILD_DIR}/consumer" \ + -DCMAKE_TOOLCHAIN_FILE="${VCPKG_TOOLCHAIN}" \ + -DVCPKG_TARGET_TRIPLET="${TRIPLET}" \ + -DVCPKG_OVERLAY_PORTS="${OVERLAY_PORTS}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SYSTEM_NAME=iOS \ + -DCMAKE_OSX_SYSROOT="${APPLE_SDK}" \ + -DCMAKE_OSX_ARCHITECTURES=arm64 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 + +echo "" +echo "--- Step 2: Build test consumer for iOS ---" +cmake --build "${BUILD_DIR}/consumer" --config Release + +echo "" +echo "--- Step 3: Verify output ---" +BINARY=$(find "${BUILD_DIR}/consumer" -name "vcpkg_test" -type f 2>/dev/null | head -1) +if [ -z "${BINARY}" ]; then + echo "[FAIL] iOS binary not found" + exit 1 +fi + +echo "[PASS] iOS binary produced: ${BINARY}" +file "${BINARY}" + +if [ "${USE_SIMULATOR}" = true ]; then + echo "" + echo "--- Step 4: Run on iOS Simulator ---" + + # Find an available iPhone simulator + DEVICE_UDID=$(xcrun simctl list devices available -j \ + | python3 -c " +import sys, json +data = json.load(sys.stdin)['devices'] +for runtime, devices in data.items(): + if 'iOS' not in runtime: + continue + for d in devices: + if d.get('isAvailable') and 'iPhone' in d.get('name', ''): + print(d['udid']) + sys.exit(0) +print('') +") + + if [ -z "${DEVICE_UDID}" ]; then + echo "ERROR: No available iPhone simulator found." + echo "Create one with: xcrun simctl create 'Test iPhone' 'iPhone 15'" + exit 1 + fi + + echo "Using simulator: ${DEVICE_UDID}" + + # Boot the simulator (ignore error if already booted) + xcrun simctl boot "${DEVICE_UDID}" 2>/dev/null || true + + # Run the test binary on the simulator + echo "Executing vcpkg_test on simulator..." + xcrun simctl spawn "${DEVICE_UDID}" "${BINARY}" + EXIT_CODE=$? + + if [ ${EXIT_CODE} -eq 0 ]; then + echo "[PASS] iOS Simulator execution succeeded" + else + echo "[FAIL] iOS Simulator execution failed with exit code ${EXIT_CODE}" + exit 1 + fi +else + echo "" + echo "NOTE: Device binary cannot run on macOS host." + echo " Use --simulator to build and run on the iOS Simulator." +fi + +echo "" +echo "=== iOS vcpkg port test PASSED ===" diff --git a/tests/vcpkg/test-vcpkg-linux.sh b/tests/vcpkg/test-vcpkg-linux.sh new file mode 100755 index 000000000..205430ffa --- /dev/null +++ b/tests/vcpkg/test-vcpkg-linux.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Test script: Verify mstelemetry vcpkg port on Linux +# Usage: ./tests/vcpkg/test-vcpkg-linux.sh +# Prerequisites: VCPKG_ROOT set, gcc/g++, cmake +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" +BUILD_DIR="${SCRIPT_DIR}/build-linux" +OVERLAY_PORTS="${REPO_ROOT}/tools/ports" + +echo "=== MSTelemetry vcpkg port test (Linux) ===" +echo "Repository root: ${REPO_ROOT}" + +# Check prerequisites +if [ -z "${VCPKG_ROOT}" ]; then + echo "ERROR: VCPKG_ROOT is not set. Please set it to your vcpkg installation directory." + exit 1 +fi + +VCPKG_TOOLCHAIN="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" +if [ ! -f "${VCPKG_TOOLCHAIN}" ]; then + echo "ERROR: vcpkg toolchain not found at ${VCPKG_TOOLCHAIN}" + exit 1 +fi + +LINUX_ARCH="$(uname -m)" +if [ "${LINUX_ARCH}" = "aarch64" ]; then + TRIPLET="arm64-linux" +else + TRIPLET="x64-linux" +fi + +echo "Architecture: ${LINUX_ARCH}" +echo "Triplet: ${TRIPLET}" + +# Clean previous build +rm -rf "${BUILD_DIR}" +mkdir -p "${BUILD_DIR}" + +echo "" +echo "--- Step 1: Configure (vcpkg installs deps automatically) ---" +cmake -S "${SCRIPT_DIR}" -B "${BUILD_DIR}/consumer" \ + -DCMAKE_TOOLCHAIN_FILE="${VCPKG_TOOLCHAIN}" \ + -DVCPKG_TARGET_TRIPLET="${TRIPLET}" \ + -DVCPKG_OVERLAY_PORTS="${OVERLAY_PORTS}" \ + -DCMAKE_BUILD_TYPE=Release + +echo "" +echo "--- Step 2: Build test consumer ---" +cmake --build "${BUILD_DIR}/consumer" --config Release + +echo "" +echo "--- Step 3: Run test ---" +"${BUILD_DIR}/consumer/vcpkg_test" + +echo "" +echo "=== Linux vcpkg port test PASSED ===" diff --git a/tests/vcpkg/test-vcpkg-macos.sh b/tests/vcpkg/test-vcpkg-macos.sh new file mode 100755 index 000000000..8d9c83e9a --- /dev/null +++ b/tests/vcpkg/test-vcpkg-macos.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# Test script: Verify mstelemetry vcpkg port on macOS +# Usage: ./tests/vcpkg/test-vcpkg-macos.sh +# Prerequisites: VCPKG_ROOT set, Xcode command line tools, cmake +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" +BUILD_DIR="${SCRIPT_DIR}/build-macos" +OVERLAY_PORTS="${REPO_ROOT}/tools/ports" + +echo "=== MSTelemetry vcpkg port test (macOS) ===" +echo "Repository root: ${REPO_ROOT}" + +# Check prerequisites +if [ -z "${VCPKG_ROOT}" ]; then + echo "ERROR: VCPKG_ROOT is not set. Please set it to your vcpkg installation directory." + exit 1 +fi + +if [ "$(uname)" != "Darwin" ]; then + echo "ERROR: This script must be run on macOS." + exit 1 +fi + +VCPKG_TOOLCHAIN="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" +if [ ! -f "${VCPKG_TOOLCHAIN}" ]; then + echo "ERROR: vcpkg toolchain not found at ${VCPKG_TOOLCHAIN}" + exit 1 +fi +MAC_ARCH="$(uname -m)" + +if [ "${MAC_ARCH}" = "arm64" ]; then + TRIPLET="arm64-osx" +else + TRIPLET="x64-osx" +fi + +echo "Architecture: ${MAC_ARCH}" +echo "Triplet: ${TRIPLET}" + +# Clean previous build +rm -rf "${BUILD_DIR}" +mkdir -p "${BUILD_DIR}" + +echo "" +echo "--- Step 1: Configure (vcpkg installs deps automatically) ---" +cmake -S "${SCRIPT_DIR}" -B "${BUILD_DIR}/consumer" \ + -DCMAKE_TOOLCHAIN_FILE="${VCPKG_TOOLCHAIN}" \ + -DVCPKG_TARGET_TRIPLET="${TRIPLET}" \ + -DVCPKG_OVERLAY_PORTS="${OVERLAY_PORTS}" \ + -DCMAKE_BUILD_TYPE=Release + +echo "" +echo "--- Step 2: Build test consumer ---" +cmake --build "${BUILD_DIR}/consumer" --config Release + +echo "" +echo "--- Step 3: Run test ---" +"${BUILD_DIR}/consumer/vcpkg_test" + +echo "" +echo "=== macOS vcpkg port test PASSED ===" diff --git a/tests/vcpkg/test-vcpkg-windows.ps1 b/tests/vcpkg/test-vcpkg-windows.ps1 new file mode 100644 index 000000000..70caaa828 --- /dev/null +++ b/tests/vcpkg/test-vcpkg-windows.ps1 @@ -0,0 +1,128 @@ +# Test script: Verify mstelemetry vcpkg port on Windows +# Usage: Run from a VS Developer Command Prompt, or the script will find VS automatically. +# .\tests\vcpkg\test-vcpkg-windows.ps1 +# .\tests\vcpkg\test-vcpkg-windows.ps1 -Triplet x64-windows +param( + [string]$VcpkgRoot = "", + [string]$Triplet = "" +) + +$ErrorActionPreference = "Stop" + +$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path +$RepoRoot = (Resolve-Path (Join-Path $ScriptDir "..\..")).Path +$BuildDir = Join-Path $ScriptDir "build-windows" +$OverlayPorts = Join-Path $RepoRoot "tools\ports" + +Write-Host "=== MSTelemetry vcpkg port test (Windows) ===" -ForegroundColor Cyan + +# Resolve vcpkg root: parameter > VCPKG_ROOT env var > error +if ([string]::IsNullOrEmpty($VcpkgRoot)) { + $VcpkgRoot = $env:VCPKG_ROOT +} +if ([string]::IsNullOrEmpty($VcpkgRoot)) { + Write-Error "VCPKG_ROOT is not set. Pass -VcpkgRoot or set the VCPKG_ROOT environment variable." + exit 1 +} + +$VcpkgToolchain = Join-Path $VcpkgRoot "scripts\buildsystems\vcpkg.cmake" +if (-not (Test-Path $VcpkgToolchain)) { + Write-Error "vcpkg toolchain not found at $VcpkgToolchain" + exit 1 +} + +# PROCESSOR_ARCHITEW6432 reports the native arch even under x64 emulation on ARM64 +$NativeArch = if ($env:PROCESSOR_ARCHITEW6432) { $env:PROCESSOR_ARCHITEW6432 } else { $env:PROCESSOR_ARCHITECTURE } + +# Auto-detect triplet from host architecture if not specified +if ([string]::IsNullOrEmpty($Triplet)) { + if ($NativeArch -eq "ARM64") { + $Triplet = "arm64-windows-static" + } else { + $Triplet = "x64-windows-static" + } +} + +# Map triplet to vcvarsall architecture +$VcvarsArch = switch -Regex ($Triplet) { + "^arm64-" { if ($NativeArch -eq "ARM64") { "arm64" } else { "amd64_arm64" } } + "^x86-" { "x86" } + default { "x64" } +} + +Write-Host "Repository root: $RepoRoot" +Write-Host "vcpkg root: $VcpkgRoot" +Write-Host "Triplet: $Triplet" + +# Clean previous build +if (Test-Path $BuildDir) { + Remove-Item -Recurse -Force $BuildDir +} +New-Item -ItemType Directory -Path $BuildDir -Force | Out-Null + +# Build cmake args as an array (avoids backtick continuation issues) +$ConsumerBuild = Join-Path $BuildDir "consumer" +$CmakeArgs = @( + "-S", $ScriptDir, + "-B", $ConsumerBuild, + "-DCMAKE_TOOLCHAIN_FILE=$VcpkgToolchain", + "-DVCPKG_TARGET_TRIPLET=$Triplet", + "-DVCPKG_OVERLAY_PORTS=$OverlayPorts", + "-DCMAKE_BUILD_TYPE=Release" +) + +# Detect whether cl.exe is on PATH (i.e., running from VS Developer Command Prompt) +$clExe = Get-Command cl.exe -ErrorAction SilentlyContinue +if (-not $clExe) { + Write-Host "cl.exe not on PATH. Finding VS with vswhere..." + $vswherePath = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path $vswherePath)) { + $vswherePath = (Get-Command vswhere.exe -ErrorAction SilentlyContinue).Source + } + if (-not $vswherePath) { + Write-Error "vswhere.exe not found. Install Visual Studio or run from a VS Developer Command Prompt." + exit 1 + } + $vsInstall = & $vswherePath -latest -property installationPath + if (-not $vsInstall) { + Write-Error "Visual Studio not found. Run from a VS Developer Command Prompt." + exit 1 + } + $vcvarsall = Join-Path $vsInstall "VC\Auxiliary\Build\vcvarsall.bat" + Write-Host "Initializing VS environment from: $vcvarsall" + + # Build and run everything in a single cmd /c call + $cmakeArgStr = $CmakeArgs -join " " + $cmdLine = "`"$vcvarsall`" $VcvarsArch && cmake $cmakeArgStr -G `"NMake Makefiles`" && cmake --build `"$ConsumerBuild`" --config Release" + cmd /c $cmdLine + if ($LASTEXITCODE -ne 0) { Write-Error "Build failed"; exit 1 } +} else { + Write-Host "Using cl.exe from: $($clExe.Source)" + + Write-Host "" + Write-Host "--- Step 1: Configure (vcpkg installs deps automatically) ---" -ForegroundColor Yellow + cmake @CmakeArgs -G "NMake Makefiles" + if ($LASTEXITCODE -ne 0) { Write-Error "CMake configure failed"; exit 1 } + + Write-Host "" + Write-Host "--- Step 2: Build test consumer ---" -ForegroundColor Yellow + cmake --build $ConsumerBuild --config Release + if ($LASTEXITCODE -ne 0) { Write-Error "Build failed"; exit 1 } +} + +Write-Host "" +Write-Host "--- Step 3: Run test ---" -ForegroundColor Yellow +$TestExe = Get-ChildItem -Path $ConsumerBuild -Recurse -Filter "vcpkg_test.exe" | Select-Object -First 1 +if ($null -eq $TestExe) { + Write-Error "Test executable not found" + exit 1 +} + +& $TestExe.FullName +if ($LASTEXITCODE -ne 0) { + Write-Error "Test execution failed" + exit 1 +} + +Write-Host "" +Write-Host "=== Windows vcpkg port test PASSED ===" -ForegroundColor Green diff --git a/tests/vcpkg/vcpkg.json b/tests/vcpkg/vcpkg.json new file mode 100644 index 000000000..ae83db603 --- /dev/null +++ b/tests/vcpkg/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "mstelemetry-vcpkg-test", + "version-string": "0.0.1", + "description": "Integration test for mstelemetry vcpkg port", + "dependencies": [ + "mstelemetry" + ] +} diff --git a/tools/ports/mstelemetry/CONTROL b/tools/ports/mstelemetry/CONTROL deleted file mode 100644 index 54f2489b6..000000000 --- a/tools/ports/mstelemetry/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mstelemetry -Version: 3.4.999 -Homepage: https://github.com/microsoft/cpp_client_telemetry -Description: Microsoft C/C++ Client Telemetry Library (1DS C++ SDK) diff --git a/tools/ports/mstelemetry/TODO.md b/tools/ports/mstelemetry/TODO.md deleted file mode 100644 index 36ddfd11a..000000000 --- a/tools/ports/mstelemetry/TODO.md +++ /dev/null @@ -1,9 +0,0 @@ -# TODO - -- Consider adding the following line to portfile.cmake - -``` -Build-Depends: curl[ssl], nlohmann-json, sqlite3 -``` - -- Consider using Google Test and Google Benchmark from vcpkg diff --git a/tools/ports/mstelemetry/get_repo_name.sh b/tools/ports/mstelemetry/get_repo_name.sh deleted file mode 100755 index e98b382ba..000000000 --- a/tools/ports/mstelemetry/get_repo_name.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -pushd $DIR/../../ > /dev/null -basename -s .git `git config --get remote.origin.url` -popd > /dev/null diff --git a/tools/ports/mstelemetry/portfile.cmake b/tools/ports/mstelemetry/portfile.cmake index 7a9fba689..27f690f9f 100644 --- a/tools/ports/mstelemetry/portfile.cmake +++ b/tools/ports/mstelemetry/portfile.cmake @@ -1,83 +1,53 @@ -include(vcpkg_common_functions) - -message("CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}") -message("CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}") -message("CMAKE_CURRENT_LIST_DIR=${CMAKE_CURRENT_LIST_DIR}") - -if (UNIX) - execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/get_repo_name.sh" OUTPUT_VARIABLE REPO_NAME ERROR_QUIET) -else() - # execute_process(COMMAND git config --get remote.origin.url OUTPUT_VARIABLE REPO_URL ERROR_QUIET) - # message("REPO_URL=${REPO_URL}") - # string(REPLACE "/" ";" REPO_URL_LIST ${REPO_URL}) - # message(REPO_URL_LIST "list = ${REPO_URL_LIST}") - # list(LENGTH ${REPO_URL_LIST} LAST_ITEM) - # list(GET ${REPO_URL_LIST} ${LAST_ITEM} REPO_NAME) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/cpp_client_telemetry + REF a20abe010a075fdcb9a8804048a7827d34fd040d + SHA512 d5f45e6aab5d295ad3ad665b7e850a760c4d2419c06e7fe302b97e35c0c737794aaa920d6fa95c9c81546c7d38d00624a178920d672e1970b5534f39d0c5e490 + HEAD_REF main +) + +# Determine if Apple HTTP should be used (no curl needed). +# Note: BUILD_APPLE_HTTP must remain ON for macOS/iOS — the vcpkg.json +# curl dependency is excluded on these platforms. +set(MATSDK_BUILD_APPLE_HTTP OFF) +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + set(MATSDK_BUILD_APPLE_HTTP ON) endif() -message("REPO_NAME=${REPO_NAME}") - -if (DEFINED REPO_NAME) - # Use local snapshot since we already cloned the code - get_filename_component(SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) - message("Using local source snapshot from ${SOURCE_PATH}") -else() - # Fetch from GitHub main - message("Fetching source code from GitHub...") - if (UNIX) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO microsoft/cpp_client_telemetry - HEAD_REF main - ) - else() - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO microsoft/cpp_client_telemetry - REF 4f60dd3bca305c2c0dd5ec2ed7b91d36b4de6dcf - SHA512 9778df5aa65d95fe1d41739753495d29b3149676e98ac2e802a103604553f4f2b43bc2eb089c2e13dc695f70279287ea79ec6e2926fad03befe8a671f91d36fb - HEAD_REF main - PATCHES ${CMAKE_CURRENT_LIST_DIR}/v142-build.patch - ) - endif() +# iOS build options +set(MATSDK_BUILD_IOS OFF) +if(VCPKG_TARGET_IS_IOS) + set(MATSDK_BUILD_IOS ON) endif() -# TODO: it will be slightly cleaner to perform pure CMake or Ninja build, by describing all possible variable options -# as separate triplets. Since we have a fairly non-trivial build logic in build.sh script - we use it as-is for now. -# build.sh itself should check if we are building under vcpkg and avoid installing deps that are coming from vcpkg. -if (UNIX) - vcpkg_execute_build_process( - COMMAND ${SOURCE_PATH}/build.sh noroot - WORKING_DIRECTORY ${SOURCE_PATH}/ - LOGNAME build - ) - - vcpkg_execute_build_process( - COMMAND ${SOURCE_PATH}/install.sh ${CURRENT_PACKAGES_DIR} - WORKING_DIRECTORY ${SOURCE_PATH}/ - LOGNAME install - ) - - file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -else() - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - - vcpkg_install_msbuild( - SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH Solutions/MSTelemetrySDK.sln - LICENSE_SUBPATH LICENSE - RELEASE_CONFIGURATION Release - DEBUG_CONFIGURATION Debug - OPTIONS /p:MATSDK_SHARED_LIB=1 - PLATFORM ${VCPKG_TARGET_ARCHITECTURE} - PLATFORM_TOOLSET v142 - TARGET sqlite:Rebuild,win32-lib:Rebuild - USE_VCPKG_INTEGRATION - ) - - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") - file(COPY "${SOURCE_PATH}/lib/include/public" DESTINATION "${CURRENT_PACKAGES_DIR}") - file(RENAME "${CURRENT_PACKAGES_DIR}/public" "${CURRENT_PACKAGES_DIR}/include") - file(COPY "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") - file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "Refer to LICENSE file") -endif() +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DMATSDK_USE_VCPKG_DEPS=ON + -DBUILD_HEADERS=ON + -DBUILD_LIBRARY=ON + -DBUILD_TEST_TOOL=OFF + -DBUILD_UNIT_TESTS=OFF + -DBUILD_FUNC_TESTS=OFF + -DBUILD_JNI_WRAPPER=OFF + -DBUILD_OBJC_WRAPPER=OFF + -DBUILD_SWIFT_WRAPPER=OFF + -DBUILD_PACKAGE=OFF + -DBUILD_VERSION=${VERSION} + -DBUILD_APPLE_HTTP=${MATSDK_BUILD_APPLE_HTTP} + -DBUILD_IOS=${MATSDK_BUILD_IOS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME MSTelemetry CONFIG_PATH lib/cmake/MSTelemetry) + +# Remove duplicate headers and empty dirs +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Install usage instructions +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +# Install license +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/tools/ports/mstelemetry/response_file_linux.txt b/tools/ports/mstelemetry/response_file_linux.txt deleted file mode 100644 index ee7642068..000000000 --- a/tools/ports/mstelemetry/response_file_linux.txt +++ /dev/null @@ -1,6 +0,0 @@ ---head ---overlay-ports=tools/ports -mstelemetry -sqlite3 -zlib -nlohmann-json diff --git a/tools/ports/mstelemetry/response_file_mac.txt b/tools/ports/mstelemetry/response_file_mac.txt deleted file mode 100644 index ee7642068..000000000 --- a/tools/ports/mstelemetry/response_file_mac.txt +++ /dev/null @@ -1,6 +0,0 @@ ---head ---overlay-ports=tools/ports -mstelemetry -sqlite3 -zlib -nlohmann-json diff --git a/tools/ports/mstelemetry/usage b/tools/ports/mstelemetry/usage new file mode 100644 index 000000000..4c94e773f --- /dev/null +++ b/tools/ports/mstelemetry/usage @@ -0,0 +1,4 @@ +mstelemetry provides CMake targets: + + find_package(MSTelemetry CONFIG REQUIRED) + target_link_libraries(main PRIVATE MSTelemetry::mat) diff --git a/tools/ports/mstelemetry/v142-build.patch b/tools/ports/mstelemetry/v142-build.patch deleted file mode 100644 index 814418819..000000000 --- a/tools/ports/mstelemetry/v142-build.patch +++ /dev/null @@ -1,5701 +0,0 @@ -diff --git a/Solutions/MSTelemetrySDK.sln b/Solutions/MSTelemetrySDK.sln -index 904f20a9..a6bc3ece 100644 ---- a/Solutions/MSTelemetrySDK.sln -+++ b/Solutions/MSTelemetrySDK.sln -@@ -1,6 +1,6 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 --# Visual Studio 15 --VisualStudioVersion = 15.0.28307.645 -+# Visual Studio Version 16 -+VisualStudioVersion = 16.0.31105.61 - MinimumVisualStudioVersion = 10.0.40219.1 - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite", "..\sqlite\sqlite.vcxproj", "{2EBC7B3C-2AF1-442C-9285-CAB39BBB8C00}" - EndProject -@@ -38,39 +38,6 @@ EndProject - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "managed", "..\lib\shared\Shared.vcxitems", "{EF859326-2A11-481C-AE8C-03D754F1C412}" - EndProject - Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "include", "include", "{553836FF-B1FD-4B70-AC81-AEC7752F9284}" -- ProjectSection(SolutionItems) = preProject -- ..\lib\include\public\AggregatedMetric.hpp = ..\lib\include\public\AggregatedMetric.hpp -- ..\lib\include\public\CommonFields.h = ..\lib\include\public\CommonFields.h -- ..\lib\include\public\CsProtocol_types.hpp = ..\lib\include\public\CsProtocol_types.hpp -- ..\lib\include\public\ctmacros.hpp = ..\lib\include\public\ctmacros.hpp -- ..\lib\include\public\DebugEvents.hpp = ..\lib\include\public\DebugEvents.hpp -- ..\lib\include\public\Enums.hpp = ..\lib\include\public\Enums.hpp -- ..\lib\include\public\EventProperties.hpp = ..\lib\include\public\EventProperties.hpp -- ..\lib\include\public\EventProperty.hpp = ..\lib\include\public\EventProperty.hpp -- ..\lib\include\public\IAFDClient.hpp = ..\lib\include\public\IAFDClient.hpp -- ..\lib\include\public\ICdsFactory.hpp = ..\lib\include\public\ICdsFactory.hpp -- ..\lib\include\public\IDataInspector.hpp = ..\lib\include\public\IDataInspector.hpp -- ..\lib\include\public\IDataViewer.hpp = ..\lib\include\public\IDataViewer.hpp -- ..\lib\include\public\IDataViewerCollection.hpp = ..\lib\include\public\IDataViewerCollection.hpp -- ..\lib\include\public\IDecorator.hpp = ..\lib\include\public\IDecorator.hpp -- ..\lib\include\public\IECSClient.hpp = ..\lib\include\public\IECSClient.hpp -- ..\lib\include\public\IEventFilter.hpp = ..\lib\include\public\IEventFilter.hpp -- ..\lib\include\public\IEventFilterCollection.hpp = ..\lib\include\public\IEventFilterCollection.hpp -- ..\lib\include\public\IHttpClient.hpp = ..\lib\include\public\IHttpClient.hpp -- ..\lib\include\public\ILogConfiguration.hpp = ..\lib\include\public\ILogConfiguration.hpp -- ..\lib\include\public\ILogger.hpp = ..\lib\include\public\ILogger.hpp -- ..\lib\include\public\ILogManager.hpp = ..\lib\include\public\ILogManager.hpp -- ..\lib\include\public\IModule.hpp = ..\lib\include\public\IModule.hpp -- ..\lib\include\public\IOfflineStorage.hpp = ..\lib\include\public\IOfflineStorage.hpp -- ..\lib\include\public\ISemanticContext.hpp = ..\lib\include\public\ISemanticContext.hpp -- ..\lib\include\public\ITaskDispatcher.hpp = ..\lib\include\public\ITaskDispatcher.hpp -- ..\lib\include\public\LogManager.hpp = ..\lib\include\public\LogManager.hpp -- ..\lib\include\public\LogSessionData.hpp = ..\lib\include\public\LogSessionData.hpp -- ..\lib\include\public\mat.h = ..\lib\include\public\mat.h -- ..\lib\include\public\PayloadDecoder.hpp = ..\lib\include\public\PayloadDecoder.hpp -- ..\lib\include\public\Version.hpp = ..\lib\include\public\Version.hpp -- ..\lib\include\public\Version.hpp.template = ..\lib\include\public\Version.hpp.template -- EndProjectSection - EndProject - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32-lib", "win32-lib\win32-lib.vcxproj", "{1DC6B38A-B390-34CE-907F-4958807A3D42}" - EndProject -@@ -164,42 +131,19 @@ Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\lib\pal\universal\universal.vcxitems*{10e9165b-49d1-4d1c-8248-334b9905b9cc}*SharedItemsImports = 9 - ..\lib\pal\desktop\desktop.vcxitems*{10e9165b-49d1-4d1c-8248-334b9905b9cd}*SharedItemsImports = 9 -- ..\lib\modules\azmon\azmon.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 -- ..\lib\modules\cds\cds.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 -- ..\lib\modules\dataviewer\dataviewer.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 -- ..\lib\modules\exp\exp.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 -- ..\lib\modules\filter\filter.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 -- ..\lib\modules\privacyguard\privacyguard.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 - ..\lib\pal\desktop\desktop.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d42}*SharedItemsImports = 4 - ..\lib\pal\desktop\desktop.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d43}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{1dc6b38a-b390-34ce-907f-4958807a3d43}*SharedItemsImports = 4 - ..\lib\modules\dataviewer\dataviewer.vcxitems*{20ad4f2b-3f98-4baf-8144-e1e7682a7927}*SharedItemsImports = 9 -- ..\lib\modules\azmon\azmon.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 -- ..\lib\modules\cds\cds.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 -- ..\lib\modules\dataviewer\dataviewer.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 -- ..\lib\modules\exp\exp.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 -- ..\lib\modules\filter\filter.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 -- ..\lib\modules\privacyguard\privacyguard.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 - ..\lib\pal\desktop\desktop.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c32}*SharedItemsImports = 4 - ..\lib\pal\desktop\desktop.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c33}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{216a8e97-21f7-4bef-9e52-7f772c177c33}*SharedItemsImports = 4 - ..\lib\modules\exp\exp.vcxitems*{2bfafe9a-45b0-4c02-841e-03e47fd2e340}*SharedItemsImports = 9 -- ..\lib\modules\azmon\azmon.vcxitems*{434c594f-cde0-3690-ac0a-9ed854b74092}*SharedItemsImports = 4 -- ..\lib\modules\cds\cds.vcxitems*{434c594f-cde0-3690-ac0a-9ed854b74092}*SharedItemsImports = 4 -- ..\lib\modules\dataviewer\dataviewer.vcxitems*{434c594f-cde0-3690-ac0a-9ed854b74092}*SharedItemsImports = 4 -- ..\lib\modules\filter\filter.vcxitems*{434c594f-cde0-3690-ac0a-9ed854b74092}*SharedItemsImports = 4 -- ..\lib\modules\privacyguard\privacyguard.vcxitems*{434c594f-cde0-3690-ac0a-9ed854b74092}*SharedItemsImports = 4 - ..\lib\pal\desktop\desktop.vcxitems*{434c594f-cde0-3690-ac0a-9ed854b74092}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{434c594f-cde0-3690-ac0a-9ed854b74092}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{45d41acc-2c3c-43d2-bc10-02aa73ffc7c7}*SharedItemsImports = 9 -- ..\lib\modules\azmon\azmon.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 -- ..\lib\modules\cds\cds.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 -- ..\lib\modules\dataviewer\dataviewer.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 -- ..\lib\modules\exp\exp.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 -- ..\lib\modules\filter\filter.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 -- ..\lib\modules\privacyguard\privacyguard.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 - ..\lib\pal\universal\universal.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 - ..\lib\shared\Shared.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{49077dbf-e363-4d2d-8334-636569a771b6}*SharedItemsImports = 4 -@@ -213,25 +157,14 @@ Global - Clienttelemetry\Clienttelemetry.vcxitems*{57a81ed9-5603-471f-afee-9656da74178d}*SharedItemsImports = 4 - ..\lib\decoder\decoder.vcxitems*{65b6880e-fc36-443d-a7a5-0e6cda6523ac}*SharedItemsImports = 9 - ..\lib\modules\azmon\azmon.vcxitems*{6dc5ab1d-3d64-4c52-8d8e-d9a8b0c16f14}*SharedItemsImports = 9 -- ..\lib\modules\azmon\azmon.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 -- ..\lib\modules\cds\cds.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 -- ..\lib\modules\dataviewer\dataviewer.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 -- ..\lib\modules\exp\exp.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 -- ..\lib\modules\filter\filter.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 -- ..\lib\modules\privacyguard\privacyguard.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 - ..\lib\pal\universal\universal.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{7a75748d-5d6b-48a5-83cb-f5f439133d59}*SharedItemsImports = 4 -- ..\lib\modules\cds\cds.vcxitems*{e1f6ca48-3bbf-4378-8d1e-6bbf4869db5b}*SharedItemsImports = 9 -- ..\lib\modules\cds\cds.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 - ..\lib\modules\filter\filter.vcxitems*{d74e42ec-c6ee-4944-b92a-eb711be002a9}*SharedItemsImports = 9 - ..\lib\shared\Shared.vcxitems*{dc91621e-a203-42df-8e03-3a23dd0602b1}*SharedItemsImports = 4 -+ ..\lib\modules\cds\cds.vcxitems*{e1f6ca48-3bbf-4378-8d1e-6bbf4869db5b}*SharedItemsImports = 9 - ..\lib\modules\privacyguard\privacyguard.vcxitems*{e1f6ca48-3bbf-4378-8d1e-6bbf4869db5b}*SharedItemsImports = 9 - ..\lib\shared\Shared.vcxitems*{ef859326-2a11-481c-ae8c-03d754f1c412}*SharedItemsImports = 9 - ..\lib\decoder\decoder.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 -- ..\lib\modules\azmon\azmon.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 -- ..\lib\modules\dataviewer\dataviewer.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 -- ..\lib\modules\filter\filter.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 -- ..\lib\modules\privacyguard\privacyguard.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 - ..\lib\pal\desktop\desktop.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 - Clienttelemetry\Clienttelemetry.vcxitems*{fe79fb3a-b3ef-38df-b7a4-11277db72b39}*SharedItemsImports = 4 - EndGlobalSection -diff --git a/Solutions/net40/net40.vcxproj b/Solutions/net40/net40.vcxproj -index 12444a52..ef11fb6c 100644 ---- a/Solutions/net40/net40.vcxproj -+++ b/Solutions/net40/net40.vcxproj -@@ -27,6 +27,7 @@ - net40 - true - true -+ 10.0 - - - -@@ -35,6 +36,7 @@ - false - Unicode - false -+ v142 - - - DynamicLibrary -@@ -42,6 +44,7 @@ - true - Unicode - false -+ v142 - - - DynamicLibrary -@@ -49,6 +52,7 @@ - Unicode - false - false -+ v142 - - - DynamicLibrary -@@ -56,6 +60,7 @@ - false - Unicode - false -+ v142 - - - -diff --git a/Solutions/win10-cs/win10-cs.vcxproj b/Solutions/win10-cs/win10-cs.vcxproj -index 147ae1e4..0a7a0ea7 100644 ---- a/Solutions/win10-cs/win10-cs.vcxproj -+++ b/Solutions/win10-cs/win10-cs.vcxproj -@@ -47,6 +47,7 @@ - 8.2 - 10.0.10240.0 - true -+ 10.0 - - - TRUE -@@ -55,38 +56,46 @@ - - DynamicLibrary - true -+ v142 - - - DynamicLibrary - true -+ v142 - - - DynamicLibrary - true -+ v142 - - - DynamicLibrary - true -+ v142 - - - DynamicLibrary - false - true -+ v142 - - - DynamicLibrary - false - true -+ v142 - - - DynamicLibrary - false - true -+ v142 - - - DynamicLibrary - false - true -+ v142 - - - -diff --git a/Solutions/win10-lib/win10-lib.vcxproj b/Solutions/win10-lib/win10-lib.vcxproj -index 30bcf573..a38778d7 100644 ---- a/Solutions/win10-lib/win10-lib.vcxproj -+++ b/Solutions/win10-lib/win10-lib.vcxproj -@@ -48,43 +48,52 @@ - 10.0 - win10-lib - true -+ 10.0 - - - - StaticLibrary - true -+ v142 - - - StaticLibrary - true -+ v142 - - - StaticLibrary - true -+ v142 - - - StaticLibrary - true -+ v142 - - - StaticLibrary - false - true -+ v142 - - - StaticLibrary - false - true -+ v142 - - - StaticLibrary - false - true -+ v142 - - - StaticLibrary - false - true -+ v142 - - - -@@ -95,7 +104,7 @@ - - - -- -+ - - - -diff --git a/Solutions/win32-dll/win32-dll.vcxproj b/Solutions/win32-dll/win32-dll.vcxproj -index 4ae04059..5df3dd01 100644 ---- a/Solutions/win32-dll/win32-dll.vcxproj -+++ b/Solutions/win32-dll/win32-dll.vcxproj -@@ -44,6 +44,7 @@ - ClientTelemetry - win32-dll - true -+ 10.0 - - - TRUE -@@ -57,36 +58,42 @@ - true - Unicode - false -+ v142 - - - DynamicLibrary - false - false - Unicode -+ v142 - - - DynamicLibrary - true - Unicode - false -+ v142 - - - DynamicLibrary - true - Unicode - false -+ v142 - - - DynamicLibrary - false - false - Unicode -+ v142 - - - DynamicLibrary - false - false - Unicode -+ v142 - - - -diff --git a/Solutions/win32-lib/win32-lib.vcxproj b/Solutions/win32-lib/win32-lib.vcxproj -index c1d9667a..6880136b 100644 ---- a/Solutions/win32-lib/win32-lib.vcxproj -+++ b/Solutions/win32-lib/win32-lib.vcxproj -@@ -57,6 +57,7 @@ - ClientTelemetry - win32-lib - true -+ 10.0 - - - OACR -@@ -67,48 +68,56 @@ - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary -@@ -116,24 +125,28 @@ - false - Unicode - win-x64_vs2015-crtdynamic-release -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - -diff --git a/Solutions/win32-mini-dll/win32-mini-dll.vcxproj b/Solutions/win32-mini-dll/win32-mini-dll.vcxproj -index 97892580..b8c5eeef 100644 ---- a/Solutions/win32-mini-dll/win32-mini-dll.vcxproj -+++ b/Solutions/win32-mini-dll/win32-mini-dll.vcxproj -@@ -44,6 +44,7 @@ - ClientTelemetry - win32-mini-dll - true -+ 10.0 - - - OACR -@@ -54,36 +55,42 @@ - true - Unicode - false -+ v142 - - - DynamicLibrary - false - false - Unicode -+ v142 - - - DynamicLibrary - true - Unicode - false -+ v142 - - - DynamicLibrary - true - Unicode - false -+ v142 - - - DynamicLibrary - false - false - Unicode -+ v142 - - - DynamicLibrary - false - false - Unicode -+ v142 - - - -diff --git a/Solutions/win32-mini-lib/win32-mini-lib.vcxproj b/Solutions/win32-mini-lib/win32-mini-lib.vcxproj -index edc2828f..6da2528e 100644 ---- a/Solutions/win32-mini-lib/win32-mini-lib.vcxproj -+++ b/Solutions/win32-mini-lib/win32-mini-lib.vcxproj -@@ -57,6 +57,7 @@ - ClientTelemetry - win32-mini-lib - true -+ 10.0 - - - OACR -@@ -67,72 +68,84 @@ - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - true - Unicode - false -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - StaticLibrary - false - false - Unicode -+ v142 - - - -diff --git a/examples/c/SampleC/SampleC.vcxproj b/examples/c/SampleC/SampleC.vcxproj -index a4901f2b..9dbc8ca4 100644 ---- a/examples/c/SampleC/SampleC.vcxproj -+++ b/examples/c/SampleC/SampleC.vcxproj -@@ -20,12 +20,14 @@ - Application - true - Unicode -+ v142 - - - Application - false - true - Unicode -+ v142 - - - -diff --git a/examples/cpp/EventSender/EventSender.vcxproj b/examples/cpp/EventSender/EventSender.vcxproj -index b55221e1..ed4d921a 100644 ---- a/examples/cpp/EventSender/EventSender.vcxproj -+++ b/examples/cpp/EventSender/EventSender.vcxproj -@@ -24,29 +24,34 @@ - {7DBFBA1F-520D-4C93-A33E-DD92FD4F9222} - Win32Proj - EventSender -+ 10.0 - - - - Application - true - Unicode -+ v142 - - - Application - false - true - Unicode -+ v142 - - - Application - true - Unicode -+ v142 - - - Application - false - true - Unicode -+ v142 - - - -diff --git a/examples/cpp/EventSender/EventSender.vcxproj.filters b/examples/cpp/EventSender/EventSender.vcxproj.filters -index f5b9ccda..edd3c98f 100644 ---- a/examples/cpp/EventSender/EventSender.vcxproj.filters -+++ b/examples/cpp/EventSender/EventSender.vcxproj.filters -@@ -1,117 +1,22 @@ -- -- -- -- -- {4FC737F1-C7A5-4376-A066-2A32D752A2FF} -- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx -- -- -- {93995380-89BD-4b04-88EB-625FBE52EBFB} -- h;hh;hpp;hxx;hm;inl;inc;ipp;xsd -- -- -- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} -- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms -- -- -- -- -- Source Files -- -- -- -- -- -- Header Files -- -- -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -- Header Files -- -- -+ -+ -+ -+ -+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} -+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx -+ -+ -+ {93995380-89BD-4b04-88EB-625FBE52EBFB} -+ h;hh;hpp;hxx;hm;inl;inc;ipp;xsd -+ -+ -+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} -+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms -+ -+ -+ -+ -+ Source Files -+ -+ - -\ No newline at end of file -diff --git a/examples/cpp/SampleCpp/SampleCpp.vcxproj b/examples/cpp/SampleCpp/SampleCpp.vcxproj -index f8154a7e..ab8b5fb6 100644 ---- a/examples/cpp/SampleCpp/SampleCpp.vcxproj -+++ b/examples/cpp/SampleCpp/SampleCpp.vcxproj -@@ -79,124 +79,124 @@ - {86AC752C-5687-4377-841E-943D9BEEF360} - Win32Proj - SampleCpp -- 10.0.17134.0 -+ 10.0 - true - - - - Application - true -- v141 -+ v142 - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - true -- v141 -+ v142 - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - - - Application - false -- v141 -+ v142 - true - Unicode - -diff --git a/examples/cpp/SampleCppLogManagers/SampleCppLogManagers.vcxproj b/examples/cpp/SampleCppLogManagers/SampleCppLogManagers.vcxproj -index be49c0cf..1466a4d8 100644 ---- a/examples/cpp/SampleCppLogManagers/SampleCppLogManagers.vcxproj -+++ b/examples/cpp/SampleCppLogManagers/SampleCppLogManagers.vcxproj -@@ -1,200 +1,200 @@ -- -- -- -- -- Debug -- Win32 -- -- -- Release -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- x64 -- -- -- -- 15.0 -- {77053F92-F003-4D1C-A489-1DEB7CFEA4EC} -- Win32Proj -- SampleCppLogManagers -- 10.0.17134.0 -- -- -- -- Application -- true -- v141 -- Unicode -- -- -- Application -- false -- v141 -- true -- Unicode -- -- -- Application -- true -- v141 -- Unicode -- -- -- Application -- false -- v141 -- true -- Unicode -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- true -- $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public;$(SolutionDir)\..\lib\pal\ -- $(ProjectDir) -- $(Configuration)\ -- $(LibraryPath) -- -- -- true -- $(ProjectDir) -- $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public;$(SolutionDir)\..\lib\pal\ -- $(LibraryPath) -- -- -- false -- $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public -- -- -- false -- $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public -- -- -- -- NotUsing -- Level3 -- Disabled -- true -- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) -- true -- pch.h -- -- -- Console -- true -- -- -- $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -- -- -- Deploy DLLs -- -- -- -- -- NotUsing -- Level3 -- Disabled -- true -- _DEBUG;_CONSOLE;%(PreprocessorDefinitions) -- true -- pch.h -- -- -- Console -- true -- -- -- $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -- -- -- Deploy DLLs -- -- -- -- -- NotUsing -- Level3 -- MaxSpeed -- true -- true -- true -- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -- true -- pch.h -- -- -- Console -- true -- true -- true -- -- -- $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -- -- -- Deploy DLLs -- -- -- -- -- NotUsing -- Level3 -- MaxSpeed -- true -- true -- true -- NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -- true -- pch.h -- -- -- Console -- true -- true -- true -- -- -- $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -- -- -- Deploy DLLs -- -- -- -- -- -- -- -- {216a8e97-21f7-4bef-9e52-7f772c177c32} -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ Debug -+ Win32 -+ -+ -+ Release -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ 15.0 -+ {77053F92-F003-4D1C-A489-1DEB7CFEA4EC} -+ Win32Proj -+ SampleCppLogManagers -+ 10.0 -+ -+ -+ -+ Application -+ true -+ v142 -+ Unicode -+ -+ -+ Application -+ false -+ v142 -+ true -+ Unicode -+ -+ -+ Application -+ true -+ v142 -+ Unicode -+ -+ -+ Application -+ false -+ v142 -+ true -+ Unicode -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ true -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public;$(SolutionDir)\..\lib\pal\ -+ $(ProjectDir) -+ $(Configuration)\ -+ $(LibraryPath) -+ -+ -+ true -+ $(ProjectDir) -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public;$(SolutionDir)\..\lib\pal\ -+ $(LibraryPath) -+ -+ -+ false -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public -+ -+ -+ false -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)\..\lib\include\public -+ -+ -+ -+ NotUsing -+ Level3 -+ Disabled -+ true -+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ true -+ pch.h -+ -+ -+ Console -+ true -+ -+ -+ $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -+ -+ -+ Deploy DLLs -+ -+ -+ -+ -+ NotUsing -+ Level3 -+ Disabled -+ true -+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ true -+ pch.h -+ -+ -+ Console -+ true -+ -+ -+ $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -+ -+ -+ Deploy DLLs -+ -+ -+ -+ -+ NotUsing -+ Level3 -+ MaxSpeed -+ true -+ true -+ true -+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ true -+ pch.h -+ -+ -+ Console -+ true -+ true -+ true -+ -+ -+ $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -+ -+ -+ Deploy DLLs -+ -+ -+ -+ -+ NotUsing -+ Level3 -+ MaxSpeed -+ true -+ true -+ true -+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) -+ true -+ pch.h -+ -+ -+ Console -+ true -+ true -+ true -+ -+ -+ $(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir) -+ -+ -+ Deploy DLLs -+ -+ -+ -+ -+ -+ -+ -+ {216a8e97-21f7-4bef-9e52-7f772c177c32} -+ -+ -+ -+ -+ -+ -+ -+ -+ - -\ No newline at end of file -diff --git a/examples/cpp/SampleCppMini/SampleCppMini.vcxproj b/examples/cpp/SampleCppMini/SampleCppMini.vcxproj -index a2891ace..e232a2e4 100644 ---- a/examples/cpp/SampleCppMini/SampleCppMini.vcxproj -+++ b/examples/cpp/SampleCppMini/SampleCppMini.vcxproj -@@ -79,35 +79,35 @@ - {86AC752C-5687-4377-841E-943D9BEEF361} - Win32Proj - SampleCppMini -- 10.0.17763.0 -+ 10.0 - true - - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -115,7 +115,7 @@ - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -123,7 +123,7 @@ - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -131,49 +131,49 @@ - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - true -- v141 -+ v142 - Unicode - Static - - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -181,7 +181,7 @@ - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -189,7 +189,7 @@ - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -197,7 +197,7 @@ - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -205,7 +205,7 @@ - - Application - false -- v141 -+ v142 - true - Unicode - Static -@@ -213,7 +213,7 @@ - - Application - false -- v141 -+ v142 - true - Unicode - Static -diff --git a/examples/cpp/SampleCppUWP/SampleCppUWP.vcxproj b/examples/cpp/SampleCppUWP/SampleCppUWP.vcxproj -index efe13147..23635fa5 100644 ---- a/examples/cpp/SampleCppUWP/SampleCppUWP.vcxproj -+++ b/examples/cpp/SampleCppUWP/SampleCppUWP.vcxproj -@@ -8,7 +8,7 @@ - true - Windows Store - 8.2 -- 10.0.17763.0 -+ 10.0 - 10.0.17763.0 - SampleCppUWP - -@@ -50,46 +50,46 @@ - - Application - true -- v141 -+ v142 - - - Application - true -- v141 -+ v142 - - - Application - true -- v141 -+ v142 - - - Application - true -- v141 -+ v142 - - - Application - false - true -- v141 -+ v142 - - - Application - false - true -- v141 -+ v142 - - - Application - false - true -- v141 -+ v142 - - - Application - false - true -- v141 -+ v142 - - - -diff --git a/googletest/googlemock/msvc/2015/gmock.vcxproj b/googletest/googlemock/msvc/2015/gmock.vcxproj -index 7b06da3a..612de047 100644 ---- a/googletest/googlemock/msvc/2015/gmock.vcxproj -+++ b/googletest/googlemock/msvc/2015/gmock.vcxproj -@@ -1,215 +1,215 @@ -- -- -- -- -- Debug -- ARM64 -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- ARM64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5} -- gmock -- Win32Proj -- 10.0.17134.0 -- true -- -- -- -- StaticLibrary -- Unicode -- false -- v141 -- -- -- StaticLibrary -- Unicode -- false -- v141 -- -- -- StaticLibrary -- Unicode -- false -- v141 -- -- -- StaticLibrary -- Unicode -- v141 -- -- -- StaticLibrary -- Unicode -- v141 -- -- -- StaticLibrary -- Unicode -- v141 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <_ProjectFileVersion>10.0.30319.1 -- -- -- $(SolutionDir)$(Platform)\$(Configuration)\ -- $(Platform)\$(Configuration)\ -- -- -- $(SolutionDir)$(Platform)\$(Configuration)\ -- $(Platform)\$(Configuration)\ -- -- -- -- Disabled -- ..\..\include;..\..;%(AdditionalIncludeDirectories) -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- -- -- Level3 -- ProgramDatabase -- -- -- false -- -- -- -- -- Disabled -- ..\..\include;..\..;%(AdditionalIncludeDirectories) -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -- EnableFastChecks -- MultiThreadedDebugDLL -- -- -- Level3 -- ProgramDatabase -- -- -- false -- -- -- -- -- Disabled -- ..\..\include;..\..;%(AdditionalIncludeDirectories) -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -- EnableFastChecks -- MultiThreadedDebugDLL -- -- -- Level3 -- ProgramDatabase -- -- -- false -- -- -- -- -- ..\..\include;..\..;%(AdditionalIncludeDirectories) -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -- MultiThreadedDLL -- -- -- Level3 -- ProgramDatabase -- -- -- false -- -- -- -- -- ..\..\include;..\..;%(AdditionalIncludeDirectories) -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -- MultiThreadedDLL -- -- -- Level3 -- ProgramDatabase -- -- -- false -- -- -- -- -- ..\..\include;..\..;%(AdditionalIncludeDirectories) -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -- MultiThreadedDLL -- -- -- Level3 -- ProgramDatabase -- -- -- false -- -- -- -- -- -- $(GTestDir);%(AdditionalIncludeDirectories) -- $(GTestDir);%(AdditionalIncludeDirectories) -- $(GTestDir);%(AdditionalIncludeDirectories) -- $(GTestDir);%(AdditionalIncludeDirectories) -- $(GTestDir);%(AdditionalIncludeDirectories) -- $(GTestDir);%(AdditionalIncludeDirectories) -- -- -- -- -- -- -+ -+ -+ -+ -+ Debug -+ ARM64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ ARM64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ {34681F0D-CE45-415D-B5F2-5C662DFE3BD5} -+ gmock -+ Win32Proj -+ 10.0 -+ true -+ -+ -+ -+ StaticLibrary -+ Unicode -+ false -+ v142 -+ -+ -+ StaticLibrary -+ Unicode -+ false -+ v142 -+ -+ -+ StaticLibrary -+ Unicode -+ false -+ v142 -+ -+ -+ StaticLibrary -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ Unicode -+ v142 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ <_ProjectFileVersion>10.0.30319.1 -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ $(SolutionDir)$(Platform)\$(Configuration)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ -+ Disabled -+ ..\..\include;..\..;%(AdditionalIncludeDirectories) -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ false -+ -+ -+ -+ -+ Disabled -+ ..\..\include;..\..;%(AdditionalIncludeDirectories) -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ false -+ -+ -+ -+ -+ Disabled -+ ..\..\include;..\..;%(AdditionalIncludeDirectories) -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ false -+ -+ -+ -+ -+ ..\..\include;..\..;%(AdditionalIncludeDirectories) -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ false -+ -+ -+ -+ -+ ..\..\include;..\..;%(AdditionalIncludeDirectories) -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ false -+ -+ -+ -+ -+ ..\..\include;..\..;%(AdditionalIncludeDirectories) -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ false -+ -+ -+ -+ -+ -+ $(GTestDir);%(AdditionalIncludeDirectories) -+ $(GTestDir);%(AdditionalIncludeDirectories) -+ $(GTestDir);%(AdditionalIncludeDirectories) -+ $(GTestDir);%(AdditionalIncludeDirectories) -+ $(GTestDir);%(AdditionalIncludeDirectories) -+ $(GTestDir);%(AdditionalIncludeDirectories) -+ -+ -+ -+ -+ -+ - -\ No newline at end of file -diff --git a/googletest/googletest/msvc/gtest.vcxproj b/googletest/googletest/msvc/gtest.vcxproj -index 6495fbdc..9548a5d5 100644 ---- a/googletest/googletest/msvc/gtest.vcxproj -+++ b/googletest/googletest/msvc/gtest.vcxproj -@@ -1,218 +1,218 @@ -- -- -- -- -- Debug -- ARM64 -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- ARM64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7} -- Win32Proj -- 10.0.17134.0 -- true -- -- -- -- StaticLibrary -- v141 -- Unicode -- -- -- StaticLibrary -- v141 -- Unicode -- -- -- StaticLibrary -- v141 -- Unicode -- -- -- StaticLibrary -- v141 -- Unicode -- -- -- StaticLibrary -- v141 -- Unicode -- -- -- StaticLibrary -- v141 -- Unicode -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <_ProjectFileVersion>14.0.25431.1 -- -- -- MinimumRecommendedRules.ruleset -- -- -- -- -- MinimumRecommendedRules.ruleset -- -- -- -- -- MinimumRecommendedRules.ruleset -- -- -- -- -- MinimumRecommendedRules.ruleset -- -- -- -- -- MinimumRecommendedRules.ruleset -- -- -- -- -- MinimumRecommendedRules.ruleset -- -- -- -- -- -- Disabled -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- -- Level3 -- EditAndContinue -- -- -- $(OutDir)gtestd.lib -- -- -- -- -- Disabled -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -- EnableFastChecks -- MultiThreadedDebugDLL -- -- -- Level3 -- ProgramDatabase -- -- -- $(OutDir)gtestd.lib -- -- -- -- -- Disabled -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -- EnableFastChecks -- MultiThreadedDebugDLL -- -- -- Level3 -- ProgramDatabase -- -- -- $(OutDir)gtestd.lib -- -- -- -- -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -- MultiThreadedDLL -- -- Level3 -- ProgramDatabase -- -- -- $(OutDir)gtest.lib -- -- -- -- -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -- MultiThreadedDLL -- -- -- Level3 -- ProgramDatabase -- -- -- $(OutDir)gtest.lib -- -- -- -- -- _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -- MultiThreadedDLL -- -- -- Level3 -- ProgramDatabase -- -- -- $(OutDir)gtest.lib -- -- -- -- -- ..;..\include;%(AdditionalIncludeDirectories) -- ..;..\include;%(AdditionalIncludeDirectories) -- ..;..\include;%(AdditionalIncludeDirectories) -- ..;..\include;%(AdditionalIncludeDirectories) -- ..;..\include;%(AdditionalIncludeDirectories) -- ..;..\include;%(AdditionalIncludeDirectories) -- -- -- -- -- -- -+ -+ -+ -+ -+ Debug -+ ARM64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ ARM64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7} -+ Win32Proj -+ 10.0 -+ true -+ -+ -+ -+ StaticLibrary -+ v142 -+ Unicode -+ -+ -+ StaticLibrary -+ v142 -+ Unicode -+ -+ -+ StaticLibrary -+ v142 -+ Unicode -+ -+ -+ StaticLibrary -+ v142 -+ Unicode -+ -+ -+ StaticLibrary -+ v142 -+ Unicode -+ -+ -+ StaticLibrary -+ v142 -+ Unicode -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ <_ProjectFileVersion>14.0.25431.1 -+ -+ -+ MinimumRecommendedRules.ruleset -+ -+ -+ -+ -+ MinimumRecommendedRules.ruleset -+ -+ -+ -+ -+ MinimumRecommendedRules.ruleset -+ -+ -+ -+ -+ MinimumRecommendedRules.ruleset -+ -+ -+ -+ -+ MinimumRecommendedRules.ruleset -+ -+ -+ -+ -+ MinimumRecommendedRules.ruleset -+ -+ -+ -+ -+ -+ Disabled -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ -+ Level3 -+ EditAndContinue -+ -+ -+ $(OutDir)gtestd.lib -+ -+ -+ -+ -+ Disabled -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ $(OutDir)gtestd.lib -+ -+ -+ -+ -+ Disabled -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ $(OutDir)gtestd.lib -+ -+ -+ -+ -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ $(OutDir)gtest.lib -+ -+ -+ -+ -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ $(OutDir)gtest.lib -+ -+ -+ -+ -+ _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ $(OutDir)gtest.lib -+ -+ -+ -+ -+ ..;..\include;%(AdditionalIncludeDirectories) -+ ..;..\include;%(AdditionalIncludeDirectories) -+ ..;..\include;%(AdditionalIncludeDirectories) -+ ..;..\include;%(AdditionalIncludeDirectories) -+ ..;..\include;%(AdditionalIncludeDirectories) -+ ..;..\include;%(AdditionalIncludeDirectories) -+ -+ -+ -+ -+ -+ - -\ No newline at end of file -diff --git a/sqliteUWP/sqlite-uwp.vcxproj b/sqliteUWP/sqlite-uwp.vcxproj -index 69c042ea..dea6ffff 100644 ---- a/sqliteUWP/sqlite-uwp.vcxproj -+++ b/sqliteUWP/sqlite-uwp.vcxproj -@@ -1,316 +1,316 @@ -- -- -- -- -- Debug -- ARM -- -- -- Debug -- ARM64 -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- ARM -- -- -- Release -- ARM64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- {6883a688-89f5-424a-9bfa-50d42f691b29} -- en-US -- 14.0 -- 10.0.17134.0 -- 10.0.10240.0 -- -- -- -- StaticLibrary -- true -- v141 -- true -- -- -- StaticLibrary -- true -- v141 -- true -- -- -- StaticLibrary -- true -- v141 -- true -- -- -- StaticLibrary -- true -- v141 -- true -- -- -- StaticLibrary -- false -- true -- v141 -- -- -- StaticLibrary -- false -- true -- v141 -- -- -- StaticLibrary -- false -- true -- v141 -- -- -- StaticLibrary -- false -- true -- v141 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- false -- $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ -- $(Platform)\$(Configuration)\ -- -- -- false -- $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ -- $(Platform)\$(Configuration)\ -- -- -- false -- -- -- false -- -- -- false -- -- -- false -- -- -- false -- -- -- false -- -- -- -- NotUsing -- false -- true -- SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -- -- $(OutDir)$(TargetName).pdb -- Default -- false -- -- -- Console -- false -- false -- -- -- false -- true -- -- -- -- -- NotUsing -- false -- true -- SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -- -- MinSpace -- $(OutDir)$(TargetName).pdb -- false -- -- -- Console -- false -- false -- -- -- true -- false -- -- -- -- -- NotUsing -- false -- true -- SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) -- -- $(OutDir)$(TargetName).pdb -- Default -- false -- -- -- Console -- false -- false -- -- -- false -- true -- -- -- -- -- NotUsing -- false -- true -- SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) -- -- MinSpace -- $(OutDir)$(TargetName).pdb -- false -- -- -- Console -- false -- false -- -- -- true -- false -- -- -- -- -- NotUsing -- false -- true -- SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -- -- $(OutDir)$(TargetName).pdb -- Default -- false -- -- -- Console -- false -- false -- -- -- false -- true -- -- -- -- -- NotUsing -- false -- true -- SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -- -- MinSpace -- $(OutDir)$(TargetName).pdb -- false -- -- -- Console -- false -- false -- -- -- true -- false -- -- -- -- -- false -- NotUsing -- _UNICODE;UNICODE;SQLITE_OS_WINRT;%(PreprocessorDefinitions) -- false -- -- -- false -- true -- -- -- -- -- false -- NotUsing -- _UNICODE;UNICODE;SQLITE_OS_WINRT;%(PreprocessorDefinitions) -- false -- -- -- true -- false -- -- -- -- -- -- -- -- -- false -- false -- -- -- -- -- -- -+ -+ -+ -+ -+ Debug -+ ARM -+ -+ -+ Debug -+ ARM64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ ARM -+ -+ -+ Release -+ ARM64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ {6883a688-89f5-424a-9bfa-50d42f691b29} -+ en-US -+ 14.0 -+ 10.0 -+ 10.0.10240.0 -+ -+ -+ -+ StaticLibrary -+ true -+ v142 -+ true -+ -+ -+ StaticLibrary -+ true -+ v142 -+ true -+ -+ -+ StaticLibrary -+ true -+ v142 -+ true -+ -+ -+ StaticLibrary -+ true -+ v142 -+ true -+ -+ -+ StaticLibrary -+ false -+ true -+ v142 -+ -+ -+ StaticLibrary -+ false -+ true -+ v142 -+ -+ -+ StaticLibrary -+ false -+ true -+ v142 -+ -+ -+ StaticLibrary -+ false -+ true -+ v142 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ false -+ $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ false -+ $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ -+ $(Platform)\$(Configuration)\ -+ -+ -+ false -+ -+ -+ false -+ -+ -+ false -+ -+ -+ false -+ -+ -+ false -+ -+ -+ false -+ -+ -+ -+ NotUsing -+ false -+ true -+ SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -+ -+ $(OutDir)$(TargetName).pdb -+ Default -+ false -+ -+ -+ Console -+ false -+ false -+ -+ -+ false -+ true -+ -+ -+ -+ -+ NotUsing -+ false -+ true -+ SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -+ -+ MinSpace -+ $(OutDir)$(TargetName).pdb -+ false -+ -+ -+ Console -+ false -+ false -+ -+ -+ true -+ false -+ -+ -+ -+ -+ NotUsing -+ false -+ true -+ SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) -+ -+ $(OutDir)$(TargetName).pdb -+ Default -+ false -+ -+ -+ Console -+ false -+ false -+ -+ -+ false -+ true -+ -+ -+ -+ -+ NotUsing -+ false -+ true -+ SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) -+ -+ MinSpace -+ $(OutDir)$(TargetName).pdb -+ false -+ -+ -+ Console -+ false -+ false -+ -+ -+ true -+ false -+ -+ -+ -+ -+ NotUsing -+ false -+ true -+ SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -+ -+ $(OutDir)$(TargetName).pdb -+ Default -+ false -+ -+ -+ Console -+ false -+ false -+ -+ -+ false -+ true -+ -+ -+ -+ -+ NotUsing -+ false -+ true -+ SQLITE_DEFAULT_AUTOVACUUM=1;SQLITE_OS_WINRT;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) -+ -+ MinSpace -+ $(OutDir)$(TargetName).pdb -+ false -+ -+ -+ Console -+ false -+ false -+ -+ -+ true -+ false -+ -+ -+ -+ -+ false -+ NotUsing -+ _UNICODE;UNICODE;SQLITE_OS_WINRT;%(PreprocessorDefinitions) -+ false -+ -+ -+ false -+ true -+ -+ -+ -+ -+ false -+ NotUsing -+ _UNICODE;UNICODE;SQLITE_OS_WINRT;%(PreprocessorDefinitions) -+ false -+ -+ -+ true -+ false -+ -+ -+ -+ -+ -+ -+ -+ -+ false -+ false -+ -+ -+ -+ -+ -+ - -\ No newline at end of file -diff --git a/tests/functests/FuncTests.vcxproj b/tests/functests/FuncTests.vcxproj -index 08e24b00..868a148a 100644 ---- a/tests/functests/FuncTests.vcxproj -+++ b/tests/functests/FuncTests.vcxproj -@@ -45,7 +45,7 @@ - - - {FE79FB3A-B3EF-38DF-B7A4-11277DB72B39} -- 10.0.17134.0 -+ 10.0 - Win32Proj - Win32 - FuncTests -@@ -56,37 +56,37 @@ - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - -@@ -449,15 +449,15 @@ - - - -- -+ - - - - - -- -+ - - - - -- -+ -\ No newline at end of file -diff --git a/tests/functests/FuncTests.vcxproj.filters b/tests/functests/FuncTests.vcxproj.filters -index 71dbe545..eedf3eab 100644 ---- a/tests/functests/FuncTests.vcxproj.filters -+++ b/tests/functests/FuncTests.vcxproj.filters -@@ -14,13 +14,8 @@ - - - -- -- -- -- - - -- - - - -diff --git a/tests/unittests/UnitTests.vcxproj b/tests/unittests/UnitTests.vcxproj -index 31506e77..0bff4a9f 100644 ---- a/tests/unittests/UnitTests.vcxproj -+++ b/tests/unittests/UnitTests.vcxproj -@@ -45,7 +45,7 @@ - - - {434C594F-CDE0-3690-AC0A-9ED854B74092} -- 10.0.17134.0 -+ 10.0 - Win32Proj - Win32 - UnitTests -@@ -56,37 +56,37 @@ - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - Application - false - Unicode -- v141 -+ v142 - - - -diff --git a/tests/unittests/UnitTests.vcxproj.filters b/tests/unittests/UnitTests.vcxproj.filters -index a6c9b1e0..be1ba644 100644 ---- a/tests/unittests/UnitTests.vcxproj.filters -+++ b/tests/unittests/UnitTests.vcxproj.filters -@@ -7,7 +7,6 @@ - - - -- - - - -@@ -53,11 +52,6 @@ - - - -- -- -- -- -- - - - -diff --git a/zlib/contrib/vstudio/vc14/zlibvc.vcxproj b/zlib/contrib/vstudio/vc14/zlibvc.vcxproj -index 5ff55579..77518e48 100644 ---- a/zlib/contrib/vstudio/vc14/zlibvc.vcxproj -+++ b/zlib/contrib/vstudio/vc14/zlibvc.vcxproj -@@ -1,1218 +1,1215 @@ -- -- -- -- -- Debug.vc14x.MT-sqlite -- ARM -- -- -- Debug.vc14x.MT-sqlite -- ARM64 -- -- -- Debug.vc14x.MT-sqlite -- Win32 -- -- -- Debug.vc14x.MT-sqlite -- x64 -- -- -- Debug -- ARM -- -- -- Debug -- ARM64 -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release.vc14x.MT-sqlite -- ARM -- -- -- Release.vc14x.MT-sqlite -- ARM64 -- -- -- Release.vc14x.MT-sqlite -- Win32 -- -- -- Release.vc14x.MT-sqlite -- x64 -- -- -- Release -- ARM -- -- -- Release -- ARM64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- {8FD826F8-3739-44E6-8CC8-997122E53B8D} -- zlib -- 10.0.17134.0 -- true -- -- -- -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- StaticLibrary -- false -- Unicode -- v141 -- -- -- StaticLibrary -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- Unicode -- v141 -- -- -- true -- StaticLibrary -- false -- Unicode -- v141 -- -- -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- StaticLibrary -- false -- false -- Unicode -- v141 -- -- -- StaticLibrary -- false -- Unicode -- v141 -- -- -- StaticLibrary -- false -- Unicode -- v141 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -- -- -- -- -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- false -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- false -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- -- -- false -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- false -- $(VC_IncludePath);$(WindowsSDK_IncludePath) -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- Win32 -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebugDLL -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- StreamingSIMDExtensions -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:I386 %(AdditionalOptions) -- ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -+ -+ -+ -+ -+ Debug.vc14x.MT-sqlite -+ ARM -+ -+ -+ Debug.vc14x.MT-sqlite -+ ARM64 -+ -+ -+ Debug.vc14x.MT-sqlite -+ Win32 -+ -+ -+ Debug.vc14x.MT-sqlite -+ x64 -+ -+ -+ Debug -+ ARM -+ -+ -+ Debug -+ ARM64 -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release.vc14x.MT-sqlite -+ ARM -+ -+ -+ Release.vc14x.MT-sqlite -+ ARM64 -+ -+ -+ Release.vc14x.MT-sqlite -+ Win32 -+ -+ -+ Release.vc14x.MT-sqlite -+ x64 -+ -+ -+ Release -+ ARM -+ -+ -+ Release -+ ARM64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ {8FD826F8-3739-44E6-8CC8-997122E53B8D} -+ zlib -+ 10.0 -+ true -+ -+ -+ -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ true -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ false -+ false -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ StaticLibrary -+ false -+ Unicode -+ v142 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath);%(AdditionalIncludeDirectories) -+ -+ -+ -+ -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ false -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ false -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ -+ -+ false -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ false -+ $(VC_IncludePath);$(WindowsSDK_IncludePath) -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ Win32 -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebugDLL -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ StreamingSIMDExtensions -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:I386 %(AdditionalOptions) -+ ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ - cd ..\..\masmx86 --bld_ml32.bat -- -- -- MachineX86 -- false -- -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- Win32 -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebug -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- StreamingSIMDExtensions -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:I386 %(AdditionalOptions) -- ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -+bld_ml32.bat -+ -+ -+ MachineX86 -+ false -+ -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ Win32 -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebug -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ StreamingSIMDExtensions -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:I386 %(AdditionalOptions) -+ ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ - cd ..\..\masmx86 --bld_ml32.bat -- -- -- MachineX86 -- false -- -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebugDLL -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- -- MachineARM -- false -- -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebugDLL -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM64 %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- MachineARM64 -- false -- -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebug -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- -- MachineARM -- false -- -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebug -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM64 %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- MachineARM64 -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- Win32 -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- true -- -- -- MultiThreadedDLL -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- true -- Speed -- true -- StreamingSIMDExtensions -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:I386 %(AdditionalOptions) -- ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -+bld_ml32.bat -+ -+ -+ MachineX86 -+ false -+ -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebugDLL -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ -+ MachineARM -+ false -+ -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebugDLL -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM64 %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ MachineARM64 -+ false -+ -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebug -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ -+ MachineARM -+ false -+ -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebug -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM64 %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ MachineARM64 -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ Win32 -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreadedDLL -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ true -+ Speed -+ true -+ StreamingSIMDExtensions -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:I386 %(AdditionalOptions) -+ ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ - cd ..\..\masmx86 --bld_ml32.bat -- -- -- MachineX86 -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- Win32 -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- true -- -- -- MultiThreaded -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- StreamingSIMDExtensions -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:I386 %(AdditionalOptions) -- ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -+bld_ml32.bat -+ -+ -+ MachineX86 -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ Win32 -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreaded -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ StreamingSIMDExtensions -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:I386 %(AdditionalOptions) -+ ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ - cd ..\..\masmx86 --bld_ml32.bat -- -- -- MachineX86 -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- true -- -- -- MultiThreadedDLL -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- true -- Speed -- true -- NotSet -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- -- MachineARM -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- true -- -- -- MultiThreadedDLL -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- true -- Speed -- true -- NotSet -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM64 %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- MachineARM64 -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- true -- -- -- MultiThreaded -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- -- MachineARM -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -- ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -- true -- -- -- MultiThreaded -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- /MACHINE:ARM64 %(AdditionalOptions) -- %(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- false -- -- -- $(OutDir)zlib.lib -- -- -- -- MachineARM64 -- false -- -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- X64 -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebugDLL -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- StreamingSIMDExtensions2 -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- $(OutDir)zlib.lib -- MachineX64 -- -- -+bld_ml32.bat -+ -+ -+ MachineX86 -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreadedDLL -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ true -+ Speed -+ true -+ NotSet -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ -+ MachineARM -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreadedDLL -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ true -+ Speed -+ true -+ NotSet -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM64 %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ MachineARM64 -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreaded -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ -+ MachineARM -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ %(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\ -+ ARCH_ARM;WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreaded -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ /MACHINE:ARM64 %(AdditionalOptions) -+ %(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ false -+ -+ -+ $(OutDir)zlib.lib -+ -+ -+ -+ MachineARM64 -+ false -+ -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ X64 -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebugDLL -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ StreamingSIMDExtensions2 -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ $(OutDir)zlib.lib -+ MachineX64 -+ -+ - cd ..\..\contrib\masmx64 --bld_ml64.bat -- -- -- false -- -- -- -- -- _DEBUG;%(PreprocessorDefinitions) -- true -- true -- X64 -- $(OutDir)zlibvc.tlb -- -- -- Disabled -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -- -- -- MultiThreadedDebug -- true -- $(IntDir)zlibvc.pch -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- ProgramDatabase -- StreamingSIMDExtensions2 -- Guard -- -- -- _DEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- .\zlibvc.def -- true -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- $(OutDir)zlib.lib -- MachineX64 -- -- -+bld_ml64.bat -+ -+ -+ false -+ -+ -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ X64 -+ $(OutDir)zlibvc.tlb -+ -+ -+ Disabled -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -+ -+ -+ MultiThreadedDebug -+ true -+ $(IntDir)zlibvc.pch -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ ProgramDatabase -+ StreamingSIMDExtensions2 -+ Guard -+ -+ -+ _DEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ .\zlibvc.def -+ true -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ $(OutDir)zlib.lib -+ MachineX64 -+ -+ - cd ..\..\contrib\masmx64 --bld_ml64.bat -- -- -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- X64 -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -- true -- -- -- MultiThreadedDLL -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- true -- Speed -- true -- StreamingSIMDExtensions2 -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- $(OutDir)zlib.lib -- MachineX64 -- -- -+bld_ml64.bat -+ -+ -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ X64 -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreadedDLL -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ true -+ Speed -+ true -+ StreamingSIMDExtensions2 -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ $(OutDir)zlib.lib -+ MachineX64 -+ -+ - cd ..\..\masmx64 --bld_ml64.bat -- -- -- false -- -- -- -- -- NDEBUG;%(PreprocessorDefinitions) -- true -- true -- X64 -- $(OutDir)zlibvc.tlb -- -- -- OnlyExplicitInline -- ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -- _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -- true -- -- -- MultiThreaded -- true -- true -- $(IntDir)zlibvc.pch -- All -- $(IntDir) -- $(IntDir) -- $(OutDir)$(TargetName).pdb -- false -- Level3 -- true -- StreamingSIMDExtensions2 -- false -- Guard -- -- -- NDEBUG;%(PreprocessorDefinitions) -- 0x040c -- -- -- ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -- $(OutDir)zlib.lib -- true -- false -- .\zlibvc.def -- $(OutDir)zlib.pdb -- true -- $(OutDir)zlib.lib.map -- Windows -- $(OutDir)zlib.lib -- MachineX64 -- -- -+bld_ml64.bat -+ -+ -+ false -+ -+ -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ true -+ true -+ X64 -+ $(OutDir)zlibvc.tlb -+ -+ -+ OnlyExplicitInline -+ ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) -+ _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) -+ true -+ -+ -+ MultiThreaded -+ true -+ true -+ $(IntDir)zlibvc.pch -+ All -+ $(IntDir) -+ $(IntDir) -+ $(OutDir)$(TargetName).pdb -+ false -+ Level3 -+ true -+ StreamingSIMDExtensions2 -+ false -+ Guard -+ -+ -+ NDEBUG;%(PreprocessorDefinitions) -+ 0x040c -+ -+ -+ ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) -+ $(OutDir)zlib.lib -+ true -+ false -+ .\zlibvc.def -+ $(OutDir)zlib.pdb -+ true -+ $(OutDir)zlib.lib.map -+ Windows -+ $(OutDir)zlib.lib -+ MachineX64 -+ -+ - cd ..\..\masmx64 --bld_ml64.bat -- -- -- false -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -+bld_ml64.bat -+ -+ -+ false -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -\ No newline at end of file diff --git a/tools/ports/mstelemetry/vcpkg.json b/tools/ports/mstelemetry/vcpkg.json new file mode 100644 index 000000000..5a22c72d3 --- /dev/null +++ b/tools/ports/mstelemetry/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "mstelemetry", + "version": "3.10.44.1", + "port-version": 0, + "description": "Microsoft 1DS C/C++ Client Telemetry Library", + "homepage": "https://github.com/microsoft/cpp_client_telemetry", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + "nlohmann-json", + "sqlite3", + "zlib", + { + "name": "curl", + "features": [ + "ssl" + ], + "platform": "!windows & !osx & !ios & !android" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/wrappers/obj-c/ODWLogger.mm b/wrappers/obj-c/ODWLogger.mm index 594603390..ee6b3ad25 100644 --- a/wrappers/obj-c/ODWLogger.mm +++ b/wrappers/obj-c/ODWLogger.mm @@ -9,8 +9,20 @@ #import "ODWLogConfiguration.h" #import "ODWSemanticContext.h" #import "ODWSemanticContext_private.h" + +#if __has_include("PrivacyGuard.hpp") +#define MATSDK_OBJC_PRIVACYGUARD_AVAILABLE 1 #import "ODWPrivacyGuard_private.h" +#else +#define MATSDK_OBJC_PRIVACYGUARD_AVAILABLE 0 +#endif + +#if __has_include("Sanitizer.hpp") +#define MATSDK_OBJC_SANITIZER_AVAILABLE 1 #import "ODWSanitizer_private.h" +#else +#define MATSDK_OBJC_SANITIZER_AVAILABLE 0 +#endif #include "EventProperties.hpp" @@ -411,17 +423,35 @@ void PerformActionWithCppExceptionsCatch(void (^block)()) } -(void)initializePrivacyGuardWithODWPrivacyGuardInitConfig:(ODWPrivacyGuardInitConfig *)initConfigObject -{ +{ +#if MATSDK_OBJC_PRIVACYGUARD_AVAILABLE [ODWPrivacyGuard initializePrivacyGuard:_wrappedLogger withODWPrivacyGuardInitConfig:initConfigObject]; +#else + (void)initConfigObject; + [ODWLogger traceException:"Privacy Guard is not available in this build."]; +#endif } -(void)initializeSanitizerWithODWSanitizerInitConfig:(ODWSanitizerInitConfig *)initConfigObject { +#if MATSDK_OBJC_SANITIZER_AVAILABLE [ODWSanitizer initializeSanitizer:_wrappedLogger withODWSanitizerInitConfig:initConfigObject]; +#else + (void)initConfigObject; + [ODWLogger traceException:"Sanitizer is not available in this build."]; +#endif } -(void)initializeSanitizerWithODWSanitizerInitConfig:(ODWSanitizerInitConfig *)initConfigObject urlDomains:(NSArray *)urlDomains emailDomains:(NSArray *)emailDomains analyzerOptions:(int)analyzerOptions { +#if MATSDK_OBJC_SANITIZER_AVAILABLE [ODWSanitizer initializeSanitizer:_wrappedLogger withODWSanitizerInitConfig:initConfigObject urlDomains:urlDomains emailDomains:emailDomains analyzerOptions:analyzerOptions]; +#else + (void)initConfigObject; + (void)urlDomains; + (void)emailDomains; + (void)analyzerOptions; + [ODWLogger traceException:"Sanitizer is not available in this build."]; +#endif } @end diff --git a/wrappers/swift/Package.swift b/wrappers/swift/Package.swift index 1b4136bcc..db5a19275 100644 --- a/wrappers/swift/Package.swift +++ b/wrappers/swift/Package.swift @@ -2,6 +2,45 @@ // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription +import Foundation + +let packageDirectory = URL(fileURLWithPath: #filePath).deletingLastPathComponent() + +func moduleExists(_ relativePath: String) -> Bool { + FileManager.default.fileExists(atPath: packageDirectory.appendingPathComponent(relativePath).standardizedFileURL.path) +} + +let hasDiagnosticDataViewer = moduleExists("../../lib/modules/dataviewer") +let hasPrivacyGuard = moduleExists("../../lib/modules/privacyguard") +let hasSanitizer = moduleExists("../../lib/modules/sanitizer") + +var excludedSources: [String] = [] +var swiftSettings: [SwiftSetting] = [] + +if hasDiagnosticDataViewer { + swiftSettings.append(.define("MATSDK_DATAVIEWER_AVAILABLE")) +} else { + excludedSources.append("DiagnosticDataViewer.swift") +} + +if hasPrivacyGuard { + swiftSettings.append(.define("MATSDK_PRIVACYGUARD_AVAILABLE")) +} else { + excludedSources.append(contentsOf: [ + "CommonDataContext.swift", + "PrivacyGuard.swift", + "PrivacyGuardInitConfig.swift", + ]) +} + +if hasSanitizer { + swiftSettings.append(.define("MATSDK_SANITIZER_AVAILABLE")) +} else { + excludedSources.append(contentsOf: [ + "Sanitizer.swift", + "SanitizerInitConfig.swift", + ]) +} let package = Package( name: "OneDSSwiftWrapper", @@ -21,8 +60,11 @@ let package = Package( .target( name: "OneDSSwift", dependencies: [], + path: "Sources/OneDSSwift", + exclude: excludedSources, cSettings: [ .headerSearchPath("../../Modules/") - ]), + ], + swiftSettings: swiftSettings), ] ) diff --git a/wrappers/swift/Sources/OneDSSwift/Logger.swift b/wrappers/swift/Sources/OneDSSwift/Logger.swift index 4821df3b6..04a9c1497 100644 --- a/wrappers/swift/Sources/OneDSSwift/Logger.swift +++ b/wrappers/swift/Sources/OneDSSwift/Logger.swift @@ -137,10 +137,12 @@ public final class Logger { /** Initializes and gets an instance of Privacy Guard. - */ + */ + #if MATSDK_PRIVACYGUARD_AVAILABLE public func apply(config initConfigObject: PrivacyGuardInitConfig) { odwLogger.initializePrivacyGuard(with: initConfigObject.getODWPrivacyGuardInitConfig()) } + #endif // MARK: Set Context methods From 898defbb40cbd35ce32d56c6019821203d25f198 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 20:48:09 -0500 Subject: [PATCH 21/39] Use CMake version ranges for CMake 4 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 2 +- examples/c/SampleC-Guest/CMakeLists.txt | 2 +- examples/cpp/EventSender/CMakeLists.txt | 2 +- examples/cpp/MacProxy/CMakeLists.txt | 2 +- examples/cpp/SampleCpp/CMakeLists.txt | 2 +- examples/cpp/SampleCppMini/CMakeLists.txt | 2 +- examples/objc/cocoa-app/CMakeLists.txt | 2 +- lib/android_build/app/src/main/cpp/CMakeLists.txt | 2 +- zlib/CMakeLists.txt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab11ebc50..af6ee1810 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.1.0...3.5) project(MSTelemetry LANGUAGES C CXX) ################################################################################################ diff --git a/examples/c/SampleC-Guest/CMakeLists.txt b/examples/c/SampleC-Guest/CMakeLists.txt index 2022c4d76..2ff06780e 100644 --- a/examples/c/SampleC-Guest/CMakeLists.txt +++ b/examples/c/SampleC-Guest/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.1.0...3.5) project(SampleC-Guest) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/EventSender/CMakeLists.txt b/examples/cpp/EventSender/CMakeLists.txt index 14d4b95af..c8092b084 100644 --- a/examples/cpp/EventSender/CMakeLists.txt +++ b/examples/cpp/EventSender/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.1.0...3.5) project(EventSender) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/MacProxy/CMakeLists.txt b/examples/cpp/MacProxy/CMakeLists.txt index f10ef1609..e9b6c1005 100644 --- a/examples/cpp/MacProxy/CMakeLists.txt +++ b/examples/cpp/MacProxy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.1.0...3.5) project(MacProxy) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/SampleCpp/CMakeLists.txt b/examples/cpp/SampleCpp/CMakeLists.txt index 4118eb463..6a1e70d78 100644 --- a/examples/cpp/SampleCpp/CMakeLists.txt +++ b/examples/cpp/SampleCpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.1.0...3.5) project(SampleCpp) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/SampleCppMini/CMakeLists.txt b/examples/cpp/SampleCppMini/CMakeLists.txt index 4d1cefe3c..bd9548e5f 100644 --- a/examples/cpp/SampleCppMini/CMakeLists.txt +++ b/examples/cpp/SampleCppMini/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.1.0...3.5) project(SampleCppMini) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/objc/cocoa-app/CMakeLists.txt b/examples/objc/cocoa-app/CMakeLists.txt index 188fbc4ee..0a172300a 100644 --- a/examples/objc/cocoa-app/CMakeLists.txt +++ b/examples/objc/cocoa-app/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.8) +cmake_minimum_required(VERSION 2.8.8...3.5) project(foo) include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) diff --git a/lib/android_build/app/src/main/cpp/CMakeLists.txt b/lib/android_build/app/src/main/cpp/CMakeLists.txt index 94c5f4b41..895f9030c 100644 --- a/lib/android_build/app/src/main/cpp/CMakeLists.txt +++ b/lib/android_build/app/src/main/cpp/CMakeLists.txt @@ -3,7 +3,7 @@ # Sets the minimum version of CMake required to build the native library. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.4.1...3.5) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index a72cf3116..da3876f7b 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.4.4) +cmake_minimum_required(VERSION 2.4.4...3.5) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) project(zlib C) From 0fb6a1be6184c0a0cf7f1982f10aa274cbcba8e9 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 20:54:08 -0500 Subject: [PATCH 22/39] Fix zlib old CMake compatibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- zlib/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index da3876f7b..97710932d 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -239,12 +239,12 @@ endif() if(WIN32) - add_compile_definitions(WIN32) - add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) - add_compile_definitions(_CRT_SECURE_NO_DEPRECATE) - add_compile_definitions(_CRT_NONSTDC_NO_WARNINGS) - add_compile_definitions(ZLIB_WINAPI) + add_definitions(-DWIN32) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) + add_definitions(-DZLIB_WINAPI) if(CMAKE_SIZEOF_VOID_P EQUAL 8) - add_compile_definitions(WIN64) + add_definitions(-DWIN64) endif() endif() From 70812d94943e261a8865fdf05b1e72fa8720337a Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Sat, 2 May 2026 16:34:03 -0500 Subject: [PATCH 23/39] Fix legacy POSIX zlib linkage in CMake Use a real ZLIB package in the non-vcpkg Linux/macOS path instead of a bare imported z target with no location. This restores the regular debug test path on Ubuntu/macOS while keeping the vendored-vs-vcpkg dependency split intact. Files changed: - lib/CMakeLists.txt - tests/functests/CMakeLists.txt - tests/unittests/CMakeLists.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lib/CMakeLists.txt | 20 ++++++++++++-------- tests/functests/CMakeLists.txt | 2 +- tests/unittests/CMakeLists.txt | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d1ec2e09f..12e00e745 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -373,15 +373,19 @@ else() target_link_libraries(mat PRIVATE ${LIBS}) else() # Linux/macOS legacy: link system-installed sqlite3 and zlib - add_library(sqlite3 STATIC IMPORTED GLOBAL) - find_library(SQLITE3_STATIC_LIB NAMES libsqlite3.a - PATHS /usr/local/lib /usr/local/opt/sqlite/lib /opt/homebrew/opt/sqlite/lib - NO_DEFAULT_PATH) - if(SQLITE3_STATIC_LIB) - set_target_properties(sqlite3 PROPERTIES IMPORTED_LOCATION ${SQLITE3_STATIC_LIB}) + if(EXISTS "/usr/local/lib/libsqlite3.a") + set(MATSDK_SQLITE3_LIB "/usr/local/lib/libsqlite3.a") + elseif(EXISTS "/usr/local/opt/sqlite/lib/libsqlite3.a") + set(MATSDK_SQLITE3_LIB "/usr/local/opt/sqlite/lib/libsqlite3.a") + elseif(EXISTS "/opt/homebrew/opt/sqlite/lib/libsqlite3.a") + set(MATSDK_SQLITE3_LIB "/opt/homebrew/opt/sqlite/lib/libsqlite3.a") + else() + set(MATSDK_SQLITE3_LIB "sqlite3") endif() - add_library(z STATIC IMPORTED GLOBAL) - target_link_libraries(mat PRIVATE sqlite3 z ${LIBS}) + + find_package(ZLIB REQUIRED) + target_include_directories(mat PRIVATE ${ZLIB_INCLUDE_DIRS}) + target_link_libraries(mat PRIVATE ${MATSDK_SQLITE3_LIB} ZLIB::ZLIB ${LIBS}) endif() endif() diff --git a/tests/functests/CMakeLists.txt b/tests/functests/CMakeLists.txt index 323a8e2f9..d3eac21fe 100644 --- a/tests/functests/CMakeLists.txt +++ b/tests/functests/CMakeLists.txt @@ -124,7 +124,7 @@ else() ${LIBGTEST} ${LIBGMOCK} mat - ${ZLIB_LIBRARIES} + ZLIB::ZLIB ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index 8b52a5fb3..5ca5b8e77 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -189,7 +189,7 @@ else() ${LIBGTEST} ${LIBGMOCK} mat - ${ZLIB_LIBRARIES} + ZLIB::ZLIB ${SQLITE3_LIB} ${PLATFORM_LIBS} dl) From 91520cf67d32d327014e00f29fc14041079ff19c Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 22 May 2026 09:47:42 -0500 Subject: [PATCH 24/39] Update tools/vcpkg submodule to 2026.04.27 release The previous submodule pin (2022.02.02) cannot find Visual Studio 2026 (VS 18) and rejects local vcpkg builds with 'Unable to find a valid Visual Studio instance'. Update to the 2026.04.27 release so the bundled vcpkg supports VS 2026 toolchains. Validated by running tests/vcpkg/test-vcpkg-windows.ps1 with VS 2026, x64-windows-static triplet: vcpkg installed mstelemetry from the pinned GitHub SHA together with sqlite3, zlib, and nlohmann-json, the consumer linked, and all 7 integration assertions passed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tools/vcpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vcpkg b/tools/vcpkg index 16d13ffc5..56bb24116 160000 --- a/tools/vcpkg +++ b/tools/vcpkg @@ -1 +1 @@ -Subproject commit 16d13ffc54cec8c05374fc20bd48cbb14ecc974d +Subproject commit 56bb2411609227288b70117ead2c47585ba07713 From 92201a4831839d805d85dfc1f8ec848aa66809dd Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 00:41:27 -0500 Subject: [PATCH 25/39] Address Copilot vcpkg review comments Comment 3319614678: tools/ports/mstelemetry/vcpkg.json used an older port version while the source tree reports 3.10.100.1. Updated the port manifest version to match Version.hpp. Verified at lib/include/public/Version.hpp. Comment 3319614708: iOS simulator execution failure handling was unreachable under set -e. Changed the simctl spawn call to an if/else so the failure path is reachable. Verified at tests/vcpkg/test-vcpkg-ios.sh. Comment 3319614736: Windows vcpkg test passed CMake args through a space-joined cmd string. Generate a temporary batch file and quote each CMake argument individually after vcvarsall initializes the environment. Verified by running tests/vcpkg/test-vcpkg-windows.ps1 locally. Comment 3319614765: installed MSTelemetryConfig.cmake only exists for vcpkg mode, so the MATSDK_USE_VCPKG_DEPS guard around find_dependency was redundant. Removed the guard. Verified at cmake/MSTelemetryConfig.cmake.in and lib/CMakeLists.txt install path. Comment 3319614807: vcpkg workflow used unconditional cancel-in-progress. Match repo workflow behavior and cancel only pull_request runs. Verified at .github/workflows/test-vcpkg.yml. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/test-vcpkg.yml | 2 +- cmake/MSTelemetryConfig.cmake.in | 8 +++----- tests/vcpkg/test-vcpkg-ios.sh | 8 +++----- tests/vcpkg/test-vcpkg-windows.ps1 | 21 +++++++++++++++++---- tools/ports/mstelemetry/vcpkg.json | 2 +- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-vcpkg.yml b/.github/workflows/test-vcpkg.yml index cdd8ee1bb..a9a25f6e1 100644 --- a/.github/workflows/test-vcpkg.yml +++ b/.github/workflows/test-vcpkg.yml @@ -19,7 +19,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: windows: diff --git a/cmake/MSTelemetryConfig.cmake.in b/cmake/MSTelemetryConfig.cmake.in index 6c15631ca..0ad3351e9 100644 --- a/cmake/MSTelemetryConfig.cmake.in +++ b/cmake/MSTelemetryConfig.cmake.in @@ -3,11 +3,9 @@ include(CMakeFindDependencyMacro) # Re-find dependencies that consumers need -if(@MATSDK_USE_VCPKG_DEPS@) - find_dependency(unofficial-sqlite3 CONFIG) - find_dependency(ZLIB) - find_dependency(nlohmann_json CONFIG) -endif() +find_dependency(unofficial-sqlite3 CONFIG) +find_dependency(ZLIB) +find_dependency(nlohmann_json CONFIG) # Curl is needed on Linux (not Windows/iOS/Android/macOS-with-Apple-HTTP). # We capture the build-time decision as a boolean rather than re-deriving diff --git a/tests/vcpkg/test-vcpkg-ios.sh b/tests/vcpkg/test-vcpkg-ios.sh index 37f5391f2..c779ef27f 100755 --- a/tests/vcpkg/test-vcpkg-ios.sh +++ b/tests/vcpkg/test-vcpkg-ios.sh @@ -134,14 +134,12 @@ print('') # Run the test binary on the simulator echo "Executing vcpkg_test on simulator..." - xcrun simctl spawn "${DEVICE_UDID}" "${BINARY}" - EXIT_CODE=$? - - if [ ${EXIT_CODE} -eq 0 ]; then + if xcrun simctl spawn "${DEVICE_UDID}" "${BINARY}"; then echo "[PASS] iOS Simulator execution succeeded" else + EXIT_CODE=$? echo "[FAIL] iOS Simulator execution failed with exit code ${EXIT_CODE}" - exit 1 + exit ${EXIT_CODE} fi else echo "" diff --git a/tests/vcpkg/test-vcpkg-windows.ps1 b/tests/vcpkg/test-vcpkg-windows.ps1 index 70caaa828..a919495dd 100644 --- a/tests/vcpkg/test-vcpkg-windows.ps1 +++ b/tests/vcpkg/test-vcpkg-windows.ps1 @@ -91,10 +91,23 @@ if (-not $clExe) { $vcvarsall = Join-Path $vsInstall "VC\Auxiliary\Build\vcvarsall.bat" Write-Host "Initializing VS environment from: $vcvarsall" - # Build and run everything in a single cmd /c call - $cmakeArgStr = $CmakeArgs -join " " - $cmdLine = "`"$vcvarsall`" $VcvarsArch && cmake $cmakeArgStr -G `"NMake Makefiles`" && cmake --build `"$ConsumerBuild`" --config Release" - cmd /c $cmdLine + # Build and run everything from a temporary batch file so each argument remains quoted. + $quoteCmdArg = { + param([string]$Value) + '"' + $Value.Replace('"', '""') + '"' + } + $configureArgs = @($CmakeArgs + @("-G", "NMake Makefiles")) | ForEach-Object { & $quoteCmdArg $_ } + $buildArgs = @("--build", $ConsumerBuild, "--config", "Release") | ForEach-Object { & $quoteCmdArg $_ } + $batchFile = Join-Path $BuildDir "run-vcpkg-test.cmd" + @( + "@echo off", + "call $(& $quoteCmdArg $vcvarsall) $VcvarsArch", + "if errorlevel 1 exit /b %errorlevel%", + "cmake $($configureArgs -join ' ')", + "if errorlevel 1 exit /b %errorlevel%", + "cmake $($buildArgs -join ' ')" + ) | Set-Content -LiteralPath $batchFile -Encoding ASCII + cmd /d /s /c "`"$batchFile`"" if ($LASTEXITCODE -ne 0) { Write-Error "Build failed"; exit 1 } } else { Write-Host "Using cl.exe from: $($clExe.Source)" diff --git a/tools/ports/mstelemetry/vcpkg.json b/tools/ports/mstelemetry/vcpkg.json index 5a22c72d3..50d270b43 100644 --- a/tools/ports/mstelemetry/vcpkg.json +++ b/tools/ports/mstelemetry/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mstelemetry", - "version": "3.10.44.1", + "version": "3.10.100.1", "port-version": 0, "description": "Microsoft 1DS C/C++ Client Telemetry Library", "homepage": "https://github.com/microsoft/cpp_client_telemetry", From 9a9bec239c89f0c869aa366ca3b54c3c1b460f66 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 00:53:14 -0500 Subject: [PATCH 26/39] Address Copilot CMake compatibility comments Comments 3338908128/8154/8170/8187/8210/8228/8247/8270/8288: CMake range syntax requires CMake 3.12+ to parse and contradicted the 3.5+ compatibility goal. Replace the changed project files with plain VERSION 3.5 minimums. Verified by CMake configure on Windows. Comments 3338908329/8357: CXX_EXTRA_WARN_FLAGS was defined but not applied after preserving #1416's CMAKE_CXX_STANDARD cleanup. Append it to Release and Debug CXX flags without reintroducing -std=c++11. Verified at CMakeLists.txt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 6 +++--- examples/c/SampleC-Guest/CMakeLists.txt | 2 +- examples/cpp/EventSender/CMakeLists.txt | 2 +- examples/cpp/MacProxy/CMakeLists.txt | 2 +- examples/cpp/SampleCpp/CMakeLists.txt | 2 +- examples/cpp/SampleCppMini/CMakeLists.txt | 2 +- examples/objc/cocoa-app/CMakeLists.txt | 2 +- lib/android_build/app/src/main/cpp/CMakeLists.txt | 2 +- zlib/CMakeLists.txt | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af6ee1810..59da5780a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0...3.5) +cmake_minimum_required(VERSION 3.5) project(MSTelemetry LANGUAGES C CXX) ################################################################################################ @@ -179,13 +179,13 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") message(STATUS "Building Release ...") set(CMAKE_C_FLAGS "$ENV{CFLAGS} ${CMAKE_C_FLAGS} -std=c11 ${REL_FLAGS}") # C++ standard is set via CMAKE_CXX_STANDARD above; do not override here. - set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} ${REL_FLAGS}") + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} ${REL_FLAGS} ${CXX_EXTRA_WARN_FLAGS}") else() set(USE_TCMALLOC 1) message(STATUS "Building Debug ...") include(tools/FindTcmalloc.cmake) set(CMAKE_C_FLAGS "$ENV{CFLAGS} ${CMAKE_C_FLAGS} -std=c11 ${DBG_FLAGS}") - set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} ${DBG_FLAGS}") + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} ${DBG_FLAGS} ${CXX_EXTRA_WARN_FLAGS}") endif() #Remove /Zi for Win32 debug compiler issue diff --git a/examples/c/SampleC-Guest/CMakeLists.txt b/examples/c/SampleC-Guest/CMakeLists.txt index 2ff06780e..2d4a4e368 100644 --- a/examples/c/SampleC-Guest/CMakeLists.txt +++ b/examples/c/SampleC-Guest/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0...3.5) +cmake_minimum_required(VERSION 3.5) project(SampleC-Guest) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/EventSender/CMakeLists.txt b/examples/cpp/EventSender/CMakeLists.txt index c8092b084..615b96ffe 100644 --- a/examples/cpp/EventSender/CMakeLists.txt +++ b/examples/cpp/EventSender/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0...3.5) +cmake_minimum_required(VERSION 3.5) project(EventSender) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/MacProxy/CMakeLists.txt b/examples/cpp/MacProxy/CMakeLists.txt index e9b6c1005..93f090fae 100644 --- a/examples/cpp/MacProxy/CMakeLists.txt +++ b/examples/cpp/MacProxy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0...3.5) +cmake_minimum_required(VERSION 3.5) project(MacProxy) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/SampleCpp/CMakeLists.txt b/examples/cpp/SampleCpp/CMakeLists.txt index 6a1e70d78..b1bf8e419 100644 --- a/examples/cpp/SampleCpp/CMakeLists.txt +++ b/examples/cpp/SampleCpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0...3.5) +cmake_minimum_required(VERSION 3.5) project(SampleCpp) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/cpp/SampleCppMini/CMakeLists.txt b/examples/cpp/SampleCppMini/CMakeLists.txt index bd9548e5f..665237000 100644 --- a/examples/cpp/SampleCppMini/CMakeLists.txt +++ b/examples/cpp/SampleCppMini/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0...3.5) +cmake_minimum_required(VERSION 3.5) project(SampleCppMini) # Uncomment for building i386 binary on x86_64 system diff --git a/examples/objc/cocoa-app/CMakeLists.txt b/examples/objc/cocoa-app/CMakeLists.txt index 0a172300a..1ee932715 100644 --- a/examples/objc/cocoa-app/CMakeLists.txt +++ b/examples/objc/cocoa-app/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.8...3.5) +cmake_minimum_required(VERSION 3.5) project(foo) include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/MSTelemetrySample.cmake) diff --git a/lib/android_build/app/src/main/cpp/CMakeLists.txt b/lib/android_build/app/src/main/cpp/CMakeLists.txt index 895f9030c..1ee7d8662 100644 --- a/lib/android_build/app/src/main/cpp/CMakeLists.txt +++ b/lib/android_build/app/src/main/cpp/CMakeLists.txt @@ -3,7 +3,7 @@ # Sets the minimum version of CMake required to build the native library. -cmake_minimum_required(VERSION 3.4.1...3.5) +cmake_minimum_required(VERSION 3.5) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index 97710932d..7786f2215 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.4.4...3.5) +cmake_minimum_required(VERSION 3.5) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) project(zlib C) From 33af2a3a43b2d8d33dfbfc5116d19b2b35f17f34 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 01:08:38 -0500 Subject: [PATCH 27/39] Address Copilot CMake follow-up comments Comment 3338950616: BUILD_SHARED_LIBS was compared to the literal string ON. Use normal CMake boolean evaluation so TRUE, YES, and 1 are handled correctly. Verified at lib/CMakeLists.txt. Comment 3338950649: sample helper only checked libmat.a/libmat.dylib before falling back to a Linux multiarch libdir. Include libmat.so checks for shared Linux installs. Verified at examples/cmake/MSTelemetrySample.cmake. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- examples/cmake/MSTelemetrySample.cmake | 4 +++- lib/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/cmake/MSTelemetrySample.cmake b/examples/cmake/MSTelemetrySample.cmake index 588dd6727..c2dab5ece 100644 --- a/examples/cmake/MSTelemetrySample.cmake +++ b/examples/cmake/MSTelemetrySample.cmake @@ -9,7 +9,9 @@ set(MATSDK_LIB_DIR "${MATSDK_INSTALL_DIR}/lib" CACHE PATH "MSTelemetry library d if(NOT EXISTS "${MATSDK_LIB_DIR}/libmat.a" AND NOT EXISTS "${MATSDK_LIB_DIR}/libmat.dylib" - AND EXISTS "${MATSDK_LIB_DIR}/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/libmat.a") + AND NOT EXISTS "${MATSDK_LIB_DIR}/libmat.so" + AND (EXISTS "${MATSDK_LIB_DIR}/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/libmat.a" + OR EXISTS "${MATSDK_LIB_DIR}/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/libmat.so")) set(MATSDK_LIB_DIR "${MATSDK_LIB_DIR}/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu" CACHE PATH "MSTelemetry library directory" FORCE) endif() diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 12e00e745..eb155ccb4 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -292,7 +292,7 @@ endif() ################################################################################################ # Build the library ################################################################################################ -if(BUILD_SHARED_LIBS STREQUAL "ON") +if(BUILD_SHARED_LIBS) message(STATUS "Building shared SDK library") add_library(mat SHARED ${SRCS}) else() From d0a8dc8bd830f285c0f6711270656a7769b8aa17 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 01:17:15 -0500 Subject: [PATCH 28/39] Address Copilot Android bundled dependency PIC comments Comments 3338994983/3338995007: Android legacy builds compile bundled sqlite3/zlib as static libraries, which can be linked into shared mat when BUILD_SHARED_LIBS is ON. Enable POSITION_INDEPENDENT_CODE on both bundled targets to avoid relocation failures. Verified at lib/CMakeLists.txt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lib/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index eb155ccb4..b3edafbb2 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -333,6 +333,7 @@ else() # Android NDK has no system sqlite3 or zlib — build from bundled source. add_library(sqlite3_bundled STATIC "${CMAKE_CURRENT_SOURCE_DIR}/../sqlite/sqlite3.c") target_include_directories(sqlite3_bundled PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../sqlite") + set_target_properties(sqlite3_bundled PROPERTIES POSITION_INDEPENDENT_CODE ON) # When -ffast-math is enabled globally, re-enable finite math for sqlite3 (uses INFINITY macro). # Also suppress warnings treated as errors in vendored code. target_compile_options(sqlite3_bundled PRIVATE -fno-finite-math-only -Wno-unused-function) @@ -359,6 +360,7 @@ else() "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/simd_stub.c" ) target_include_directories(zlib_bundled PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../zlib") + set_target_properties(zlib_bundled PROPERTIES POSITION_INDEPENDENT_CODE ON) # Bundled zlib 1.2.11 uses K&R-style function definitions and POSIX functions # (close/read/write) without explicit includes; suppress warnings from # vendored code we don't modify. From 8709381087b7da11d209720894b07a5b54018a29 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 01:23:20 -0500 Subject: [PATCH 29/39] Address Copilot curl platform docs comment Comment 3339078002: dependency docs described curl as Linux-only, but the port manifest enables curl on any non-Windows, non-Apple, non-Android platform. Broaden the docs wording to match the vcpkg platform expression. Verified at tools/ports/mstelemetry/vcpkg.json and docs/building-with-vcpkg.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/building-with-vcpkg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/building-with-vcpkg.md b/docs/building-with-vcpkg.md index aaa831351..83fe5d14b 100644 --- a/docs/building-with-vcpkg.md +++ b/docs/building-with-vcpkg.md @@ -104,7 +104,7 @@ The vcpkg port automatically resolves the following dependencies: | SQLite3 | `sqlite3` | `unofficial::sqlite3::sqlite3` | All | | zlib | `zlib` | `ZLIB::ZLIB` | All | | nlohmann JSON | `nlohmann-json` | `nlohmann_json::nlohmann_json` | All | -| libcurl | `curl[ssl]` | `CURL::libcurl` | Linux | +| libcurl | `curl[ssl]` | `CURL::libcurl` | Non-Windows, non-Apple, non-Android | Windows, macOS/iOS, and Android use platform-native HTTP clients (WinInet, NSURLSession, and HttpClient_Android respectively), so curl is not required From 37a154c2e9ad5cb67efe03dd2a283b027a5786a5 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 01:42:32 -0500 Subject: [PATCH 30/39] Address Copilot Obj-C optional module availability comments Comments 3339140694/3339140734: ODWLogger.mm inferred PrivacyGuard/Sanitizer availability from header presence, which could compile hard references even when BUILD_PRIVACYGUARD or BUILD_SANITIZER disabled the corresponding wrapper sources. Drive the macros from CMake instead and default them to unavailable outside that build path. Verified at lib/CMakeLists.txt and wrappers/obj-c/ODWLogger.mm. Validation: - CMake configure on Windows legacy path - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lib/CMakeLists.txt | 25 ++++++++++++++++++++++--- wrappers/obj-c/ODWLogger.mm | 18 ++++++++++-------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index b3edafbb2..a364a3f01 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -143,6 +143,9 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) endif() endif() +set(MATSDK_OBJC_PRIVACYGUARD_AVAILABLE OFF) +set(MATSDK_OBJC_SANITIZER_AVAILABLE OFF) + if(PAL_IMPLEMENTATION STREQUAL "CPP11") if(APPLE) list(APPEND SRCS @@ -208,13 +211,15 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") ) endif() if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) - list(APPEND SRCS - ../wrappers/obj-c/ODWCommonDataContext.mm - ../wrappers/obj-c/ODWPrivacyGuard.mm + set(MATSDK_OBJC_PRIVACYGUARD_AVAILABLE ON) + list(APPEND SRCS + ../wrappers/obj-c/ODWCommonDataContext.mm + ../wrappers/obj-c/ODWPrivacyGuard.mm ../wrappers/obj-c/ODWPrivacyGuardInitConfig.mm ) endif() if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) + set(MATSDK_OBJC_SANITIZER_AVAILABLE ON) list(APPEND SRCS ../wrappers/obj-c/ODWSanitizerInitConfig.mm ../wrappers/obj-c/ODWSanitizer.mm @@ -315,6 +320,20 @@ target_include_directories(mat ${CMAKE_CURRENT_SOURCE_DIR}/utils ) +if(APPLE AND BUILD_OBJC_WRAPPER) + if(MATSDK_OBJC_PRIVACYGUARD_AVAILABLE) + target_compile_definitions(mat PRIVATE MATSDK_OBJC_PRIVACYGUARD_AVAILABLE=1) + else() + target_compile_definitions(mat PRIVATE MATSDK_OBJC_PRIVACYGUARD_AVAILABLE=0) + endif() + + if(MATSDK_OBJC_SANITIZER_AVAILABLE) + target_compile_definitions(mat PRIVATE MATSDK_OBJC_SANITIZER_AVAILABLE=1) + else() + target_compile_definitions(mat PRIVATE MATSDK_OBJC_SANITIZER_AVAILABLE=0) + endif() +endif() + ################################################################################################ # Link dependencies ################################################################################################ diff --git a/wrappers/obj-c/ODWLogger.mm b/wrappers/obj-c/ODWLogger.mm index ee6b3ad25..9a341d0c7 100644 --- a/wrappers/obj-c/ODWLogger.mm +++ b/wrappers/obj-c/ODWLogger.mm @@ -10,20 +10,22 @@ #import "ODWSemanticContext.h" #import "ODWSemanticContext_private.h" -#if __has_include("PrivacyGuard.hpp") -#define MATSDK_OBJC_PRIVACYGUARD_AVAILABLE 1 -#import "ODWPrivacyGuard_private.h" -#else +#ifndef MATSDK_OBJC_PRIVACYGUARD_AVAILABLE #define MATSDK_OBJC_PRIVACYGUARD_AVAILABLE 0 #endif -#if __has_include("Sanitizer.hpp") -#define MATSDK_OBJC_SANITIZER_AVAILABLE 1 -#import "ODWSanitizer_private.h" -#else +#if MATSDK_OBJC_PRIVACYGUARD_AVAILABLE +#import "ODWPrivacyGuard_private.h" +#endif + +#ifndef MATSDK_OBJC_SANITIZER_AVAILABLE #define MATSDK_OBJC_SANITIZER_AVAILABLE 0 #endif +#if MATSDK_OBJC_SANITIZER_AVAILABLE +#import "ODWSanitizer_private.h" +#endif + #include "EventProperties.hpp" using namespace MAT; From 12958931ac1190371f699f0a620f19091853ea0c Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 02:06:31 -0500 Subject: [PATCH 31/39] Point overlay port at current PR source Local review found the overlay port was still downloading an older source snapshot, so vcpkg validation could pass without exercising the current PR code. Update the REF/SHA512 to the current PR source archive and validate the Windows overlay-port consumer against that archive. Validation: - tests/vcpkg/test-vcpkg-windows.ps1 -VcpkgRoot tools/vcpkg - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tools/ports/mstelemetry/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ports/mstelemetry/portfile.cmake b/tools/ports/mstelemetry/portfile.cmake index 27f690f9f..f218a7d13 100644 --- a/tools/ports/mstelemetry/portfile.cmake +++ b/tools/ports/mstelemetry/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/cpp_client_telemetry - REF a20abe010a075fdcb9a8804048a7827d34fd040d - SHA512 d5f45e6aab5d295ad3ad665b7e850a760c4d2419c06e7fe302b97e35c0c737794aaa920d6fa95c9c81546c7d38d00624a178920d672e1970b5534f39d0c5e490 + REF 37a154c2e9ad5cb67efe03dd2a283b027a5786a5 + SHA512 e9712f42430845c8f94c0808813a1896d0c72bd435cc681ea6eaf52efe812d5f383f0d33bc2167a5ebb160cffab346e471be2ea8cab062fae9b4275ccf91b154 HEAD_REF main ) From 1827a39a05a447dd3216256f64653e10a3f9a53e Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 02:15:38 -0500 Subject: [PATCH 32/39] Address Copilot iOS simulator host-arch comment Comment 3339226785: --simulator always builds arm64-ios-simulator, which cannot run on Intel macOS. Add an early Apple Silicon capability check that also allows Rosetta shells on Apple Silicon via hw.optional.arm64. Verified at tests/vcpkg/test-vcpkg-ios.sh. Validation: - bash -n tests/vcpkg/test-vcpkg-ios.sh - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/vcpkg/test-vcpkg-ios.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/vcpkg/test-vcpkg-ios.sh b/tests/vcpkg/test-vcpkg-ios.sh index c779ef27f..83d79c095 100755 --- a/tests/vcpkg/test-vcpkg-ios.sh +++ b/tests/vcpkg/test-vcpkg-ios.sh @@ -44,6 +44,13 @@ if [ "$(uname)" != "Darwin" ]; then exit 1 fi +HAS_ARM64_HARDWARE="$(sysctl -n hw.optional.arm64 2>/dev/null || echo 0)" +if [ "${USE_SIMULATOR}" = true ] && [ "$(uname -m)" != "arm64" ] && [ "${HAS_ARM64_HARDWARE}" != "1" ]; then + echo "ERROR: --simulator builds arm64-ios-simulator and requires an Apple Silicon macOS host." + echo " Use the default device cross-compile mode on Intel macOS." + exit 1 +fi + if ! command -v python3 &> /dev/null; then echo "ERROR: python3 is required for simulator device detection but was not found." exit 1 From 4f97c68c8970ed7398ac54aa1b6cf2ea1a6d8432 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 02:23:42 -0500 Subject: [PATCH 33/39] Address Copilot Obj-C init config and Apple HTTP comments Comment 3339346904: APPLE_HTTP was defined in two locations. Remove the duplicate later block and keep the definition near the BUILD_APPLE_HTTP option. Verified at CMakeLists.txt. Comment 3339346945: ODWLogger.h exposes PrivacyGuard/Sanitizer init-config types even when module-backed wrappers are disabled. Always compile the init-config/support classes with BUILD_OBJC_WRAPPER, and keep only the module-backed wrapper implementations conditional. Verified at lib/CMakeLists.txt. Validation: - CMake configure on Windows legacy path - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 4 ---- lib/CMakeLists.txt | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59da5780a..76c232fd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,10 +349,6 @@ if(BUILD_UNIT_TESTS OR BUILD_FUNC_TESTS) add_library(gmock STATIC IMPORTED GLOBAL) endif() -if(BUILD_APPLE_HTTP) - add_definitions(-DAPPLE_HTTP=1) -endif() - # Bond Lite subdirectories include_directories(bondlite/include) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index a364a3f01..86199035c 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -204,6 +204,9 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") ../wrappers/obj-c/ODWEventProperties.mm ../wrappers/obj-c/ODWLogConfiguration.mm ../wrappers/obj-c/ODWSemanticContext.mm + ../wrappers/obj-c/ODWCommonDataContext.mm + ../wrappers/obj-c/ODWPrivacyGuardInitConfig.mm + ../wrappers/obj-c/ODWSanitizerInitConfig.mm ) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/dataviewer/") list(APPEND SRCS @@ -213,15 +216,12 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/privacyguard/" AND BUILD_PRIVACYGUARD) set(MATSDK_OBJC_PRIVACYGUARD_AVAILABLE ON) list(APPEND SRCS - ../wrappers/obj-c/ODWCommonDataContext.mm ../wrappers/obj-c/ODWPrivacyGuard.mm - ../wrappers/obj-c/ODWPrivacyGuardInitConfig.mm ) endif() if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND BUILD_SANITIZER) set(MATSDK_OBJC_SANITIZER_AVAILABLE ON) list(APPEND SRCS - ../wrappers/obj-c/ODWSanitizerInitConfig.mm ../wrappers/obj-c/ODWSanitizer.mm ) endif() From 3040174a2334a8ddac56e55385141dea7de1f35d Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 02:33:50 -0500 Subject: [PATCH 34/39] Refresh overlay port source after review fixes Update the overlay port REF/SHA512 so vcpkg validation downloads the current PR source snapshot that includes the latest review fixes. Validation: - tests/vcpkg/test-vcpkg-windows.ps1 -VcpkgRoot tools/vcpkg Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tools/ports/mstelemetry/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ports/mstelemetry/portfile.cmake b/tools/ports/mstelemetry/portfile.cmake index f218a7d13..57c453996 100644 --- a/tools/ports/mstelemetry/portfile.cmake +++ b/tools/ports/mstelemetry/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/cpp_client_telemetry - REF 37a154c2e9ad5cb67efe03dd2a283b027a5786a5 - SHA512 e9712f42430845c8f94c0808813a1896d0c72bd435cc681ea6eaf52efe812d5f383f0d33bc2167a5ebb160cffab346e471be2ea8cab062fae9b4275ccf91b154 + REF 4f97c68c8970ed7398ac54aa1b6cf2ea1a6d8432 + SHA512 aaf1d174af6eff61cbd9058ee3f72b7d2232911a63bea6f16e7aed5f9ce215662a102a01c366ad1bebac323dccb4cb6a6d5acce4bc1cecdc0228e1bf7bcd7b82 HEAD_REF main ) From ce1e416c991ff0b21ada40afaf79947db72b350f Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 02:40:48 -0500 Subject: [PATCH 35/39] Address Copilot simulator creation hint comment Comment 3339435283: the simctl create hint omitted the required runtime identifier. Replace the invalid one-liner with guidance to use Xcode Devices and Simulators or list device/runtime identifiers before creating a simulator. Verified at tests/vcpkg/test-vcpkg-ios.sh. Validation: - bash -n tests/vcpkg/test-vcpkg-ios.sh - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/vcpkg/test-vcpkg-ios.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vcpkg/test-vcpkg-ios.sh b/tests/vcpkg/test-vcpkg-ios.sh index 83d79c095..49133d418 100755 --- a/tests/vcpkg/test-vcpkg-ios.sh +++ b/tests/vcpkg/test-vcpkg-ios.sh @@ -130,7 +130,10 @@ print('') if [ -z "${DEVICE_UDID}" ]; then echo "ERROR: No available iPhone simulator found." - echo "Create one with: xcrun simctl create 'Test iPhone' 'iPhone 15'" + echo "Create one in Xcode's Devices and Simulators window, or use:" + echo " xcrun simctl list devicetypes" + echo " xcrun simctl list runtimes" + echo " xcrun simctl create " exit 1 fi From 88ad7460b751a9a4fa21526c9a4dc93a05644a88 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 14:46:23 -0500 Subject: [PATCH 36/39] Address Copilot Swift settings comments Comments 3339555065/3339555113: Package.swift defined MATSDK_DATAVIEWER_AVAILABLE and MATSDK_SANITIZER_AVAILABLE, but no Swift sources read those compilation conditions. Remove the unused defines and keep source exclusion as the availability mechanism. Keep MATSDK_PRIVACYGUARD_AVAILABLE because Logger.swift uses it. Verified at wrappers/swift/Package.swift and wrappers/swift/Sources/OneDSSwift/Logger.swift. Comment 3339555134: no code change. add_compile_definitions requires newer CMake than the 3.5 compatibility target, so zlib must keep add_definitions here. Verified against CMake compatibility requirements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- wrappers/swift/Package.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wrappers/swift/Package.swift b/wrappers/swift/Package.swift index db5a19275..879943354 100644 --- a/wrappers/swift/Package.swift +++ b/wrappers/swift/Package.swift @@ -17,9 +17,7 @@ let hasSanitizer = moduleExists("../../lib/modules/sanitizer") var excludedSources: [String] = [] var swiftSettings: [SwiftSetting] = [] -if hasDiagnosticDataViewer { - swiftSettings.append(.define("MATSDK_DATAVIEWER_AVAILABLE")) -} else { +if !hasDiagnosticDataViewer { excludedSources.append("DiagnosticDataViewer.swift") } @@ -33,9 +31,7 @@ if hasPrivacyGuard { ]) } -if hasSanitizer { - swiftSettings.append(.define("MATSDK_SANITIZER_AVAILABLE")) -} else { +if !hasSanitizer { excludedSources.append(contentsOf: [ "Sanitizer.swift", "SanitizerInitConfig.swift", From fd9bb221f5d8146db021ee1787539af77f418ff0 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 14:49:07 -0500 Subject: [PATCH 37/39] Refresh overlay port source after Swift cleanup Update the overlay port REF/SHA512 so the downloaded source snapshot includes the latest Swift package cleanup. This keeps overlay-port validation aligned with the source-bearing PR commits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tools/ports/mstelemetry/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ports/mstelemetry/portfile.cmake b/tools/ports/mstelemetry/portfile.cmake index 57c453996..a07c7a241 100644 --- a/tools/ports/mstelemetry/portfile.cmake +++ b/tools/ports/mstelemetry/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/cpp_client_telemetry - REF 4f97c68c8970ed7398ac54aa1b6cf2ea1a6d8432 - SHA512 aaf1d174af6eff61cbd9058ee3f72b7d2232911a63bea6f16e7aed5f9ce215662a102a01c366ad1bebac323dccb4cb6a6d5acce4bc1cecdc0228e1bf7bcd7b82 + REF 88ad7460b751a9a4fa21526c9a4dc93a05644a88 + SHA512 3db85330ccdab857e28854d2b13668133e69232a363747832072ac49d68da9d24cc6ba2a088ea4223465f19afed100a51085da9f535ec6334ac24ec6cf0228c4 HEAD_REF main ) From dc53d660024772cd6fd858f7897ff124c2330c28 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 15:02:11 -0500 Subject: [PATCH 38/39] Address Copilot port support and sqlite comment issues Comment 3344040029: the vcpkg port supported any non-UWP target even though the repo only supports Windows, Linux, macOS, iOS, and Android. Restrict the supports expression to those platforms and still exclude UWP. Verified at tools/ports/mstelemetry/vcpkg.json. Comment 3344040085: sqlite3_bundled comment implied this SDK enables -ffast-math. Reword it to describe guarding against toolchain/environment finite-math-only flags. Verified at lib/CMakeLists.txt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lib/CMakeLists.txt | 2 +- tools/ports/mstelemetry/vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 86199035c..9058cf362 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -353,7 +353,7 @@ else() add_library(sqlite3_bundled STATIC "${CMAKE_CURRENT_SOURCE_DIR}/../sqlite/sqlite3.c") target_include_directories(sqlite3_bundled PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../sqlite") set_target_properties(sqlite3_bundled PROPERTIES POSITION_INDEPENDENT_CODE ON) - # When -ffast-math is enabled globally, re-enable finite math for sqlite3 (uses INFINITY macro). + # Guard bundled sqlite3 against toolchain or environment flags that imply finite-math-only (uses INFINITY macro). # Also suppress warnings treated as errors in vendored code. target_compile_options(sqlite3_bundled PRIVATE -fno-finite-math-only -Wno-unused-function) diff --git a/tools/ports/mstelemetry/vcpkg.json b/tools/ports/mstelemetry/vcpkg.json index 50d270b43..05341157b 100644 --- a/tools/ports/mstelemetry/vcpkg.json +++ b/tools/ports/mstelemetry/vcpkg.json @@ -5,7 +5,7 @@ "description": "Microsoft 1DS C/C++ Client Telemetry Library", "homepage": "https://github.com/microsoft/cpp_client_telemetry", "license": "Apache-2.0", - "supports": "!uwp", + "supports": "(windows | linux | osx | ios | android) & !uwp", "dependencies": [ "nlohmann-json", "sqlite3", From 6566897c1e0b226a5b2cbb7c5932ecbc38f2ed4f Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 2 Jun 2026 15:08:50 -0500 Subject: [PATCH 39/39] Refresh overlay port source after support restriction Update the overlay port REF/SHA512 so vcpkg validation downloads the source snapshot that includes the latest supports-expression and comment fixes. Validation: - tests/vcpkg/test-vcpkg-windows.ps1 -VcpkgRoot tools/vcpkg Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tools/ports/mstelemetry/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ports/mstelemetry/portfile.cmake b/tools/ports/mstelemetry/portfile.cmake index a07c7a241..648506b40 100644 --- a/tools/ports/mstelemetry/portfile.cmake +++ b/tools/ports/mstelemetry/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/cpp_client_telemetry - REF 88ad7460b751a9a4fa21526c9a4dc93a05644a88 - SHA512 3db85330ccdab857e28854d2b13668133e69232a363747832072ac49d68da9d24cc6ba2a088ea4223465f19afed100a51085da9f535ec6334ac24ec6cf0228c4 + REF dc53d660024772cd6fd858f7897ff124c2330c28 + SHA512 a8c70f4cc1a3f4dc88a0c5ed3bf2992bad7e85f1cf75238f1a608bc726f9c5317c8a549aeb2174022cf79bbe77a14940f687cc7cdbcbdeb5afd1b2db3944e174 HEAD_REF main )