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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
SQLite/sqlite3.c linguist-vendored
SQLite/sqlite3.h linguist-vendored
SQLite/sqlite3ext.h linguist-vendored
SQLite/shell.c linguist-vendored
33 changes: 33 additions & 0 deletions .github/workflows/dmq_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: DelegateMQ latest

# Builds and tests against DelegateMQ's latest code instead of the pinned
# release (DMQ_GIT_TAG in CMakeLists.txt), so a DelegateMQ change that would
# break this wrapper shows up before the next DelegateMQ release. It only
# reports: pull requests are checked by the pinned-release workflows.

on:
schedule:
- cron: '0 6 * * 1' # Mondays, 06:00 UTC
workflow_dispatch:
inputs:
dmq_ref:
description: 'DelegateMQ branch or tag to build against'
required: false
default: 'master'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Configure CMake
run: cmake -S . -B build -DDMQ_GIT_TAG=${{ github.event.inputs.dmq_ref || 'master' }}

- name: Build
run: cmake --build build

- name: Run Async-SQLiteApp
run: ./build/Async-SQLiteApp
69 changes: 33 additions & 36 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,52 @@
# Example CMake command line to create project build files:
#
# cmake -B Build .
# cmake -B build .
#
# DelegateMQ is fetched from GitHub at the release tag DMQ_GIT_TAG when CMake
# configures. To build against a local DelegateMQ checkout instead, add
# -DFETCHCONTENT_SOURCE_DIR_DELEGATEMQ=<path>. To configure again without
# network access, add -DFETCHCONTENT_FULLY_DISCONNECTED=ON.

# Specify the minimum CMake version required
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.16)

# Project name and language (C or C++)
project(Async-SQLite VERSION 1.0 LANGUAGES C CXX)

# Set build options
set (DMQ_ALLOCATOR "OFF")
set (DMQ_UTIL "ON")
set (DMQ_THREAD "DMQ_THREAD_STDLIB")
set (DMQ_SERIALIZE "DMQ_SERIALIZE_NONE")
set (DMQ_TRANSPORT "DMQ_TRANSPORT_NONE")
include("${CMAKE_SOURCE_DIR}/DelegateMQ/DelegateMQ.cmake")
project(Async-SQLite VERSION 1.1.0 LANGUAGES C CXX)

# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# Collect all .cpp and *.h source files in the current directory
file(GLOB SOURCES "*.cpp" "*.h")

# Collect DelegateMQ predef source files
list(APPEND SOURCES ${DMQ_PORT_SOURCES})

# Organize delegate source files within IDE (Visual Studio)
source_group("Delegate Files" FILES ${DMQ_LIB_SOURCES})
source_group("Port Files" FILES ${DMQ_PORT_ONLY_SOURCES})
source_group("Extras Files" FILES ${DMQ_EXTRAS_SOURCES})

# Add subdirectories to include path
include_directories(
${DMQ_ROOT_DIR}
SQLite
Port
UnitTest
# DelegateMQ build options, set before DelegateMQ is added
set(DMQ_ALLOCATOR "OFF")
set(DMQ_UTIL "ON")
set(DMQ_THREAD "DMQ_THREAD_STDLIB")
set(DMQ_SERIALIZE "DMQ_SERIALIZE_NONE")
set(DMQ_TRANSPORT "DMQ_TRANSPORT_NONE")

# DelegateMQ release to build against
set(DMQ_GIT_TAG "v2.4.1" CACHE STRING "DelegateMQ release tag (or branch) to fetch")

include(FetchContent)
FetchContent_Declare(
delegatemq
GIT_REPOSITORY https://github.com/DelegateMQ/DelegateMQ.git
GIT_TAG ${DMQ_GIT_TAG}
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(delegatemq)

# Add an executable target
add_executable(Async-SQLiteApp ${SOURCES} ${DMQ_LIB_SOURCES})

# Add subdirectories to build
# SQLite and the async wrapper (SQLiteLib links DelegateMQ::DelegateMQ)
add_subdirectory(SQLite)

# Unit tests
add_subdirectory(UnitTest)

target_link_libraries(Async-SQLiteApp PRIVATE
# Example application
file(GLOB SOURCES "*.cpp" "*.h")
add_executable(Async-SQLiteApp ${SOURCES})

target_link_libraries(Async-SQLiteApp PRIVATE
SQLiteLib
UnitTestLib
)



40 changes: 0 additions & 40 deletions DelegateMQ/Common.cmake

This file was deleted.

127 changes: 0 additions & 127 deletions DelegateMQ/Defaults.cmake

This file was deleted.

99 changes: 0 additions & 99 deletions DelegateMQ/DelegateMQ.cmake

This file was deleted.

Loading