Skip to content

Commit 6d974f9

Browse files
authored
cbor support (#1131)
1 parent 0cb24e1 commit 6d974f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8366
-8
lines changed

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,google-runtime-int,llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-non-const-parameter,-readability-avoid-const-params-in-decls,-readability-else-after-return,-readability-isolate-declaration,-readability-uppercase-literal-suffix,-bugprone-sizeof-expression,-bugprone-easily-swappable-parameters,-readability-identifier-length,-misc-no-recursion,-readability-function-cognitive-complexity,-readability-magic-numbers'
33
WarningsAsErrors: '*'
4-
HeaderFilterRegex: '.*\.[h|inl]$'
4+
HeaderFilterRegex: '^(?!.*external).*\.[h|inl]$'
55
FormatStyle: 'file'
66
CheckOptions:
77
- key: readability-braces-around-statements.ShortStatementLines

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ file(GLOB AWS_COMMON_SRC
5353
)
5454

5555
file (GLOB AWS_COMMON_EXTERNAL_SRC
56-
"source/external/*.c")
56+
"source/external/*.c"
57+
"source/external/libcbor/*.c"
58+
"source/external/libcbor/cbor/*.c"
59+
"source/external/libcbor/cbor/internal/*.c"
60+
)
61+
5762

5863
option(AWS_NUM_CPU_CORES "Number of CPU cores of the target machine. Useful when cross-compiling." 0)
5964

@@ -213,6 +218,10 @@ endif()
213218
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0.0)
214219
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1)
215220

221+
# libcbor files do includes like: #include "cbor/cbor_export.h"
222+
# To make these paths work, add the location we're storing them as a search path.
223+
target_include_directories(${PROJECT_NAME} PRIVATE
224+
${CMAKE_CURRENT_SOURCE_DIR}/source/external/libcbor)
216225
target_include_directories(${PROJECT_NAME} PUBLIC
217226
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
218227
$<INSTALL_INTERFACE:include>)

THIRD-PARTY-LICENSES.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,29 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5555
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
5656
THE SOFTWARE.
5757

58+
------
59+
60+
** libcbor; version 0.11.0 -- https://github.com/PJK/libcbor
61+
Copyright (c) 2014-2017 Pavel Kalvoda
62+
63+
MIT License
64+
65+
Copyright (c) 2014-2017 Pavel Kalvoda
66+
67+
Permission is hereby granted, free of charge, to any person obtaining a copy
68+
of this software and associated documentation files (the "Software"), to deal
69+
in the Software without restriction, including without limitation the rights
70+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
71+
copies of the Software, and to permit persons to whom the Software is
72+
furnished to do so, subject to the following conditions:
73+
74+
The above copyright notice and this permission notice shall be included in all
75+
copies or substantial portions of the Software.
76+
77+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
78+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
79+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
80+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
81+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
82+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
83+
SOFTWARE.

0 commit comments

Comments
 (0)