Skip to content

Commit

Permalink
-updated seal_lake to v0.2.0
Browse files Browse the repository at this point in the history
-added CMake presets
  • Loading branch information
kamchatka-volcano committed May 18, 2024
1 parent 1e520e2 commit 2cd1d04
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 19 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,26 @@ jobs:
- {
name: "Ubuntu Latest gcc",
os: ubuntu-latest,
cc: "gcc",
cxx: "g++",
flags: "-Wall -Werror -Wextra -Wpedantic -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused"
cmake-preset: "gcc-release"
}
- {
name: "Ubuntu Latest clang",
os: ubuntu-latest,
cc: "clang",
cxx: "clang++",
flags: "-Wall -Werror -Wextra -Wpedantic -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused"
cmake-preset: "clang-release"
}
- {
name: "Windows Latest MSVC",
os: windows-latest,
cc: "cl",
cxx: "cl",
flags: "/EHsc /W4 /WX"
cmake-preset: "msvc-release"
}

steps:
- uses: actions/checkout@v3

- uses: seanmiddleditch/gha-setup-ninja@master
- uses: rui314/setup-mold@v1
- uses: hendrikmuhs/ccache-action@v1.2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DENABLE_TESTS=ON -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }}"
run: cmake -B ${{github.workspace}}/build -DENABLE_TESTS=ON --preset="${{ matrix.config.cmake-preset }}"

- name: Build
run: cmake --build ${{github.workspace}}/build
Expand Down
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.18)
project(sfun VERSION 5.1.0 DESCRIPTION "stuff from unnamed namespace - a c++17 helper library")
include(GNUInstallDirs)
project(sfun VERSION 5.2.0 DESCRIPTION "stuff from unnamed namespace - a c++17 helper library")
include(external/seal_lake)

SealLake_Bundle(
Expand All @@ -19,5 +18,5 @@ SealLake_Bundle(
SealLake_HeaderOnlyLibrary(
COMPILE_FEATURES cxx_std_17
)
SealLake_OptionalBuildSteps(tests)
SealLake_OptionalSubProjects(tests)

122 changes: 122 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"version": 6,
"configurePresets": [
{
"name": "base-linux",
"hidden": true,
"displayName": "linux base preset",
"generator": "Ninja",
"binaryDir": "build-${presetName}",
"cacheVariables": {
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=mold",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"CPM_SOURCE_CACHE": "cpm_cache"
}
},
{
"name": "clang-base",
"hidden": true,
"displayName": "clang base preset",
"inherits": "base-linux",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Werror -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused"
}
},
{
"name": "clang-debug",
"displayName": "clang (Debug)",
"inherits": "clang-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "clang-release",
"displayName": "clang (Release)",
"inherits": "clang-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "gcc-base",
"hidden": true,
"displayName": "gcc base preset",
"inherits": "base-linux",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Werror -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused"
}
},
{
"name": "gcc-debug",
"displayName": "gcc (Debug)",
"inherits": "gcc-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "gcc-release",
"displayName": "gcc (Release)",
"inherits": "gcc-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "base-windows",
"displayName": "windows base preset",
"hidden": true,
"generator": "Ninja",
"binaryDir": "build-${presetName}",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CPM_SOURCE_CACHE": "cpm_cache"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [
"Windows"
]
},
"jetbrains.com/clion": {
"toolchain": "Visual Studio"
}
}
},
{
"name": "msvc-base",
"hidden": true,
"displayName": "msvc base preset",
"inherits": "base-windows",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "cl",
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_FLAGS": "/EHsc /W4 /WX"
}
},
{
"name": "msvc-debug",
"displayName": "msvc (Debug)",
"inherits": "msvc-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "msvc-release",
"displayName": "msvc (Release)",
"inherits": "msvc-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
}
]
}
4 changes: 0 additions & 4 deletions cmake/sfunConfig.cmake.in

This file was deleted.

2 changes: 1 addition & 1 deletion external/seal_lake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include(FetchContent)
Set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(seal_lake
GIT_REPOSITORY https://github.com/kamchatka-volcano/seal_lake.git
GIT_TAG master
GIT_TAG v0.2.0
)
FetchContent_MakeAvailable(seal_lake)
include(${seal_lake_SOURCE_DIR}/seal_lake.cmake)

0 comments on commit 2cd1d04

Please sign in to comment.