File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Linux CI
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ fail-fast : true
14+ matrix :
15+ build_type : [Release]
16+ cpp_compiler : [g++, clang++]
17+ cxx_std : [17, 20, 23]
18+ steps :
19+ - uses : actions/checkout@v4
20+ - name : Set reusable strings
21+ id : strings
22+ shell : bash
23+ run : |
24+ echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
25+ - name : Setup CMake
26+ uses : jwlawson/actions-setup-cmake@v2
27+ with :
28+ cmake-version : ' 3.24.x'
29+ - name : Configure CMake
30+ run : >
31+ cmake -B ${{ steps.strings.outputs.build-output-dir }}
32+ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
33+ -DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }}
34+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
35+ -DCMAKE_BUILD_TESTS=TRUE
36+ -DCMAKE_BUILD_EXAMPLES=TRUE
37+ -S ${{ github.workspace }}
38+ - name : Build
39+ run : cmake --build ${{ steps.strings.outputs.build-output-dir }} --parallel
40+ - name : Run Tests
41+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
42+ run : ctest --test-dir tests/ --output-on-failure --parallel
43+ - name : Run Examples
44+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
45+ run : ./examples/examples
Original file line number Diff line number Diff line change 1+ name : macOS
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ build :
11+ runs-on : macos-latest
12+ strategy :
13+ fail-fast : true
14+ matrix :
15+ build_type : [Release]
16+ cpp_compiler : [clang++]
17+ cxx_std : [17, 20, 23]
18+ steps :
19+ - uses : actions/checkout@v4
20+ - name : Set reusable strings
21+ id : strings
22+ shell : bash
23+ run : |
24+ echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
25+ - name : Setup CMake
26+ uses : jwlawson/actions-setup-cmake@v2
27+ with :
28+ cmake-version : ' 3.24.x'
29+ - name : Configure CMake
30+ run : >
31+ cmake -B ${{ steps.strings.outputs.build-output-dir }}
32+ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
33+ -DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }}
34+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
35+ -DCMAKE_BUILD_TESTS=TRUE
36+ -DCMAKE_BUILD_EXAMPLES=TRUE
37+ -S ${{ github.workspace }}
38+ - name : Build
39+ run : cmake --build ${{ steps.strings.outputs.build-output-dir }} --parallel
40+ - name : Run Tests
41+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
42+ run : ctest --test-dir tests/ --output-on-failure --parallel
43+ - name : Run Examples
44+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
45+ run : ./examples/examples
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Windows
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ build :
11+ runs-on : windows-latest
12+ strategy :
13+ fail-fast : true
14+ matrix :
15+ build_type : [Release]
16+ cpp_compiler : [cl]
17+ cxx_std : [17, 20, 23]
18+ steps :
19+ - uses : actions/checkout@v4
20+ - name : Set reusable strings
21+ id : strings
22+ shell : bash
23+ run : |
24+ echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
25+ - name : Setup CMake
26+ uses : jwlawson/actions-setup-cmake@v2
27+ with :
28+ cmake-version : ' 3.24.x'
29+ - name : Configure CMake
30+ run : >
31+ cmake -B ${{ steps.strings.outputs.build-output-dir }}
32+ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
33+ -DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }}
34+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
35+ -DCMAKE_BUILD_TESTS=TRUE
36+ -DCMAKE_BUILD_EXAMPLES=TRUE
37+ -S ${{ github.workspace }}
38+ - name : Build
39+ run : cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --parallel
40+ - name : Run Tests
41+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
42+ run : ctest --test-dir tests/ -C ${{ matrix.build_type }} --output-on-failure --parallel
43+ - name : Run Examples
44+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
45+ run : ./examples/${{ matrix.build_type }}/examples.exe
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.24 )
2- project (cstring-lite )
2+ project (cstring_lite )
33
4- if (NOT CMAKE_CXX_STANDARD )
5- set (CMAKE_CXX_STANDARD 17)
4+ set (CMAKE_CXX_STANDARD 17 CACHE STRING "" )
5+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
6+
7+ set (CMAKE_BUILD_TESTS FALSE CACHE BOOL "" )
8+ set (CMAKE_BUILD_EXAMPLES FALSE CACHE BOOL "" )
9+
10+ add_library (${PROJECT_NAME} INTERFACE )
11+ target_include_directories (${PROJECT_NAME} INTERFACE
12+ ${CMAKE_CURRENT_SOURCE_DIR} /include
13+ )
14+
15+ if (MSVC )
16+ add_compile_options (/W4 /WX /permissive- )
17+ else ()
18+ add_compile_options (-Wall -Wextra -Werror -Wpedantic )
619endif ()
720
8- set (CMAKE_CXX_STANDARD_REQUIRED ON )
21+ if (${CMAKE_BUILD_TESTS} )
22+ add_subdirectory (tests )
23+ endif ()
924
10- if (${TULI_ENV_BUILD_TESTS} )
11- add_subdirectory (tests )
12- elseif (${TULI_ENV_BUILD_EXAMPLES} )
13- add_subdirectory (examples )
25+ if (${CMAKE_BUILD_EXAMPLES} )
26+ add_subdirectory (examples )
1427endif ()
You can’t perform that action at this time.
0 commit comments