From 0fe40ec263b1f0a26baf5fcd9268a6b9cfc2f1e0 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 29 Apr 2026 13:59:43 -0700 Subject: [PATCH 01/10] 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 500d966f6..ffa49633a 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 50f4e2427..87b0b5b53 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 22f2ac5d9..e19381a72 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 579c52a83..12f44eae7 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 ecd10fa645872211b9920eca2552d349cf8f50e1 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Thu, 30 Apr 2026 06:57:19 -0700 Subject: [PATCH 02/10] 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 5ab2691552cf9fb0fe0bb05dc90a3a274701dd7c Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 15:23:36 -0500 Subject: [PATCH 03/10] 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 aeb72ae0e87a294b65368f429db5386e3fe73f80 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 17:09:41 -0500 Subject: [PATCH 04/10] 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 edae32828f706fda21f038d82bd040dc4005db3a Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 18:01:29 -0500 Subject: [PATCH 05/10] 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 826cc9a031b57b1f1f0e4eefc96c62e0e61238f3 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 18:41:17 -0500 Subject: [PATCH 06/10] 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 a8cddc6dd76290a577041ce5717f3af657657505 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 29 Apr 2026 14:37:42 -0700 Subject: [PATCH 07/10] 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 | 236 +- 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 | 250 +- 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 | 5707 ----------------- 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, 2009 insertions(+), 6579 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 3117d4b29..60b19d36a 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) @@ -16,14 +17,25 @@ 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 set(CMAKE_CXX_STANDARD 14) +# Uncomment these for stricter C++14 enforcement. Left commented out to avoid +# breaking older toolchains that may only partially support C++14. +# set(CMAKE_CXX_STANDARD_REQUIRED ON) +# set(CMAKE_CXX_EXTENSIONS OFF) if (NOT TARGET_ARCH) set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) 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") @@ -35,75 +47,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}") @@ -114,14 +137,23 @@ 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 # 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") + # -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") @@ -149,13 +181,13 @@ 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}") + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} -std=c++11 ${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} -std=c++11 ${DBG_FLAGS}") + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS} -std=c++11 ${DBG_FLAGS} ${CXX_EXTRA_WARN_FLAGS}") endif() #Remove /Zi for Win32 debug compiler issue @@ -180,7 +212,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) @@ -212,7 +248,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() @@ -244,26 +280,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) @@ -288,6 +305,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) @@ -309,10 +365,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 8824427b4..e697a5a17 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}/../third_party/Reachability ${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}/../third_party/Reachability ${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 @@ -174,11 +182,18 @@ if(PAL_IMPLEMENTATION STREQUAL "CPP11") ../third_party/Reachability/ODWReachability.m ) 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") @@ -232,8 +247,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 @@ -269,73 +286,184 @@ 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") - - # include(FindCURL) - # find_package(CURL REQUIRED) - # set(CMAKE_REQUIRED_LIBRARIES "${CURL_LIBRARIES}") - - # find_package(sqlite3 REQUIRED) - add_library(mat SHARED ${SRCS}) +else() + message(STATUS "Building static SDK library") + add_library(mat STATIC ${SRCS}) +endif() - # 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" - ) - endif() +# 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 +) - # - # 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 +################################################################################################ +# 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) + + # 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" + ) + 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) + + 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 3913521ef..000000000 --- a/tools/ports/mstelemetry/v142-build.patch +++ /dev/null @@ -1,5707 +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,1218 @@ -- -- -- -- -- 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 5a1a11a6b6bb3effd9424356a685e7368e83ced7 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 20:48:09 -0500 Subject: [PATCH 08/10] 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 60b19d36a..9987743de 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 1a3c3ff7c..16a707059 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 c857e4be59ab1bd211b9a0884abcaf96d52ba3ac Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Fri, 1 May 2026 20:54:08 -0500 Subject: [PATCH 09/10] 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 16a707059..e0ec462fe 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -249,10 +249,10 @@ if(HAVE_OFF64_T) endif() -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) # For x64 online -add_compile_definitions(WIN64) +add_definitions(-DWIN64) From e6fd7e3855fa5adb562077657709171987893072 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Sat, 2 May 2026 16:34:03 -0500 Subject: [PATCH 10/10] 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 | 21 ++++++++++++--------- tests/functests/CMakeLists.txt | 2 +- tests/unittests/CMakeLists.txt | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e697a5a17..15b7832b4 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -375,15 +375,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() @@ -466,4 +470,3 @@ else() ) message(STATUS "Library will be installed to ${CMAKE_INSTALL_LIBDIR}") endif() - diff --git a/tests/functests/CMakeLists.txt b/tests/functests/CMakeLists.txt index cb295e5c8..58b06dff1 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 1b29db3bf..631c19f6a 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)