From 45792857d76957cb527ee6bc4a2322677b65c891 Mon Sep 17 00:00:00 2001 From: James Robert Hawk Date: Fri, 10 Jul 2026 12:45:39 +0000 Subject: [PATCH 1/6] Align install rules with other carbon components and add v145 support. Make CLI building a feature Ensure yaml-cpp is statically linked Remove teamcity workaround for management of documentation feature Retire customized toolchain and use centralised ones Add support for v145 toolset builds --- .teamcity/MacOS/Project.kt | 2 +- .teamcity/Windows/Project.kt | 13 +- CMakeLists.txt | 182 +++++++++++------- CMakePresets.json | 65 ++++++- cli/CMakeLists.txt | 21 +- .../toolchains/arm64-osx-carbon.cmake | 56 ------ .../toolchains/arm64-osx-triplet.cmake | 4 - .../toolchains/x64-osx-carbon.cmake | 56 ------ .../toolchains/x64-osx-triplet.cmake | 4 - .../toolchains/x64-windows-carbon.cmake | 60 ------ .../toolchains/x64-windows-triplet.cmake | 4 - .../triplets/arm64-osx-debug.cmake | 62 ------ .../triplets/arm64-osx-internal.cmake | 62 ------ .../triplets/arm64-osx-release.cmake | 62 ------ .../triplets/arm64-osx-trinitydev.cmake | 62 ------ .../triplets/x64-osx-debug.cmake | 62 ------ .../triplets/x64-osx-internal.cmake | 62 ------ .../triplets/x64-osx-release.cmake | 62 ------ .../triplets/x64-osx-trinitydev.cmake | 62 ------ .../triplets/x64-windows-debug.cmake | 62 ------ .../triplets/x64-windows-internal.cmake | 62 ------ .../triplets/x64-windows-release.cmake | 62 ------ .../triplets/x64-windows-trinitydev.cmake | 62 ------ tests/CMakeLists.txt | 50 +++-- tools/CMakeLists.txt | 6 +- vcpkg-configuration.json | 2 +- vcpkg.json | 30 ++- vendor/github.com/carbonengine/vcpkg-registry | 2 +- vendor/github.com/microsoft/vcpkg | 2 +- 29 files changed, 248 insertions(+), 1055 deletions(-) delete mode 100644 customized_toolchain/toolchains/arm64-osx-carbon.cmake delete mode 100644 customized_toolchain/toolchains/arm64-osx-triplet.cmake delete mode 100644 customized_toolchain/toolchains/x64-osx-carbon.cmake delete mode 100644 customized_toolchain/toolchains/x64-osx-triplet.cmake delete mode 100644 customized_toolchain/toolchains/x64-windows-carbon.cmake delete mode 100644 customized_toolchain/toolchains/x64-windows-triplet.cmake delete mode 100644 customized_toolchain/triplets/arm64-osx-debug.cmake delete mode 100644 customized_toolchain/triplets/arm64-osx-internal.cmake delete mode 100644 customized_toolchain/triplets/arm64-osx-release.cmake delete mode 100644 customized_toolchain/triplets/arm64-osx-trinitydev.cmake delete mode 100644 customized_toolchain/triplets/x64-osx-debug.cmake delete mode 100644 customized_toolchain/triplets/x64-osx-internal.cmake delete mode 100644 customized_toolchain/triplets/x64-osx-release.cmake delete mode 100644 customized_toolchain/triplets/x64-osx-trinitydev.cmake delete mode 100644 customized_toolchain/triplets/x64-windows-debug.cmake delete mode 100644 customized_toolchain/triplets/x64-windows-internal.cmake delete mode 100644 customized_toolchain/triplets/x64-windows-release.cmake delete mode 100644 customized_toolchain/triplets/x64-windows-trinitydev.cmake diff --git a/.teamcity/MacOS/Project.kt b/.teamcity/MacOS/Project.kt index db04686..b63c334 100644 --- a/.teamcity/MacOS/Project.kt +++ b/.teamcity/MacOS/Project.kt @@ -104,7 +104,7 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag exec { name = "Configure" path = "cmake" - arguments = "--preset %env.CMAKE_PRESET% -S %teamcity.build.checkoutDir%/%github_checkout_folder% -B %env.CMAKE_BUILD_FOLDER% -DINSTALL_TO_MONOLITH=ON -DCMAKE_INSTALL_PREFIX=%env.CMAKE_INSTALL_PREFIX% -DVCPKG_INSTALL_OPTIONS=--x-buildtrees-root=%teamcity.build.checkoutDir%/%github_checkout_folder%/buildtrees" + arguments = "--preset %env.CMAKE_PRESET% -S %teamcity.build.checkoutDir%/%github_checkout_folder% -B %env.CMAKE_BUILD_FOLDER% -DINSTALL_TO_MONOLITH=ON -DBUILD_CLI=ON -DBUILD_TESTING=ON -DBUILD_DOCUMENTATION=ON -DCMAKE_INSTALL_PREFIX=%env.CMAKE_INSTALL_PREFIX% -DVCPKG_INSTALL_OPTIONS=--x-buildtrees-root=%teamcity.build.checkoutDir%/%github_checkout_folder%/buildtrees" } exec { name = "Build" diff --git a/.teamcity/Windows/Project.kt b/.teamcity/Windows/Project.kt index 6433401..c5f5061 100644 --- a/.teamcity/Windows/Project.kt +++ b/.teamcity/Windows/Project.kt @@ -26,6 +26,11 @@ val TrinityDev = CarbonBuildWindows("TrinityDev Windows", "TrinityDev", "x64-win val Release = CarbonBuildWindows("Release Windows", "Release", "x64-windows-release") val ReleaseDevFeatures = CarbonBuildWindows("Release Windows with Dev Features", "Release", "x64-windows-release-with-dev-features") +val Debug_v145 = CarbonBuildWindows("Debug Windows v145", "Debug", "x64-windows-v145-debug", "-arch=x64 -vcvars_ver=14.51") +val Internal_v145 = CarbonBuildWindows("Internal Windows v145", "Internal", "x64-windows-v145-internal", "-arch=x64 -vcvars_ver=14.51") +val TrinityDev_v145 = CarbonBuildWindows("TrinityDev Windows v145", "TrinityDev", "x64-windows-v145-trinitydev", "-arch=x64 -vcvars_ver=14.51") +val Release_v145 = CarbonBuildWindows("Release Windows v145", "Release", "x64-windows-v145-release", "-arch=x64 -vcvars_ver=14.51") + object Project : Project({ id("Windows") name = "Windows" @@ -35,6 +40,12 @@ object Project : Project({ buildType(TrinityDev) buildType(Release) buildType(ReleaseDevFeatures) + + buildType(Debug_v145) + buildType(Internal_v145) + buildType(TrinityDev_v145) + buildType(Release_v145) + buildType(ReleaseDevFeatures_v145) }) @@ -101,7 +112,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) exec { name = "Configure" path = "cmake" - arguments = "--preset %env.CMAKE_PRESET% -S %teamcity.build.checkoutDir%/%github_checkout_folder% -B %env.CMAKE_BUILD_FOLDER% -DINSTALL_TO_MONOLITH=ON -DCMAKE_INSTALL_PREFIX=%env.CMAKE_INSTALL_PREFIX% -DVCPKG_INSTALL_OPTIONS=--x-buildtrees-root=%teamcity.build.checkoutDir%/%github_checkout_folder%/buildtrees" + arguments = "--preset %env.CMAKE_PRESET% -S %teamcity.build.checkoutDir%/%github_checkout_folder% -B %env.CMAKE_BUILD_FOLDER% -DINSTALL_TO_MONOLITH=ON -DBUILD_CLI=ON -DBUILD_TESTING=ON -DBUILD_DOCUMENTATION=ON -DCMAKE_INSTALL_PREFIX=%env.CMAKE_INSTALL_PREFIX% -DVCPKG_INSTALL_OPTIONS=--x-buildtrees-root=%teamcity.build.checkoutDir%/%github_checkout_folder%/buildtrees" } exec { name = "Build" diff --git a/CMakeLists.txt b/CMakeLists.txt index e0525bc..ce45041 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,22 @@ # Copyright © 2025 CCP ehf. -cmake_minimum_required(VERSION 3.31.0) +cmake_minimum_required(VERSION 3.31.1) + +option(BUILD_CLI "Build CLI." OFF) +if (BUILD_CLI) + list(APPEND VCPKG_MANIFEST_FEATURES "cli") +endif() + +option(BUILD_DOCUMENTATION "Build Documentation." OFF) +if (BUILD_DOCUMENTATION) + list(APPEND VCPKG_MANIFEST_FEATURES "docs") +endif() + +option(BUILD_TESTING "Build and run tests." OFF) +if (BUILD_TESTING) + list(APPEND VCPKG_MANIFEST_FEATURES "tests") +endif() + project(resources VERSION 4.3.1) include(cmake/CcpTargetConfigurations.cmake) @@ -13,55 +29,58 @@ find_package(yaml-cpp CONFIG REQUIRED) # Add subdirectory for resource tools static library add_subdirectory(tools) -set(SRC_FILES - include/BundleResourceGroup.h - include/Exports.h - include/PatchResourceGroup.h - include/ResourceGroup.h - include/Enums.h - include/Version.h - - src/BundleResourceGroup.cpp - src/BundleResourceGroupImpl.cpp - src/BundleResourceGroupImpl.h - src/PatchResourceGroup.cpp - src/PatchResourceGroupImpl.cpp - src/PatchResourceGroupImpl.h - src/ResourceGroup.cpp - src/ResourceGroupFactory.h - src/ResourceGroupFactory.cpp - src/ResourceGroupImpl.cpp - src/ResourceGroupImpl.h - src/Enums.cpp - src/VersionInternal.h - src/VersionInternal.cpp - - src/ResourceInfo/BundleResourceInfo.cpp - src/ResourceInfo/BundleResourceInfo.h - src/ResourceInfo/PatchResourceInfo.cpp - src/ResourceInfo/PatchResourceInfo.h - src/ResourceInfo/ResourceInfo.cpp - src/ResourceInfo/ResourceInfo.h - src/ResourceInfo/ResourceGroupInfo.h - src/ResourceInfo/ResourceGroupInfo.cpp - src/ResourceInfo/PatchResourceGroupInfo.h - src/ResourceInfo/PatchResourceGroupInfo.cpp - src/ResourceInfo/BundleResourceGroupInfo.h - src/ResourceInfo/BundleResourceGroupInfo.cpp - src/StatusSettings.h - src/StatusSettings.cpp - src/ParameterVersion.h - src/ParameterVersion.cpp +set(PUBLIC_HEADER_FILES + include/BundleResourceGroup.h + include/Exports.h + include/PatchResourceGroup.h + include/ResourceGroup.h + include/Enums.h ) -add_library(resources STATIC ${SRC_FILES}) - -target_compile_definitions(resources PRIVATE EXPORT_LIBRARY) - # Version is required in code # Added as config configure_file(src/Version.h.in include/Version.h @ONLY) +set(PUBLIC_GENERATED_VERSION_HEADER_FILE include/Version.h) + +set(SRC_FILES + src/BundleResourceGroup.cpp + src/BundleResourceGroupImpl.cpp + src/BundleResourceGroupImpl.h + src/PatchResourceGroup.cpp + src/PatchResourceGroupImpl.cpp + src/PatchResourceGroupImpl.h + src/ResourceGroup.cpp + src/ResourceGroupFactory.h + src/ResourceGroupFactory.cpp + src/ResourceGroupImpl.cpp + src/ResourceGroupImpl.h + src/Enums.cpp + src/VersionInternal.h + src/VersionInternal.cpp + + src/ResourceInfo/BundleResourceInfo.cpp + src/ResourceInfo/BundleResourceInfo.h + src/ResourceInfo/PatchResourceInfo.cpp + src/ResourceInfo/PatchResourceInfo.h + src/ResourceInfo/ResourceInfo.cpp + src/ResourceInfo/ResourceInfo.h + src/ResourceInfo/ResourceGroupInfo.h + src/ResourceInfo/ResourceGroupInfo.cpp + src/ResourceInfo/PatchResourceGroupInfo.h + src/ResourceInfo/PatchResourceGroupInfo.cpp + src/ResourceInfo/BundleResourceGroupInfo.h + src/ResourceInfo/BundleResourceGroupInfo.cpp + src/StatusSettings.h + src/StatusSettings.cpp + src/ParameterVersion.h + src/ParameterVersion.cpp +) + +add_library(resources STATIC ${SRC_FILES} ${PUBLIC_HEADER_FILES} ${PUBLIC_GENERATED_VERSION_HEADER_FILE}) + +target_compile_definitions(resources PRIVATE EXPORT_LIBRARY) + if (WIN32) target_compile_definitions(resources PRIVATE NOMINMAX) # Do not define min/max macros. endif () @@ -83,11 +102,12 @@ source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${_SOURCES} ) -add_subdirectory(cli) +if(BUILD_CLI) + add_subdirectory(cli) +endif() -# Enable testing based on option set (on by default) +# Enable testing if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - option(BUILD_TESTING "Build and run tests. Enabled by default." ON) if (BUILD_TESTING) include(CTest) add_subdirectory(tests) @@ -96,16 +116,7 @@ endif () # Provide an install target if this is the top level project only if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - # Determine if/when to generate/build documentation. The rules are as follows: - # - If running locally - Build documentation is OFF by default - # - If running on a build agent (TeamCity) - Build documentation is ON by default - # - If -DBUILD_DOCUMENTATION=ON/OFF flag is explicitly set, use it. - set(BUILD_DOCUMENTATION_DEFAULT_FLAG OFF) - if (DEFINED ENV{TEAMCITY_VERSION}) - set(BUILD_DOCUMENTATION_DEFAULT_FLAG ON) - endif () - message(STATUS "Document generation settings: default=${BUILD_DOCUMENTATION_DEFAULT_FLAG}, option BUILD_DOCUMENTATION=${BUILD_DOCUMENTATION}") - option(BUILD_DOCUMENTATION "Build Documentation" ${BUILD_DOCUMENTATION_DEFAULT_FLAG}) + option(INSTALL_TO_MONOLITH "Install this package to a perforce branch vendor folder - provided for backwards compatability" OFF) if (BUILD_DOCUMENTATION) find_package(Python3 COMPONENTS Interpreter REQUIRED) @@ -130,23 +141,52 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) add_dependencies(Sphinx resources) endif () - - # Install rule to ensure that our runtime files are in the expected, platform-specific folder - install( + # Install rule for available public headers + install(FILES ${PUBLIC_HEADER_FILES} DESTINATION include) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PUBLIC_GENERATED_VERSION_HEADER_FILE} DESTINATION include) + + if(INSTALL_TO_MONOLITH) + # Install rule to ensure that our runtime files are in the expected, platform-specific folder + install( + TARGETS resources + EXPORT resourcesTarget + CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES} + LIBRARY DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ + ARCHIVE DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ + RUNTIME DESTINATION bin/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ + ) + install( + TARGETS resources-tools + EXPORT resourcesToolsTarget + CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES} + LIBRARY DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ + ARCHIVE DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ + RUNTIME DESTINATION bin/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ + ) + else() + install( TARGETS resources - EXPORT resourcesTarget + EXPORT ResourcesTargets CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES} - LIBRARY DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ - ARCHIVE DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ - RUNTIME DESTINATION bin/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ - ) - install( + LIBRARY DESTINATION lib/ + ARCHIVE DESTINATION lib/ + RUNTIME DESTINATION bin/ + ) + + install( TARGETS resources-tools - EXPORT resourcesToolsTarget + EXPORT ResourcesTargets CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES} - LIBRARY DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ - ARCHIVE DESTINATION lib/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ - RUNTIME DESTINATION bin/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ - ) + LIBRARY DESTINATION lib/ + ARCHIVE DESTINATION lib/ + RUNTIME DESTINATION bin/ + ) + + install( + EXPORT ResourcesTargets + DESTINATION share/carbon-resources + FILE carbon-resourcesConfig.cmake + ) + endif() endif () diff --git a/CMakePresets.json b/CMakePresets.json index b1daeae..c89c0de 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -13,13 +13,10 @@ "cacheVariables": { "VCPKG_USE_HOST_TOOLS": "ON", "CMAKE_COMPILE_WARNING_AS_ERROR": "ON", - "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/customized_toolchain/triplets", - "BUILD_DOCUMENTATION": "ON", - "BUILD_TESTING": "ON", - "VCPKG_MANIFEST_FEATURES": "tests;docs" + "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/triplets" }, "environment": { - "VCPKG_ROOT": "${sourceDir}/vendor/github.com/microsoft/vcpkg" + "PATH_TO_VCPKG_ROOT": "${sourceDir}/vendor/github.com/microsoft/vcpkg" }, "hidden": true }, @@ -43,11 +40,19 @@ }, "hidden": true }, + { + "name": "x64-windows-v145", + "inherits": "windows", + "cacheVariables": { + "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-windows-145-carbon.cmake" + }, + "hidden": true + }, { "name": "x64-windows", "inherits": "windows", "cacheVariables": { - "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/customized_toolchain/toolchains/x64-windows-carbon.cmake" + "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-windows-carbon.cmake" }, "hidden": true }, @@ -56,7 +61,7 @@ "inherits": "osx", "cacheVariables": { "CMAKE_OSX_ARCHITECTURES": "arm64", - "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/customized_toolchain/toolchains/arm64-osx-carbon.cmake" + "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/arm64-osx-carbon.cmake" }, "hidden": true }, @@ -65,10 +70,54 @@ "inherits": "osx", "cacheVariables": { "CMAKE_OSX_ARCHITECTURES": "x86_64", - "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/customized_toolchain/toolchains/x64-osx-carbon.cmake" + "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-osx-carbon.cmake" }, "hidden": true }, + + { + "name": "x64-windows-v145-internal", + "inherits": "x64-windows-v145", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Internal", + "VCPKG_TARGET_TRIPLET": "x64-windows-145-internal", + "VCPKG_HOST_TRIPLET": "x64-windows-145-internal" + } + }, + { + "name": "x64-windows-v145-release", + "inherits": "x64-windows-v145", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "VCPKG_TARGET_TRIPLET": "x64-windows-145-release", + "VCPKG_HOST_TRIPLET": "x64-windows-145-release" + } + }, + { + "name": "x64-windows-v145-debug", + "inherits": "x64-windows-v145", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "VCPKG_TARGET_TRIPLET": "x64-windows-145-debug", + "VCPKG_HOST_TRIPLET": "x64-windows-145-debug" + } + }, + { + "name": "x64-windows-v145-trinitydev", + "inherits": "x64-windows-v145", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "TrinityDev", + "VCPKG_TARGET_TRIPLET": "x64-windows-145-trinitydev", + "VCPKG_HOST_TRIPLET": "x64-windows-145-trinitydev" + } + }, + { + "name": "x64-windows-release-v145-with-dev-features", + "inherits": "x64-windows-v145", + "cacheVariables": { + "DEV_FEATURES": "ON" + } + }, { "name": "x64-windows-internal", "inherits": "x64-windows", diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 6d35055..e8c75fb 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -49,9 +49,18 @@ endif () set_target_properties(resources-cli PROPERTIES OUTPUT_NAME "resources") # Install rule to ensure that our runtime files are in the expected, platform-specific folder -install( - TARGETS resources-cli - EXPORT resources-cliTarget - CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES} - RUNTIME DESTINATION bin/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ -) \ No newline at end of file +if(INSTALL_TO_MONOLITH) + install( + TARGETS resources-cli + EXPORT resources-cliTarget + CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES} + RUNTIME DESTINATION bin/${CCP_PLATFORM}/${CCP_ARCHITECTURE}/${CCP_TOOLSET}/ + ) +else() + install( + TARGETS resources-cli + EXPORT resources-cliTarget + CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES} + RUNTIME DESTINATION bin/ + ) +endif() \ No newline at end of file diff --git a/customized_toolchain/toolchains/arm64-osx-carbon.cmake b/customized_toolchain/toolchains/arm64-osx-carbon.cmake deleted file mode 100644 index adb6dc9..0000000 --- a/customized_toolchain/toolchains/arm64-osx-carbon.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright © 2025 CCP ehf. -if (NOT _CCP_TOOLCHAIN_FILE_LOADED) - set(_CCP_TOOLCHAIN_FILE_LOADED 1) - - set (VCPKG_USE_HOST_TOOLS ON CACHE STRING "") - set (CMAKE_CXX_STANDARD 20 CACHE STRING "") - set (CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "") - set (CMAKE_CXX_EXTENSIONS OFF CACHE STRING "") - set (CMAKE_POSITION_INDEPENDENT_CODE ON CACHE STRING "") - set (CMAKE_CXX_VISIBILITY_PRESET hidden CACHE STRING "") - set (CMAKE_OBJCXX_VISIBILITY_PRESET hidden CACHE STRING "") - set (CMAKE_XCODE_GENERATE_SCHEME ON CACHE STRING "") - set (CMAKE_INTERPROCEDURAL_OPTIMIZATION ON CACHE STRING "") - set (CMAKE_OSX_DEPLOYMENT_TARGET 10.15 CACHE STRING "") - - #[[ - - `CCP_PLATFORM` indicates the operating system a binary was built for - - `CCP_ARCHITECTURE` indicates the hardware architecture a binary was built for - - `CCP_TOOLSET` indicates the compiler (or toolset) a binary was built with - - `CCP_VENDOR_LIB_PATH` is a convenience variable for find_package modules, to construct the default `lib` folder for a vendored SDK. - - `CCP_VENDOR_BIN_PATH` is the same as CCP_VENDOR_LIB_PATH, but for the `bin` folder for a vendored SDK. - - See Platform Agnostic Developement section of the wiki: - https://ccpgames.atlassian.net/wiki/spaces/PAD/overview?homepageId=171868162 - ]] - set(CCP_PLATFORM "macOS" CACHE STRING "Target Platform") - set(CCP_ARCHITECTURE "arm64" CACHE STRING "Target Architecture") - set(CCP_TOOLSET "AppleClang" CACHE STRING "Target Toolset") - - # adjust warning settings for all our projects, but do not treat them as errors just yet. - add_compile_options(-Wall) - # we want to use the two ones below once we're good with -Wall - # add_compile_options(-Wpedantic) - # add_compile_options(-Wextra) - - # We're using a lot of MSVC specific pragmas in our codebase, so we silence those warnings until we got around to - # cleaning them up - add_compile_options(-Wno-unknown-pragmas) - # There's a surprising amount of unused functions, we need to investigate this deeper at one point - add_compile_options(-Wno-unused-function) - # Ditto, much like the functions there are also a lot of unused variables it appears - add_compile_options(-Wno-unused-variable) - # We've not been very good at keeping order - add_compile_options(-Wno-reorder) - # -Wmissing-braces should only be used by C / ObjectiveC, but for some reason it shows up for our C++ code, too. - add_compile_options(-Wno-missing-braces) - - # Manually add debug symbols to builds - add_compile_options(-g) - - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13") - set(MATH_OPTIMIZE_FLAG -ffast-math -fhonor-infinities -fhonor-nans) - else() - set(MATH_OPTIMIZE_FLAG -ffast-math -ffp-model=fast -fhonor-infinities -fhonor-nans) - endif() -endif () diff --git a/customized_toolchain/toolchains/arm64-osx-triplet.cmake b/customized_toolchain/toolchains/arm64-osx-triplet.cmake deleted file mode 100644 index 5fbaa78..0000000 --- a/customized_toolchain/toolchains/arm64-osx-triplet.cmake +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright © 2025 CCP ehf. -# This toolchain is meant for use inside a vcpkg triplet. See `README.md` for more details. -include($ENV{VCPKG_ROOT}/scripts/toolchains/osx.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-carbon.cmake) diff --git a/customized_toolchain/toolchains/x64-osx-carbon.cmake b/customized_toolchain/toolchains/x64-osx-carbon.cmake deleted file mode 100644 index 57b216b..0000000 --- a/customized_toolchain/toolchains/x64-osx-carbon.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright © 2025 CCP ehf. -if (NOT _CCP_TOOLCHAIN_FILE_LOADED) - set(_CCP_TOOLCHAIN_FILE_LOADED 1) - - set (VCPKG_USE_HOST_TOOLS ON CACHE STRING "") - set (CMAKE_CXX_STANDARD 17 CACHE STRING "") - set (CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "") - set (CMAKE_CXX_EXTENSIONS OFF CACHE STRING "") - set (CMAKE_POSITION_INDEPENDENT_CODE ON CACHE STRING "") - set (CMAKE_CXX_VISIBILITY_PRESET hidden CACHE STRING "") - set (CMAKE_OBJCXX_VISIBILITY_PRESET hidden CACHE STRING "") - set (CMAKE_XCODE_GENERATE_SCHEME ON CACHE STRING "") - set (CMAKE_INTERPROCEDURAL_OPTIMIZATION ON CACHE STRING "") - set (CMAKE_OSX_DEPLOYMENT_TARGET 10.15 CACHE STRING "") - - #[[ - - `CCP_PLATFORM` indicates the operating system a binary was built for - - `CCP_ARCHITECTURE` indicates the hardware architecture a binary was built for - - `CCP_TOOLSET` indicates the compiler (or toolset) a binary was built with - - `CCP_VENDOR_LIB_PATH` is a convenience variable for find_package modules, to construct the default `lib` folder for a vendored SDK. - - `CCP_VENDOR_BIN_PATH` is the same as CCP_VENDOR_LIB_PATH, but for the `bin` folder for a vendored SDK. - - See Platform Agnostic Developement section of the wiki: - https://ccpgames.atlassian.net/wiki/spaces/PAD/overview?homepageId=171868162 - ]] - set(CCP_PLATFORM "macOS" CACHE STRING "Target Platform") - set(CCP_ARCHITECTURE "x64" CACHE STRING "Target Architecture") - set(CCP_TOOLSET "AppleClang" CACHE STRING "Target Toolset") - - # adjust warning settings for all our projects, but do not treat them as errors just yet. - add_compile_options(-Wall) - # we want to use the two ones below once we're good with -Wall - # add_compile_options(-Wpedantic) - # add_compile_options(-Wextra) - - # We're using a lot of MSVC specific pragmas in our codebase, so we silence those warnings until we got around to - # cleaning them up - add_compile_options(-Wno-unknown-pragmas) - # There's a surprising amount of unused functions, we need to investigate this deeper at one point - add_compile_options(-Wno-unused-function) - # Ditto, much like the functions there are also a lot of unused variables it appears - add_compile_options(-Wno-unused-variable) - # We've not been very good at keeping order - add_compile_options(-Wno-reorder) - # -Wmissing-braces should only be used by C / ObjectiveC, but for some reason it shows up for our C++ code, too. - add_compile_options(-Wno-missing-braces) - - # Manually add debug symbols to builds - add_compile_options(-g) - - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13") - set(MATH_OPTIMIZE_FLAG -ffast-math -fhonor-infinities -fhonor-nans) - else() - set(MATH_OPTIMIZE_FLAG -ffast-math -ffp-model=fast -fhonor-infinities -fhonor-nans) - endif() -endif () diff --git a/customized_toolchain/toolchains/x64-osx-triplet.cmake b/customized_toolchain/toolchains/x64-osx-triplet.cmake deleted file mode 100644 index 0d54713..0000000 --- a/customized_toolchain/toolchains/x64-osx-triplet.cmake +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright © 2025 CCP ehf. -# This toolchain is meant for use inside a vcpkg triplet. See `README.md` for more details. -include($ENV{VCPKG_ROOT}/scripts/toolchains/osx.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-carbon.cmake) diff --git a/customized_toolchain/toolchains/x64-windows-carbon.cmake b/customized_toolchain/toolchains/x64-windows-carbon.cmake deleted file mode 100644 index 5d16e0a..0000000 --- a/customized_toolchain/toolchains/x64-windows-carbon.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright © 2025 CCP ehf. -if (NOT _CCP_TOOLCHAIN_FILE_LOADED) - set(_CCP_TOOLCHAIN_FILE_LOADED 1) - - set (VCPKG_USE_HOST_TOOLS ON CACHE STRING "") - set (CMAKE_CXX_STANDARD 17 CACHE STRING "") - set (CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "") - set (CMAKE_CXX_EXTENSIONS OFF CACHE STRING "") - set (CMAKE_POSITION_INDEPENDENT_CODE ON CACHE STRING "") - set (CMAKE_CXX_VISIBILITY_PRESET hidden CACHE STRING "") - set (CMAKE_OBJCXX_VISIBILITY_PRESET hidden CACHE STRING "") - set (CMAKE_INTERPROCEDURAL_OPTIMIZATION ON CACHE STRING "") - - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded" CACHE STRING INTERNAL FORCE) - set(CMAKE_SYSTEM_VERSION 10.0.17763.0 CACHE STRING INTERNAL FORCE) - set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION 10.0.17763.0 CACHE STRING INTERNAL FORCE) - - # Windows 10 is our minimum requirement, so make sure we're enforcing it. - add_compile_definitions(WINVER=0x0A00) - add_compile_definitions(_WIN32_WINNT=0x0A00) - add_compile_definitions(_WIN32_WINDOWS=0x0A00) - add_compile_definitions(NTDDI_VERSION=0x0A000000) - - #[[ - - `CCP_PLATFORM` indicates the operating system a binary was built for - - `CCP_ARCHITECTURE` indicates the hardware architecture a binary was built for - - `CCP_TOOLSET` indicates the compiler (or toolset) a binary was built with - - `CCP_VENDOR_LIB_PATH` is a convenience variable for find_package modules, to construct the default `lib` folder for a vendored SDK. - - `CCP_VENDOR_BIN_PATH` is the same as CCP_VENDOR_LIB_PATH, but for the `bin` folder for a vendored SDK. - - See Platform Agnostic Developement section of the wiki: - https://ccpgames.atlassian.net/wiki/spaces/PAD/overview?homepageId=171868162 - ]] - set(CCP_PLATFORM Windows CACHE STRING "Target Platform") - set(CCP_ARCHITECTURE x64 CACHE STRING "Target Architecture") - set(CCP_TOOLSET v141 CACHE STRING "Target Toolset") - - # https://docs.microsoft.com/en-us/cpp/build/reference/mp-build-with-multiple-processes?view=msvc-150 - add_compile_options(/MP) - - add_compile_options(/W3) - add_compile_options(/permissive-) - # Ignore missing PDB file for libraries - add_link_options(/IGNORE:4099) - - # https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-warning-lnk4098?view=msvc-150 - # NOTE: Disable linker option when building with a statically linked runtime library - # add_link_options(/NODEFAULTLIB:libcmt.lib) - - # https://docs.microsoft.com/en-us/cpp/text/support-for-multibyte-character-sets-mbcss?view=msvc-150 - # We don't want this, but we currently can't use /D UNICODE since this breaks all our legacy nonsense (which we should fix) - # Replace with -D_UNICODE once we have fixed this - # https://github.com/bluescarni/mppp/issues/177 - add_definitions(-D_SBCS) - - set(MATH_OPTIMIZE_FLAG "/fp:fast") - - # Disable /GL for /ZI support - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF) -endif () diff --git a/customized_toolchain/toolchains/x64-windows-triplet.cmake b/customized_toolchain/toolchains/x64-windows-triplet.cmake deleted file mode 100644 index 80b0a54..0000000 --- a/customized_toolchain/toolchains/x64-windows-triplet.cmake +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright © 2025 CCP ehf. -# This toolchain is meant for use inside a vcpkg triplet. See `README.md` for more details. -include($ENV{VCPKG_ROOT}/scripts/toolchains/windows.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-carbon.cmake) diff --git a/customized_toolchain/triplets/arm64-osx-debug.cmake b/customized_toolchain/triplets/arm64-osx-debug.cmake deleted file mode 100644 index befb862..0000000 --- a/customized_toolchain/triplets/arm64-osx-debug.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE arm64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES arm64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "Debug") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () diff --git a/customized_toolchain/triplets/arm64-osx-internal.cmake b/customized_toolchain/triplets/arm64-osx-internal.cmake deleted file mode 100644 index af1d450..0000000 --- a/customized_toolchain/triplets/arm64-osx-internal.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE arm64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES arm64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "Internal") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/arm64-osx-release.cmake b/customized_toolchain/triplets/arm64-osx-release.cmake deleted file mode 100644 index 20235c9..0000000 --- a/customized_toolchain/triplets/arm64-osx-release.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE arm64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES arm64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "Release") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/arm64-osx-trinitydev.cmake b/customized_toolchain/triplets/arm64-osx-trinitydev.cmake deleted file mode 100644 index 589f56b..0000000 --- a/customized_toolchain/triplets/arm64-osx-trinitydev.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE arm64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES arm64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "TrinityDev") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-osx-debug.cmake b/customized_toolchain/triplets/x64-osx-debug.cmake deleted file mode 100644 index 8c67a99..0000000 --- a/customized_toolchain/triplets/x64-osx-debug.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES x86_64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "Debug") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-osx-internal.cmake b/customized_toolchain/triplets/x64-osx-internal.cmake deleted file mode 100644 index 02daeb9..0000000 --- a/customized_toolchain/triplets/x64-osx-internal.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES x86_64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "Internal") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-osx-release.cmake b/customized_toolchain/triplets/x64-osx-release.cmake deleted file mode 100644 index 3e4748a..0000000 --- a/customized_toolchain/triplets/x64-osx-release.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES x86_64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "Release") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-osx-trinitydev.cmake b/customized_toolchain/triplets/x64-osx-trinitydev.cmake deleted file mode 100644 index 77684d3..0000000 --- a/customized_toolchain/triplets/x64-osx-trinitydev.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES x86_64) -set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14) - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) - -set(CARBON_BUILD_TYPE "TrinityDev") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-osx-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-windows-debug.cmake b/customized_toolchain/triplets/x64-windows-debug.cmake deleted file mode 100644 index 81cb1cd..0000000 --- a/customized_toolchain/triplets/x64-windows-debug.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v141) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_VERSION "10.0.17763.0") - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) -set(VCPKG_LOAD_VCVARS_ENV ON) - -set(CARBON_BUILD_TYPE "Debug") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-windows-internal.cmake b/customized_toolchain/triplets/x64-windows-internal.cmake deleted file mode 100644 index 9c2a2ec..0000000 --- a/customized_toolchain/triplets/x64-windows-internal.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v141) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_VERSION "10.0.17763.0") - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) -set(VCPKG_LOAD_VCVARS_ENV ON) - -set(CARBON_BUILD_TYPE "Internal") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-windows-release.cmake b/customized_toolchain/triplets/x64-windows-release.cmake deleted file mode 100644 index 848f548..0000000 --- a/customized_toolchain/triplets/x64-windows-release.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v141) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_VERSION "10.0.17763.0") - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) -set(VCPKG_LOAD_VCVARS_ENV ON) - -set(CARBON_BUILD_TYPE "Release") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/customized_toolchain/triplets/x64-windows-trinitydev.cmake b/customized_toolchain/triplets/x64-windows-trinitydev.cmake deleted file mode 100644 index 4709064..0000000 --- a/customized_toolchain/triplets/x64-windows-trinitydev.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2025 CCP ehf. -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v141) -set(VCPKG_BUILD_TYPE "release") - -set(VCPKG_CMAKE_SYSTEM_VERSION "10.0.17763.0") - -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_ROOT) -set(VCPKG_LOAD_VCVARS_ENV ON) - -set(CARBON_BUILD_TYPE "TrinityDev") - -if (PORT MATCHES "carbon-.*") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-triplet.cmake") - set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-windows-carbon.cmake") -endif () - -if (PORT MATCHES "libyaml") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "curl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "openssl") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "protobuf") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "zlib") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "libuv") - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF") -endif() - -if (PORT MATCHES "carbon-pdmprotowrapper") - set(VCPKG_LIBRARY_LINKAGE static) -endif () - -if (PORT MATCHES "python3") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif () - -if (PORT MATCHES "yaml-cpp") - # Version 8 uses version Cmake 3.4 which we don't support. - # Version 9 this isn't a problem but it fails with internal compiler error due to our compiler. - # When the compiler version is updated we can remove this. - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () - -if (PORT MATCHES "tiny-process-library") - # Latest tagged version uses a version of cmake < 3.5 - set(VCPKG_CMAKE_CONFIGURE_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS};-DCMAKE_POLICY_VERSION_MINIMUM=3.5") -endif () \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c685908..d2aa3b2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,21 +9,31 @@ include(GoogleTest) set(SRC_FILES src/ResourcesTestFixture.cpp src/ResourcesTestFixture.h - src/CliTestFixture.cpp - src/CliTestFixture.h src/ResourcesLibraryTest.cpp - src/ResourcesCliTest.cpp src/ResourceToolsLibraryTest.cpp src/ResourceToolsFilterTest.cpp src/ResourceToolsTest.h ) +if(BUILD_CLI) + list(APPEND SRC_FILES + src/CliTestFixture.cpp + src/CliTestFixture.h + src/ResourcesCliTest.cpp + ) +endif() + add_executable(resources-test ${SRC_FILES}) target_compile_definitions(resources-test PRIVATE - TEST_DATA_BASE_PATH="${CMAKE_SOURCE_DIR}/tests/testData" + TEST_DATA_BASE_PATH="${CMAKE_SOURCE_DIR}/tests/testData") + +if(BUILD_CLI) + target_compile_definitions(resources-test + PRIVATE CARBON_RESOURCES_CLI_EXE_NAME=\"$\") +endif() target_include_directories(resources-test PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include) @@ -35,24 +45,26 @@ if (DEV_FEATURES) target_compile_definitions(resources-test PRIVATE DEV_FEATURES) endif () -if (WIN32) +if(BUILD_CLI) + if (WIN32) - # Get CLI exe - add_custom_command( - TARGET resources-test POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ $ - COMMAND_EXPAND_LISTS - ) + # Get CLI exe + add_custom_command( + TARGET resources-test POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ $ + COMMAND_EXPAND_LISTS + ) -elseif (APPLE) - # Get CLI exe - add_custom_command( - TARGET resources-test POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ $ - COMMAND_EXPAND_LISTS + elseif (APPLE) + # Get CLI exe + add_custom_command( + TARGET resources-test POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ $ + COMMAND_EXPAND_LISTS - ) -endif () + ) + endif () +endif() cmake_path(SET TEST_DATA_PATH ${CMAKE_CURRENT_SOURCE_DIR}/testData) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index cea4b90..5dc14ab 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -60,4 +60,8 @@ endif () target_link_libraries(resources-tools PRIVATE cryptopp::cryptopp CURL::libcurl ZLIB::ZLIB static_bsdiff unofficial::inih::inireader) -target_include_directories(resources-tools PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include) +target_include_directories(resources-tools + PUBLIC + $ + $ +) diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index 9c0fca4..0e85ebe 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -8,7 +8,7 @@ { "kind": "git", "repository": "git@github.com:carbonengine/vcpkg-registry.git", - "baseline": "addd8867a1553f4b7866bb7a36deb84bd59bd1f9", + "baseline": "b3b922c476b0dedfa8342a75e89975c74441fc75", "packages": ["carbon-*", "python3", "bsdiff-drake127"] } ] diff --git a/vcpkg.json b/vcpkg.json index 02c947d..3ef0af4 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,16 +1,12 @@ { "dependencies": [ - { - "name": "argparse", - "version>=": "2.2" - }, { "name": "bsdiff-drake127", - "version>=": "4.3.3#1" + "version>=": "4.3.3#2" }, { "name": "cryptopp", - "version>=": "8.9.0#1" + "version>=": "2026-03-02#0" }, { "name": "curl", @@ -22,17 +18,23 @@ }, { "name": "yaml-cpp", - "version>=": "0.8.0#1" + "version>=": "0.9.0#1" }, { "name": "zlib", "version>=": "1.3.1" } ], - "default-features": [ - "tests" - ], "features": { + "cli": { + "description": "Build carbon-resources CLI", + "dependencies": [ + { + "name": "argparse", + "version>=": "2.2" + } + ] + }, "docs": { "description": "Generate documentation", "dependencies": [ @@ -58,11 +60,5 @@ } ] } - }, - "overrides": [ - { - "name": "argparse", - "version": "2.2" - } - ] + } } diff --git a/vendor/github.com/carbonengine/vcpkg-registry b/vendor/github.com/carbonengine/vcpkg-registry index de86dca..d7934f9 160000 --- a/vendor/github.com/carbonengine/vcpkg-registry +++ b/vendor/github.com/carbonengine/vcpkg-registry @@ -1 +1 @@ -Subproject commit de86dcad60458ef170911adb5c42a053fc5d9117 +Subproject commit d7934f9633838d40f48ee2f41f64a871a5966b8a diff --git a/vendor/github.com/microsoft/vcpkg b/vendor/github.com/microsoft/vcpkg index a7d06b3..44819aa 160000 --- a/vendor/github.com/microsoft/vcpkg +++ b/vendor/github.com/microsoft/vcpkg @@ -1 +1 @@ -Subproject commit a7d06b3a72d5ec48353bacb84152bd027ee9999b +Subproject commit 44819aa2a6c10e56065e2b0330e7d6c89d1d2574 From b8d564f2fdd73c930cae8e38f6700707c879d52d Mon Sep 17 00:00:00 2001 From: James Robert Hawk Date: Thu, 16 Jul 2026 12:05:25 +0000 Subject: [PATCH 2/6] Remove v141 presets and fix Windows build kt --- .teamcity/Windows/Project.kt | 29 ++++--------- CMakePresets.json | 71 +++++-------------------------- vendor/github.com/microsoft/vcpkg | 2 +- 3 files changed, 20 insertions(+), 82 deletions(-) diff --git a/.teamcity/Windows/Project.kt b/.teamcity/Windows/Project.kt index c5f5061..8b60709 100644 --- a/.teamcity/Windows/Project.kt +++ b/.teamcity/Windows/Project.kt @@ -20,16 +20,12 @@ import jetbrains.buildServer.configs.kotlin.triggers.vcs import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot import jetbrains.buildServer.configs.kotlin.buildFeatures.provideAwsCredentials -val Debug = CarbonBuildWindows("Debug Windows", "Debug", "x64-windows-debug") -val Internal = CarbonBuildWindows("Internal Windows", "Internal", "x64-windows-internal") -val TrinityDev = CarbonBuildWindows("TrinityDev Windows", "TrinityDev", "x64-windows-trinitydev") -val Release = CarbonBuildWindows("Release Windows", "Release", "x64-windows-release") -val ReleaseDevFeatures = CarbonBuildWindows("Release Windows with Dev Features", "Release", "x64-windows-release-with-dev-features") - -val Debug_v145 = CarbonBuildWindows("Debug Windows v145", "Debug", "x64-windows-v145-debug", "-arch=x64 -vcvars_ver=14.51") -val Internal_v145 = CarbonBuildWindows("Internal Windows v145", "Internal", "x64-windows-v145-internal", "-arch=x64 -vcvars_ver=14.51") -val TrinityDev_v145 = CarbonBuildWindows("TrinityDev Windows v145", "TrinityDev", "x64-windows-v145-trinitydev", "-arch=x64 -vcvars_ver=14.51") -val Release_v145 = CarbonBuildWindows("Release Windows v145", "Release", "x64-windows-v145-release", "-arch=x64 -vcvars_ver=14.51") +val BuildParameters = "-arch=x64 -vcvars_ver=14.51" +val Debug = CarbonBuildWindows("Debug Windows", "Debug", "x64-windows-debug",BuildParameters) +val Internal = CarbonBuildWindows("Internal Windows", "Internal", "x64-windows-internal",BuildParameters) +val TrinityDev = CarbonBuildWindows("TrinityDev Windows", "TrinityDev", "x64-windows-trinitydev",BuildParameters) +val Release = CarbonBuildWindows("Release Windows", "Release", "x64-windows-release",BuildParameters) +val ReleaseDevFeatures = CarbonBuildWindows("Release Windows with Dev Features", "Release", "x64-windows-release-with-dev-features",BuildParameters) object Project : Project({ id("Windows") @@ -40,16 +36,10 @@ object Project : Project({ buildType(TrinityDev) buildType(Release) buildType(ReleaseDevFeatures) - - buildType(Debug_v145) - buildType(Internal_v145) - buildType(TrinityDev_v145) - buildType(Release_v145) - buildType(ReleaseDevFeatures_v145) }) -class CarbonBuildWindows(buildName: String, configType: String, preset: String) : BuildType({ +class CarbonBuildWindows(buildName: String, configType: String, preset: String, vsDevBatSwitches: String) : BuildType({ id(buildName.toId()) this.name = buildName @@ -59,8 +49,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) param("env.GIT_TAG_HASH_OVERRIDE", "") param("github_checkout_folder", "github") param("env.CTEST_JUNIT_OUTPUT_FILE", "ctest_results.xml") - select("env.VISUAL_STUDIO_PLATFORM_TOOLSET", "v141", label = "Visual Studio Platform Toolset", description = "Specify the toolset for the build. e.g. v141 or v143.", - options = listOf("v141 (2017)" to "v141", "v143 (2022)" to "v143")) + param("VS_DEV_BAT_SWITCHES", vsDevBatSwitches) param("env.CMAKE_BUILD_TARGETS", "all") param("env.CMAKE_INSTALL_PREFIX", ".build-artifact") param("env.CMAKE_CONFIG_TYPE", configType) @@ -102,7 +91,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String) scriptContent = """ REM unfortunately ninja does not find the VS environment otherwise REM NB: the exported PATH also contains the location where we installed sentry-cli, e.g. teamcity.agent.work.dir - call "%%ProgramFiles(x86)%%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\vsdevcmd.bat" -arch=x64 + call "%env.VSDEV_BAT_PATH%" %VS_DEV_BAT_SWITCHES% echo ##teamcity[setParameter name='env.INCLUDE' value='%%INCLUDE%%'] echo ##teamcity[setParameter name='env.LIB' value='%%LIB%%'] echo ##teamcity[setParameter name='env.LIBPATH' value='%%LIBPATH%%'] diff --git a/CMakePresets.json b/CMakePresets.json index c89c0de..c41042c 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -40,19 +40,11 @@ }, "hidden": true }, - { - "name": "x64-windows-v145", - "inherits": "windows", - "cacheVariables": { - "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-windows-145-carbon.cmake" - }, - "hidden": true - }, { "name": "x64-windows", "inherits": "windows", "cacheVariables": { - "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-windows-carbon.cmake" + "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/vendor/github.com/carbonengine/vcpkg-registry/toolchains/x64-windows-145-carbon.cmake" }, "hidden": true }, @@ -75,56 +67,13 @@ "hidden": true }, - { - "name": "x64-windows-v145-internal", - "inherits": "x64-windows-v145", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Internal", - "VCPKG_TARGET_TRIPLET": "x64-windows-145-internal", - "VCPKG_HOST_TRIPLET": "x64-windows-145-internal" - } - }, - { - "name": "x64-windows-v145-release", - "inherits": "x64-windows-v145", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "VCPKG_TARGET_TRIPLET": "x64-windows-145-release", - "VCPKG_HOST_TRIPLET": "x64-windows-145-release" - } - }, - { - "name": "x64-windows-v145-debug", - "inherits": "x64-windows-v145", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "VCPKG_TARGET_TRIPLET": "x64-windows-145-debug", - "VCPKG_HOST_TRIPLET": "x64-windows-145-debug" - } - }, - { - "name": "x64-windows-v145-trinitydev", - "inherits": "x64-windows-v145", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "TrinityDev", - "VCPKG_TARGET_TRIPLET": "x64-windows-145-trinitydev", - "VCPKG_HOST_TRIPLET": "x64-windows-145-trinitydev" - } - }, - { - "name": "x64-windows-release-v145-with-dev-features", - "inherits": "x64-windows-v145", - "cacheVariables": { - "DEV_FEATURES": "ON" - } - }, { "name": "x64-windows-internal", "inherits": "x64-windows", "cacheVariables": { "CMAKE_BUILD_TYPE": "Internal", - "VCPKG_TARGET_TRIPLET": "x64-windows-internal", - "VCPKG_HOST_TRIPLET": "x64-windows-internal" + "VCPKG_TARGET_TRIPLET": "x64-windows-145-internal", + "VCPKG_HOST_TRIPLET": "x64-windows-145-internal" } }, { @@ -132,8 +81,8 @@ "inherits": "x64-windows", "cacheVariables": { "CMAKE_BUILD_TYPE": "Release", - "VCPKG_TARGET_TRIPLET": "x64-windows-release", - "VCPKG_HOST_TRIPLET": "x64-windows-release" + "VCPKG_TARGET_TRIPLET": "x64-windows-145-release", + "VCPKG_HOST_TRIPLET": "x64-windows-145-release" } }, { @@ -141,8 +90,8 @@ "inherits": "x64-windows", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", - "VCPKG_TARGET_TRIPLET": "x64-windows-debug", - "VCPKG_HOST_TRIPLET": "x64-windows-debug" + "VCPKG_TARGET_TRIPLET": "x64-windows-145-debug", + "VCPKG_HOST_TRIPLET": "x64-windows-145-debug" } }, { @@ -150,13 +99,13 @@ "inherits": "x64-windows", "cacheVariables": { "CMAKE_BUILD_TYPE": "TrinityDev", - "VCPKG_TARGET_TRIPLET": "x64-windows-trinitydev", - "VCPKG_HOST_TRIPLET": "x64-windows-trinitydev" + "VCPKG_TARGET_TRIPLET": "x64-windows-145-trinitydev", + "VCPKG_HOST_TRIPLET": "x64-windows-145-trinitydev" } }, { "name": "x64-windows-release-with-dev-features", - "inherits": "x64-windows-release", + "inherits": "x64-windows", "cacheVariables": { "DEV_FEATURES": "ON" } diff --git a/vendor/github.com/microsoft/vcpkg b/vendor/github.com/microsoft/vcpkg index 44819aa..b522934 160000 --- a/vendor/github.com/microsoft/vcpkg +++ b/vendor/github.com/microsoft/vcpkg @@ -1 +1 @@ -Subproject commit 44819aa2a6c10e56065e2b0330e7d6c89d1d2574 +Subproject commit b5229343b4b80264ed51e89c6a7dcd0cbe85e9cc From d98629243ceff897de48141b0cf9f258a73b5c53 Mon Sep 17 00:00:00 2001 From: James Robert Hawk Date: Thu, 16 Jul 2026 12:47:19 +0000 Subject: [PATCH 3/6] Add post build command to copy required dlls for test project Required for debug builds to succesfully run that require gtest dlls. --- tests/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d2aa3b2..c30ab34 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -45,6 +45,16 @@ if (DEV_FEATURES) target_compile_definitions(resources-test PRIVATE DEV_FEATURES) endif () +if(CMAKE_IMPORT_LIBRARY_SUFFIX) + + add_custom_command(TARGET resources-test POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ $ + COMMAND_EXPAND_LISTS + VERBATIM + ) + +endif() + if(BUILD_CLI) if (WIN32) From 68604ec3c57b805786b84dbe941af42d2f32bafc Mon Sep 17 00:00:00 2001 From: James Robert Hawk Date: Thu, 16 Jul 2026 12:53:20 +0000 Subject: [PATCH 4/6] Bump version number in repo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce45041..956bc74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ if (BUILD_TESTING) list(APPEND VCPKG_MANIFEST_FEATURES "tests") endif() -project(resources VERSION 4.3.1) +project(resources VERSION 4.3.2) include(cmake/CcpTargetConfigurations.cmake) include(cmake/CcpDocsGenerator.cmake) From 9ed42b68f91e56241ef983cb5d243238c7b1e8bc Mon Sep 17 00:00:00 2001 From: James Robert Hawk Date: Thu, 16 Jul 2026 13:59:23 +0000 Subject: [PATCH 5/6] Switch to using win32 to detect if to copy ddls for tests --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c30ab34..257402d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -45,7 +45,7 @@ if (DEV_FEATURES) target_compile_definitions(resources-test PRIVATE DEV_FEATURES) endif () -if(CMAKE_IMPORT_LIBRARY_SUFFIX) +if(WIN32) add_custom_command(TARGET resources-test POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ $ From ac6b76880448bb2f9117d8df383d04f135cde346 Mon Sep 17 00:00:00 2001 From: James Robert Hawk Date: Thu, 16 Jul 2026 14:11:36 +0000 Subject: [PATCH 6/6] Set dev features preset to inherit from win release preset --- CMakePresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index c41042c..77472d7 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -105,7 +105,7 @@ }, { "name": "x64-windows-release-with-dev-features", - "inherits": "x64-windows", + "inherits": "x64-windows-release", "cacheVariables": { "DEV_FEATURES": "ON" }