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
50 changes: 25 additions & 25 deletions .github/workflows/adobe_source_libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install dependencies (macos)
if: ${{ startsWith(matrix.config.os, 'macos') }}
run: |
rm '/usr/local/bin/2to3'
rm '/usr/local/bin/2to3-3.12'
rm '/usr/local/bin/idle3'
rm '/usr/local/bin/idle3.12'
rm '/usr/local/bin/pydoc3'
rm '/usr/local/bin/pydoc3.12'
rm '/usr/local/bin/python3'
rm '/usr/local/bin/python3.12'
rm '/usr/local/bin/python3-config'
rm '/usr/local/bin/python3.12-config'
brew install ninja
shell: bash
# - name: Install dependencies (macos)
# if: ${{ startsWith(matrix.config.os, 'macos') }}
# run: |
# rm '/usr/local/bin/2to3'
# rm '/usr/local/bin/2to3-3.12'
# rm '/usr/local/bin/idle3'
# rm '/usr/local/bin/idle3.12'
# rm '/usr/local/bin/pydoc3'
# rm '/usr/local/bin/pydoc3.12'
# rm '/usr/local/bin/python3'
# rm '/usr/local/bin/python3.12'
# rm '/usr/local/bin/python3-config'
# rm '/usr/local/bin/python3.12-config'
# brew install ninja
# shell: bash

- name: Install dependencies (ubuntu)
if: ${{ startsWith(matrix.config.os, 'ubuntu') }}
run: |
sudo apt-get install -y ninja-build
shell: bash
# - name: Install dependencies (ubuntu)
# if: ${{ startsWith(matrix.config.os, 'ubuntu') }}
# run: |
# sudo apt-get install -y ninja-build
# shell: bash

- name: Install dependencies (Windows)
if: ${{ startsWith(matrix.config.os, 'windows') }}
run: |
choco install --yes ninja
shell: cmd
# - name: Install dependencies (Windows)
# if: ${{ startsWith(matrix.config.os, 'windows') }}
# run: |
# choco install --yes ninja
# shell: cmd

- name: Set enviroment variables (Linux+GCC)
if: ${{ matrix.config.compiler == 'gcc' }}
Expand Down
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.29)
project(adobe-source-libraries CXX)
include(FindGit)
include(CMakeParseArguments)

Expand All @@ -10,19 +11,24 @@ if(WIN32)
set(CMAKE_OBJECT_PATH_MAX 500)
endif()

project(adobe_source_libraries CXX)

################################################################################

# Enable CPM caching to avoid re-downloading dependencies. Must be before CPM.cmake include.
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cpm-cache CACHE PATH "Directory to cache CPM packages" FORCE)
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm CACHE PATH "Directory to cache CPM packages" FORCE)

include(cmake/CPM.cmake)

################################################################################
# Dependencies

CPMAddPackage("gh:stlab/copy-on-write@1.0.3")
# https://github.com/stlab/copy-on-write/releases
CPMAddPackage("gh:stlab/copy-on-write@1.0.4")

# https://github.com/stlab/enum-ops/releases
CPMAddPackage(gh:stlab/enum-ops@1.0.4)
# CPMAddPackage(NAME enum-ops
# URL "${CMAKE_SOURCE_DIR}/../enum-ops"
# )

################################################################################

Expand All @@ -43,8 +49,6 @@ if(CMAKE_EXPORT_COMPILE_COMMANDS AND PROJECT_IS_TOP_LEVEL)
)
endif()

project(adobe-source-libraries CXX)

# https://github.com/boostorg/boost/releases
CPMAddPackage(
NAME Boost
Expand All @@ -64,6 +68,7 @@ function(target_link_boost target)
target_link_libraries(${target} PUBLIC Boost::multiprecision)
target_link_libraries(${target} PUBLIC Boost::date_time)
target_link_libraries(${target} PUBLIC stlab::copy-on-write)
target_link_libraries(${target} PUBLIC stlab::enum-ops)
endfunction(target_link_boost)

function(target_link_boost_test target)
Expand Down
17 changes: 6 additions & 11 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "DEBUG",
"CMAKE_CXX_STANDARD": "20",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
"CPM_SOURCE_CACHE": "${sourceParentDir}/.cache/CPM"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
},
"architecture": {
"value": "x64",
Expand All @@ -34,8 +33,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "DEBUG",
"CMAKE_CXX_STANDARD": "17",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
"CPM_SOURCE_CACHE": "${sourceParentDir}/.cache/CPM"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
},
"architecture": {
"value": "x64",
Expand All @@ -58,8 +56,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "DEBUG",
"CMAKE_CXX_STANDARD": "20",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
"CPM_SOURCE_CACHE": "${sourceParentDir}/.cache/CPM"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
Expand All @@ -77,8 +74,7 @@
"binaryDir": "${sourceParentDir}/build/asl-${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "DEBUG",
"CMAKE_CXX_STANDARD": "17",
"CPM_SOURCE_CACHE": "${sourceParentDir}/.cache/CPM"
"CMAKE_CXX_STANDARD": "17"
}
},
{
Expand All @@ -89,8 +85,7 @@
"cacheVariables": {
"CMAKE_CXX_STANDARD": "17",
"CMAKE_BUILD_TYPE": "DEBUG",
"CMAKE_CXX_CLANG_TIDY": "clang-tidy",
"CPM_SOURCE_CACHE": "${sourceParentDir}/.cache/CPM"
"CMAKE_CXX_CLANG_TIDY": "clang-tidy"
}
},
{
Expand Down Expand Up @@ -174,7 +169,7 @@
"displayName": "Build Documentation",
"description": "Build the documentation",
"configurePreset": "docs",
"targets": ["docs"]
"targets": "docs"
}
],
"testPresets": [
Expand Down
Loading