Jonah Beckford
014d4ea4df
Implement attrs: extendedattribute and extraheader
2023-09-25 21:23:22 -07:00
Jonah Beckford
d64f4d1c62
GoogleTest 1.14.0 when C++14 compiler available (2/2)
2023-09-25 18:32:07 -07:00
Jonah Beckford
a76885dfac
GoogleTest 1.14.0 when C++14 compiler available
2023-09-25 16:25:31 -07:00
Jonah Beckford
9bc6befee7
Cache variable BUILD_SHARED_LIBS
2023-09-25 16:07:35 -07:00
Jonah Beckford
b6e04c7d38
Add C_CAPNPROTO_ENABLE_INSTALL
2023-09-23 22:21:14 -07:00
Anton Kochkov
1ed0aed18c
Fix repository links in README
2023-09-07 05:29:32 +00:00
Jonah Beckford
0d89427d71
Fix broken link
2023-09-06 22:31:36 +00:00
Jonah Beckford
e4b5a71a46
Add POSITION_INDEPENDENT_CODE to CapnC::Runtime
2023-08-24 22:45:17 -07:00
Jonah Beckford
f703bd962c
Use dksdk.android.ndk.download location
2023-08-10 16:32:35 -07:00
Jonah Beckford
a5138e4aaf
Do ./dk dkml.wrapper.upgrade
2023-08-10 16:27:55 -07:00
Jonah Beckford
2aeccdbe6a
Cache .ci for Conda CI machines
2023-08-08 09:06:00 -07:00
Jonah Beckford
a3e6f6c331
Instructions for CMake usage
...
Also do lint fixes for Markdown.
Also, do not install tests code, especially
GTest, when installing c-capnproto
through CMake
2023-08-08 07:00:46 -07:00
Jonah Beckford
d8b55078ba
Add C++ standard to CMake for MSVC
2023-08-07 20:55:41 -07:00
Jonah Beckford
f07596dbb5
Add CMake and tests
...
- Port tests to GitLab
- Add GitLab CI test matrix
- Remove gtest submodule
2023-08-07 20:28:42 -07:00
Jonah Beckford
7056638935
Avoid undefined left shift of negatives
2023-08-07 17:26:44 -07:00
Jonah Beckford
311b9cb0e0
Fix clang-tidy bugprone-macro-parentheses
...
Correct the definition of capnp_use(x) macro.
> recommended to surround macro arguments
> in the replacement list with parentheses. This
> ensures that the argument value is calculated
> properly.
2023-08-03 18:19:55 -07:00
Jonah Beckford
c662042a60
Read schemas in binary on Windows
2023-06-22 12:11:03 -07:00
Jonah Beckford
25784e3ccf
Use SSIZE_T from BaseTsd.h to compile MSVC 32-bit
2023-06-07 21:24:33 -07:00
Jonah Beckford
01657913b2
Put alignment on segment fields. Work with MSVC
2023-05-09 18:22:57 -07:00
David Lamparter
632f0d73a1
Update autogenerated files
...
Signed-off-by: David Lamparter <equinox@diac24.net>
2023-04-23 14:35:11 +02:00
David Lamparter
79d6035e3f
Revert "Merge pull request #54 from cbrune/curt/const"
...
This reverts commit 4109705a8d , reversing
changes made to 5c4e497a72 .
2023-04-23 14:33:18 +02:00
David Lamparter
eb1839e001
Fix bool defaults for non-first bit
...
Fixes : #58
Signed-off-by: David Lamparter <equinox@diac24.net>
2023-04-23 14:30:11 +02:00
David Lamparter
b2b7ade9c0
Fix random warnings
...
Signed-off-by: David Lamparter <equinox@diac24.net>
2023-04-23 14:21:58 +02:00
David Lamparter
c79b3afbbd
Merge pull request #24 from jlferrer/fix_compiler_big_files
2023-04-23 14:12:52 +02:00
David Lamparter
32520c5eb3
Merge pull request #60 from XVilka/github-ci
2023-04-23 14:12:34 +02:00
David Lamparter
32def19b9d
Merge pull request #57 from XVilka/meson-build
2023-04-23 14:12:13 +02:00
David Lamparter
4109705a8d
Merge pull request #54 from cbrune/curt/const
2023-04-23 14:11:49 +02:00
David Lamparter
5c4e497a72
Merge pull request #53 from cbrune/curt/reduce-imports
2023-04-23 14:11:30 +02:00
David Lamparter
0653675ef4
Merge pull request #52 from cbrune/curt/namespace
2023-04-23 14:11:13 +02:00
David Lamparter
2116160973
Merge pull request #49 from detly/capn_size_size
2023-04-23 14:10:48 +02:00
David Lamparter
560f2c7cb9
Merge pull request #45 from snar/p-field
2023-04-23 14:10:24 +02:00
David Lamparter
4a39ec4251
Merge pull request #46 from snar/freebsd-endian
2023-04-23 14:10:08 +02:00
David Lamparter
b87f0ee3f6
README: make project state clear
...
Signed-off-by: David Lamparter <equinox@diac24.net>
2023-04-23 14:09:24 +02:00
Anton Kochkov
6377038820
Add GitHub CI
2023-04-23 17:32:46 +08:00
Anton Kochkov
53f6def21b
Add Meson building instructions in README
2023-04-23 17:21:34 +08:00
Anton Kochkov
6b8e3caed3
Ignore subprojects in git
2023-04-23 17:19:57 +08:00
Anton Kochkov
6eb98cbd5e
Initial Meson build support
2023-04-23 17:10:53 +08:00
Curt Brune
3385b1e73a
add #define definitions for integer constants
...
When working with integer constants, it is convenient to use #define
macros for the constants, as opposed to a variable of constant type.
This patch adds a '#define CONSTANT (value)' definition to the
generated header files. The name of the constant is in
SCREAMING_SNAKE_CASE, converted from the regular camelCase.
Signed-off-by: Curt Brune <curt@enfabrica.net>
2022-10-27 13:11:32 -07:00
Curt Brune
40d689516a
add 'const' keyword to generated constants
...
This patch adds the 'const' keyword to constant definitions generated
by the compiler. Previously the compiler generated constants like
this:
foo.h
======
extern int foo;
foo.c
======
int foo = 5;
With this patch, the generated code looks like:
foo.h
======
extern const int foo;
foo.c
======
const int foo = 5;
Signed-off-by: Curt Brune <curt@enfabrica.net>
2022-10-14 09:17:09 -07:00
Curt Brune
c70796b9fb
add a capnp annotation for creating name spaces
...
This patch adds an annotation for creating name spaces within
capnproto files with the C-language code generator.
Use the annotation like this:
using C = import "/c.capnp";
$C.namespace("sample_namespace_");
The string passed into the namespace annotation is prepended to the
name of all the struct's in the schema file.
Signed-off-by: Curt Brune <curt@enfabrica.net>
2022-10-14 09:15:11 -07:00
Curt Brune
1772643adb
only generate '#include' for imports that are used
...
This patch modifies the code generator to only generate C-language
`#include <imported_schema.h>` lines for imports that are actually used.
Imagine this transitive import scenario: schema A imports a definition
from schema B. However, the definition imported from schema B was
itself imported from schema C.
In this case, the code generated for schema A need not include the
header file for schema B, as it only needs definitions from schema C.
Signed-off-by: Curt Brune <curt@enfabrica.net>
2022-10-14 09:14:31 -07:00
Jason Heeris
05482f36a8
Use int64_t for the return value of capn_size(). This makes it consistent with a recent change to capn_write_mem().
2021-05-10 22:39:28 +08:00
Jason Heeris
0650ccbf17
Merge pull request #47 from QQNN-blue/change_capn_write_mem_return_val_type
...
Change capn_write_mem return value from int to int64_t
2021-05-10 22:19:28 +08:00
Jason Heeris
939aa30c0a
Merge pull request #37 from detly/write_size
...
Implemented capn_size() for calculating buffer size
2021-05-10 21:58:57 +08:00
Jason Heeris
a2179f48c8
Make the comment for capn_size() clearer that it only applies to unpacked serialisation.
2021-05-10 21:55:01 +08:00
Jason Heeris
bbc208cf04
Simplified size calculation.
2021-05-10 17:52:42 +08:00
Jason Heeris
d29faccc64
Implemented capn_size() for dynamically calculating the required buffer size for capn_write_mem().
2021-05-10 17:52:42 +08:00
Jason Heeris
024dca615a
Merge pull request #42 from detly/annotations
...
Two extra annotations: donotinclude and typedefto
2021-05-10 17:43:14 +08:00
Jason Heeris
b619a87c61
Merge pull request #44 from detly/nested_unions
...
Fix code generation for nested unions.
2021-05-10 17:37:05 +08:00
Jason Heeris
515c06c689
Merge pull request #41 from detly/enum_cast
...
Fix bug where enums were treated interchangeably with uint16_t.
2021-05-10 17:35:12 +08:00