Commit Graph

29 Commits

Author SHA1 Message Date
Martchus 1ea5b1e744 Avoid CMake deprecation warning by bumping version 2023-07-23 21:20:51 +02:00
Martchus a6b9d771aa Do not treat warning "'this' pointer is null" appearing with GCC 12 as error
It is about code included from libclang and likely wrong so let's just not
abort the compilation due to it.
2022-05-12 20:23:33 +02:00
Martchus 891b96a38f Fix build with custom target suffix 2020-01-31 19:49:18 +01:00
Martchus c68d9ea384 Format CMake files with cmake-format 0.6.7 2020-01-26 20:42:03 +01:00
Martchus f75c8d77a2 Fix finding LibTooling when 'clang-cpp' target is used
See https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html#build-system-changes
2019-11-14 17:18:49 +01:00
Martchus fecde7d2d1 Improve adding RapidJSON include dirs to tests
* Also check for `RapidJSON_INCLUDE_DIRS` which seems to be used now
* Do not add `-I` without subsequent path if the include directory
  is missing/empty which would lead to the Clang error:
  `error: unable to handle compilation, expected exactly one compiler job in ''`
2019-08-09 17:54:08 +02:00
Martchus 6542eab80d Adapt to changes in c++utilities 2019-06-14 19:16:51 +02:00
Martchus 669aa16479 Fix building against LLVM/Clang 8 2019-03-27 14:41:57 +01:00
Martchus 1f6fade6c2 Apply cmake-format 2019-02-09 21:25:11 +01:00
Martchus 39dcba215e Let CMake generate code for test application 2019-01-13 22:27:35 +01:00
Martchus f140c7f436 Use C++ 17 2018-06-26 00:07:59 +02:00
Martchus c170993392 Reduce code duplication between serialization generators 2018-06-23 18:04:30 +02:00
Martchus e93be04e35 Implement generator for binary (de)serialization
Still need to refactor common code with the JSON generator.
2018-06-23 17:25:30 +02:00
Martchus 7db20f5ad5 List all required LLVM/Clang libraries explicitely
Those libraries are direct dependencies and must be listed
explicitely when linking dynamically because transitive
dependencies of clangTooling are not pulled automatically
by CMake in this case.

This is required to use LLVM 6 which has switched to dynamic
libraries (at least under Arch Linux).
2018-03-14 18:33:15 +01:00
Martchus 54d4a15d4f Set Clang's resource dir and platform triple correctly
* The option `-resource-dir` must be specified to
  point to Clang's resource directory containing built-in
  header files. Then the massive warnings are gone.
* Setting the platform triple seems to be the right way
  for cross-compilation. Note that the stdlib.h still needs
  to be worked around.
2018-02-03 15:44:10 +01:00
Martchus baf7eec38e Invoke add_reflection_generator_invocation only if building tests 2018-01-20 19:46:17 +01:00
Martchus c5968f1663 Test whether code generation is skipped for included structs 2017-12-31 00:37:30 +01:00
Martchus f5a240649f Separate RapidJSON specific parts
So when extending this for further applications of
reflection, the JSON-specific parts can be made optional.
2017-11-17 22:04:01 +01:00
Martchus 8c3dd5535d Pass the include dir for c++utilities and RapidJSON to tests
So test cases do not fail if the header files for those
dependencies are installed in a custom location.
2017-11-17 22:01:18 +01:00
Martchus 227d3f3942 Allow passing target config to generator invocation
So the code generator 'sees' the source code in the same
way as the compiler does.
2017-11-17 21:42:49 +01:00
Martchus 19cab9c791 Bundle c++utilities correctly
* Use the c++utilities source directory for includes rather
  than the locations where headers are goint to be installed
* Call find_package for c++utilities only once
2017-11-17 21:21:34 +01:00
Martchus ee0ca561c0 Allow exporting generated functions and don't inline by default 2017-11-11 22:53:40 +01:00
Martchus 062f8c0d27 Allow enabling (de)serialization for 3rd party structs 2017-11-06 23:27:27 +01:00
Martchus c4b4429880 Test --json-classes argument 2017-11-06 20:04:42 +01:00
Martchus 8b61fcc29a Make location of code generator customizable 2017-11-03 22:41:51 +01:00
Martchus 104e362762 Imporve documentation and build script 2017-10-28 18:24:12 +02:00
Martchus a768408493 Refactor JsonSerializationCodeGenerator
* JSONSerializationCodeGenerator -> JsonSerializationCodeGenerator
* Move to separate file
2017-10-28 16:31:07 +02:00
Martchus c026dafff7 Split generator tests into multiple files 2017-10-25 18:25:47 +02:00
Martchus b725f59e78 Rename moc -> generator 2017-10-25 17:41:19 +02:00