Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ include(cmake/CcpTargetConfigurations.cmake)
include(cmake/CcpDocsGenerator.cmake)

find_package(yaml-cpp CONFIG REQUIRED)
find_package(Python3 COMPONENTS Interpreter REQUIRED)

# Add subdirectory for resource tools static library
add_subdirectory(tools)
Expand Down Expand Up @@ -104,10 +103,14 @@ target_include_directories(resources-static

add_subdirectory(cli)

enable_testing()

add_subdirectory(tests)

# Enable testing based on option set (on by default)
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)
endif ()
endif ()

# Provide an install target if this is the top level project only
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
Expand All @@ -123,6 +126,8 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
option(BUILD_DOCUMENTATION "Build Documentation" ${BUILD_DOCUMENTATION_DEFAULT_FLAG})

if (BUILD_DOCUMENTATION)
find_package(Python3 COMPONENTS Interpreter REQUIRED)

# Run sphinx
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/doc/source)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/doc/build)
Expand Down
30 changes: 27 additions & 3 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": "ON",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"VCPKG_TARGET_TRIPLET": "x64-windows-carbon"
"VCPKG_TARGET_TRIPLET": "x64-windows-carbon",
"VCPKG_HOST_TRIPLET": "x64-windows-carbon"
},
"environment": {
"X_VCPKG_REGISTRIES_CACHE": "${sourceDir}/vcpkg_registry_cache"
Expand All @@ -31,7 +32,8 @@
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": "ON",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"VCPKG_TARGET_TRIPLET": "x64-windows-carbon"
"VCPKG_TARGET_TRIPLET": "x64-windows-carbon",
"VCPKG_HOST_TRIPLET": "x64-windows-carbon"
},
"environment": {
"X_VCPKG_REGISTRIES_CACHE": "${sourceDir}/vcpkg_registry_cache"
Expand All @@ -53,11 +55,33 @@
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": "ON",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"VCPKG_TARGET_TRIPLET": "arm64-osx-carbon"
"VCPKG_TARGET_TRIPLET": "arm64-osx-carbon",
"VCPKG_HOST_TRIPLET": "arm64-osx-carbon"
},
"environment": {
"X_VCPKG_REGISTRIES_CACHE": "${sourceDir}/vcpkg_registry_cache"
}
},
{
"name": "ci",
"hidden": true,
"cacheVariables": {
"BUILD_DOCUMENTATION": "ON",
"BUILD_TESTING": "ON",
"VCPKG_MANIFEST_FEATURES": "docs;tests"
}
},
{
"name": "carbon_windows_vcpkg_vs_ci",
"inherits": ["carbon_windows_vcpkg_vs", "ci"]
},
{
"name": "carbon_windows_vcpkg_nmc_ci",
"inherits": ["carbon_windows_vcpkg_nmc", "ci"]
},
{
"name": "carbon_osx_vcpkg_ci",
"inherits": ["carbon_osx_vcpkg", "ci"]
}
]
}
6 changes: 3 additions & 3 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"registries": [
{
"kind": "git",
"repository": "git@github.com:ccpgames/carbon-vcpkg-registry.git",
"baseline": "4089428d25208720dcf6451cb8b57816bbf9fb9d",
"packages": ["carbon-*", "python3-prebuilt", "bsdiff-drake127"]
"repository": "git@github.com:carbonengine/vcpkg-registry.git",
"baseline": "addd8867a1553f4b7866bb7a36deb84bd59bd1f9",
"packages": ["carbon-*", "python3", "bsdiff-drake127"]
}
]
}
73 changes: 46 additions & 27 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,64 @@
{
"dependencies": [
{
"name": "python3-prebuilt",
"version>=": "3.12.3#2"
"name": "argparse",
"version>=": "2.2#0"
},

{
"name":"argparse",
"version>=":"2.2#0"
"name": "curl",
"version>=": "8.11.1#1"
},

{
"name":"curl"
"name": "cryptopp",
"version>=": "8.9.0#1"
},

{
"name":"gtest"
"name": "yaml-cpp",
"version>=": "0.8.0#1"
},

{
"name":"cryptopp"
"name": "zlib",
"version>=": "1.3.1"
},

{
"name":"tiny-process-library"
},

{
"name":"yaml-cpp"
},

{
"name":"zlib"
},

{
"name":"bsdiff-drake127"
"name": "bsdiff-drake127",
"version>=": "4.3.3"
}
],

"default-features": [
"tests"
],
"features": {
"tests": {
"description": "Enable tests",
"dependencies": [
{
"name": "gtest",
"version>=": "1.15.2",
"host": true
},
{
"name": "tiny-process-library",
"version>=": "2.0.4#3",
"host": true
}
]
},
"docs": {
"description": "Generate documentation",
"dependencies": [
{
"name": "python3",
"version>=": "3.12.3",
"host": true
}
]
}
},
"overrides": [
{ "name": "argparse", "version": "2.2#0" }
{
"name": "argparse",
"version": "2.2#0"
}
]
}
Loading