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
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
Expand All @@ -56,9 +56,9 @@ jobs:


ubuntu:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
Expand All @@ -67,9 +67,6 @@ jobs:

- name: Configure CMake
run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }}
env:
CC: gcc-9
CXX: g++-9

- name: Build library sources
run: cmake --build ${{ env.build_dir }}
Expand All @@ -83,7 +80,7 @@ jobs:
macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ if (SPLA_BUILD_OPENCL)
add_subdirectory(deps/opencl-headers)

message(STATUS "Add Khronos OpenCL ICD loaded library")
set(OPENCL_ICD_LOADER_PIC ON)
set(OPENCL_ICD_LOADER_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(OPENCL_ICD_LOADER_BUILD_TESTING OFF CACHE BOOL "" FORCE)
add_subdirectory(deps/opencl-icd-loader)
Expand Down
79 changes: 52 additions & 27 deletions deps/cxxopts/.github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,68 @@ name: CMake

on:
push:
branches: [ master ]
branches: [ master, main ]
pull_request:
branches: [ master ]
branches: [ master, main ]
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release


defaults:
run:
shell: bash

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
build-ubuntu:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
compiler: [ g++-9, g++-10, clang++ ]

name: Build and Test on Ubuntu
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Configure CMake
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER=${{matrix.compiler}}
- name: Build
run: cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build/test
run: ctest -C $BUILD_TYPE --output-on-failure

build-macos:
name: Build and Test on MacOS
strategy:
matrix:
os: [ubuntu-18.04]
compiler: [g++-7, g++-9, g++-10, clang++]

os: [ macos-11, macos-12 ]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Configure CMake
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Show compile commands
run: cat build/compile_commands.json
- name: Build
run: cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build/test
shell: bash
run: ctest -C $BUILD_TYPE --output-on-failure

build-windows:
name: Build and Test on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{matrix.compiler}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -T "ClangCl"
- name: Build
run: cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build/test
run: cd $BUILD_TYPE && ./link_test && ./options_test
78 changes: 73 additions & 5 deletions deps/cxxopts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,77 @@
syntax: glob

# Temporary, cache, swap files
\#\#*
*.swp
build*/
*.bkp

# Files which "ask" to be hidden
*~
.*
unused/

# Build artifacts
*.a
*.o
*.so
*.ptx
bin/*
lib/*
build/
build-*/
bazel-*

# Core dumps
core
core.*
core-*

# CMake & CTest-generated files
CMakeCache.txt
Makefile
CMakeFiles/
Testing/
CTestTestfile.cmake
cmake_install.cmake
bazel-*
CMakeScripts/*
CMakeTmp/*
Makefile
CTestTestfile.cmake
Testing/

# Eclise IDE-related files
.project
.cproject
.settings

# CLion IDE-related files
.idea/
cmake-build-*/

# Patching
*.diff
*.rej
*.orig

# Files/folders downloaded from other repositories as part of the build
external/*
third-party/*

# Miscellaneous
tags
log
*.log
*.v3breakpoints
gmon.out
.DS_Store

# Doxygen
doxygen.log
Doxyfile
docs/

# Archives
*.zip
*.gz
*.bz2
*.tgz
*.tar
*.xz

8 changes: 8 additions & 0 deletions deps/cxxopts/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ cc_library(
strip_include_prefix = "include",
visibility = ["//visibility:public"],
)

load("@rules_fuzzing//fuzzing:cc_defs.bzl", "cc_fuzz_test")

cc_fuzz_test(
name = "cxxopts_fuzz_test",
srcs = ["test/fuzz.cpp"],
deps = [":cxxopts"],
)
46 changes: 45 additions & 1 deletion deps/cxxopts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,55 @@
This is the changelog for `cxxopts`, a C++11 library for parsing command line
options. The project adheres to semantic versioning.

## Unreleased
## 3.2.1

### Bug fixes

* Fix compilation with optional on C++20.

## 3.2

### Bug fixes

* Fix unannotated fallthrough.
* Fix sign conversion with Unicode output.
* Don't initialize regex in static initialiser.
* Fix incorrect integer overflow checks.

### Added

* Add fuzzing to CI

### Changed

* Change quote output to '' to match Windows.
* Don't split positional arguments by the list delimiter.
* Order help groups by the order they were added.

## 3.1.1

### Bug Fixes

* Fixed version number in header.
* Fixed cast warning in Unicode function.

## 3.1

### Added

* Support for multiple long names for the same option (= multiple long aliases)
* Add a `program()` function to retrieve the program name.
* Added a .clang-format file.
* Added iterator and printing for a ParseResult.

### Changed

* Cleanup exception code, add cxxopts::exceptions namespace.
* Renamed several exceptions to be more descriptive, and added to a nested namespace.

### Bug Fixes

* Fix `arguments()` having no key for options that only have a short name.

## 3.0

Expand Down
7 changes: 4 additions & 3 deletions deps/cxxopts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
cmake_minimum_required(VERSION 3.1...3.19)
cmake_minimum_required(VERSION 3.5...3.19)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
include(cxxopts)
set("PROJECT_DESCRIPTION" "A header-only lightweight C++ command line option parser")
set("PROJECT_HOMEPAGE_URL" "https://github.com/jarro2783/cxxopts")

# Get the version of the library
cxxopts_getversion(VERSION)
Expand All @@ -32,6 +30,9 @@ project(cxxopts
LANGUAGES CXX
)

set("PROJECT_DESCRIPTION" "A header-only lightweight C++ command line option parser")
set("PROJECT_HOMEPAGE_URL" "https://github.com/jarro2783/cxxopts")

# Must include after the project call due to GNUInstallDirs requiring a language be enabled (IE. CXX)
include(GNUInstallDirs)

Expand Down
23 changes: 23 additions & 0 deletions deps/cxxopts/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,26 @@ To run the tests, you have to configure `cxxopts` with another flag:
cmake -D CXXOPTS_BUILD_TESTS=On ${CXXOPTS_DIR}
make
make test

== Using cxxopts in tipi.build projects ==

`cxxopts` can be easily used in [tipi.build](https://tipi.build) projects simply by adding the following entry to your `.tipi/deps`:

```json
{
"jarro2783/cxxopts": { "@": "v3.0.0" }
}
```

To try this you can run the following command in `/src` (change the target name appropriately to `linux` or `macos` or `windows`):

```bash
tipi . -t <target>
./build/linux-cxx17/bin/test_package -v
```

To develop `cxxopts` using tipi run the following command at the root of the repository:

```bash
tipi . -t <target> --test all -v
```
Loading