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
23 changes: 21 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,37 @@ AllowShortBlocksOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: false
BreakConstructorInitializers: BeforeColon
ReflowComments: false
AllowShortCaseLabelsOnASingleLine: false
BinPackParameters: false
BinPackArguments: false
PointerAlignment: Left
IndentCaseLabels: true
BreakBeforeBraces: Allman
ConstructorInitializerAllOnOneLineOrOnePerLine: true
SpaceInEmptyBlock: true
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
# uses a compiled language

- run: |
make clang-native
make clang

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
4 changes: 2 additions & 2 deletions .github/workflows/install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- name: Install dependencies
run: sudo apt-get install -y libev-dev libuv1-dev
- name: make gcc install
run: make BUILD_TYPE=Release INSTALL_PREFIX=/tmp/install-gcc tests-install-gcc-native
run: make BUILD_TYPE=Release INSTALL_PREFIX=/tmp/install-gcc tests-install-gcc
- name: make clang install
run: make BUILD_TYPE=Release INSTALL_PREFIX=/tmp/install-clang tests-install-clang-native
run: make BUILD_TYPE=Release INSTALL_PREFIX=/tmp/install-clang tests-install-clang
8 changes: 4 additions & 4 deletions .github/workflows/unit-test-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: make gcc Debug
run: make gcc-native BUILD_TYPE=Debug
run: make gcc BUILD_TYPE=Debug
- name: unit tests gcc Debug
run: make tests-gcc-native BUILD_TYPE=Debug
run: make tests-gcc BUILD_TYPE=Debug
- name: make clang Debug
run: make clang-native BUILD_TYPE=Debug
run: make clang BUILD_TYPE=Debug
- name: unit tests clang
run: make tests-clang-native BUILD_TYPE=Debug
run: make tests-clang BUILD_TYPE=Debug
8 changes: 4 additions & 4 deletions .github/workflows/unit-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: make gcc Release
run: make gcc-native BUILD_TYPE=Release
run: make gcc BUILD_TYPE=Release
- name: unit tests gcc Release
run: make tests-gcc-native BUILD_TYPE=Release
run: make tests-gcc BUILD_TYPE=Release
- name: make clang Release
run: make clang-native BUILD_TYPE=Release
run: make clang BUILD_TYPE=Release
- name: unit tests clang
run: make tests-clang-native BUILD_TYPE=Release
run: make tests-clang BUILD_TYPE=Release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ build
build_*
bin/*
.vscode/settings.json
.vs
19 changes: 15 additions & 4 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ target_include_directories(rapidjson INTERFACE rapidjson/include)
add_library(doctest INTERFACE)
target_include_directories(doctest INTERFACE doctest/doctest)

# SQLite 3
add_subdirectory(sqlite3)

# Use default flags for the libwebsockets library
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -ggdb3")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb3")
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
if (NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT} -O0 -g3 -ggdb3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT} -O0 -g3 -ggdb3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT} -O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT} -O2 -DNDEBUG")
else()
set(DISABLED_WARNING_LWS "/WX- /wd4191 /wd4996")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT} ${DISABLED_WARNING_LWS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT} ${DISABLED_WARNING_LWS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT} ${DISABLED_WARNING_LWS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT} ${DISABLED_WARNING_LWS}")
endif()

add_subdirectory(libwebsockets)
2 changes: 0 additions & 2 deletions 3rdparty/libwebsockets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,6 @@ endif()
if (MSVC)
# Turn off pointless microsoft security warnings.
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
# Fail the build if any warnings
add_compile_options(/W3 /WX)
# Unbreak MSVC broken preprocessor __VA_ARGS__ behaviour
if (MSVC_VERSION GREATER 1925)
add_compile_options(/Zc:preprocessor /wd5105)
Expand Down
20 changes: 20 additions & 0 deletions 3rdparty/sqlite3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#################################################################################
# SQLite3 library #
#################################################################################

# Use default flags for the SQLite3 library
if (NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT} -O0 -g3 -ggdb3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT} -O0 -g3 -ggdb3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT} -O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT} -O2 -DNDEBUG")
else()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT} /WX-")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT} /WX-")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT} /WX-")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT} /WX-")
endif()

# Static library
add_library(sqlite3 sqlite3.c)
target_include_directories(sqlite3 PUBLIC .)
Loading