Skip to content

Commit 1cb02a7

Browse files
committed
Update to C++-20 and other minor fixes
1 parent 70855ec commit 1cb02a7

6 files changed

Lines changed: 22 additions & 8 deletions

File tree

.gitattributes

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
# Ensure Unix-style line endings for the triggers file
2-
triggers text eol=lf
1+
# Always checkout with LF
2+
*.sh text eol=lf
3+
*.bash text eol=lf
4+
5+
# Always checkout with CRLF
6+
*.bat text eol=crlf
7+
8+
# Default behavior: CRLF on Windows, LF on Unix
9+
* text=auto

.github/workflows/publish_deb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
with:
5050
tag_name: ${{ needs.create_release.outputs.v-version }}
5151
files: |
52-
build/*.deb
52+
build/libosi*.deb

.github/workflows/test_libosi.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@ jobs:
2727
cmake -B build -GNinja -DENABLE_TESTING=ON
2828
ninja -C build
2929
ninja -C build test
30+
31+
- name: Test installing Debian package
32+
run: |
33+
ninja -C build package
34+
sudo dpkg -i build/libosi*.deb
35+

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15)
22
project(libosi)
33
include(GNUInstallDirs)
44

5-
set(CMAKE_CXX_STANDARD 17)
5+
set(CMAKE_CXX_STANDARD 20)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
77
set(CMAKE_CXX_EXTENSIONS OFF)
88

CPackConfig.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ if(UBUNTU_CHECK STREQUAL "Ubuntu")
3434
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${UBUNTU_VERSION}")
3535
endif()
3636

37-
# Include additional control files
38-
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/triggers")
37+
# Create the triggers file dynamically
38+
file(WRITE "${CMAKE_BINARY_DIR}/triggers" "activate-noawait ldconfig\n")
39+
40+
# Include the triggers file in the Debian package
41+
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/triggers")
3942

4043
include(CPack)

triggers

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)