138 Commits

Author SHA1 Message Date
Takatoshi Kondo
01f3d24fee Unify all package related names to msgpack-c.
Update the version to 6.0.0.
2023-02-28 10:49:13 +09:00
Silvio Traversaro
ce42436f20
Change CMake package name to msgpackc 2023-01-05 14:55:10 +01:00
Vincent Mallet
dc51f5d236 Better visibility for C tests:
- turn on output-on-failure by default
 - explain how to run tests in README
2021-03-23 16:33:52 -07:00
yuangongji
9eba7c482c remove C++ part in source code 2020-06-05 18:16:07 +08:00
yuangongji
d9c5978958 add MSGPACK_CXX_ONLY option to build c++ libraries only 2020-02-19 09:07:16 +08:00
yuangongji
19df3314f4 add coverage target in cmake 2020-01-11 13:23:19 +08:00
Takatoshi Kondo
3b2bb56243 Fixed #825.
Added verbose option to windows CIs.
Added C compiler flag operation for MSVC.
Fixed invalid /WX flag matching on MSVC at test.
2019-12-25 14:24:24 +09:00
Stefan Herbrechtsmeier
6046d5c666 cmake: Remove alias from package config
The cmake target of an alias may not be an Imported Target.
Always build the msgpackc target and only build the msgpackc-static
target if both should be build to fix issue #801. Thereby the type
(shared or static) of the msgpackc target depends on the build
configuration.
2019-09-20 22:10:40 +02:00
Takatoshi Kondo
fe2346efa1
Merge pull request #721 from dennisklein/master
Export an interface target for the C++ header-only library
2018-08-17 07:41:31 +09:00
Takatoshi Kondo
b804e12dec Fixed BUILD_SHARED_LIBS meaning.
There are three switches to build static/shared libraries.

Here is the logic.

If BUILD_SHARED_LIBS is defined
   If BUILD_SHARED_LIBS is ON
      build only shared-library
   Else
      build only static-library
   Endif
Else
   If MSGPACK_ENABLE_SHARED is ON (default)
      build shared-library
   Endif
   If MSGPACK_ENABLE_STATIC is ON (default)
      build static-library
   Endif
Endif

Here is common settings:

If you want to build both static/shared libraries, don't set switches.
If you want to build only shared-library, set BUILD_SHARED_LIBS=ON.
If you want to build only static-library, set BUILD_SHARED_LIBS=OFF.
2018-08-15 16:39:21 +09:00
Dennis Klein
99c221ad01
Export an interface target for the C++ header-only library 2018-08-13 20:54:29 +02:00
Takatoshi Kondo
ac64fcace8 Added so version if shared object only build.
Fixed MSGPACK_INSTALLTARGETS list manipulation.
2018-08-10 19:39:43 +09:00
Takatoshi Kondo
3aaadb9b12 Fixed #703.
Added no build static-library option.
2018-08-08 20:14:48 +09:00
Takatoshi Kondo
ddb320197a
Merge pull request #689 from derwolfe/san-2
Sanitizer build for fuzzers
2018-05-21 19:25:30 +09:00
Chris Wolfe
dc51f6493b add/modify cmake and travis to get the regression tests built with sanitizers 2018-05-19 10:59:59 -05:00
James McCoy
8701aeec30 Strip the build path from generated documentation
Since FULL_PATH_NAMES = YES, Doxygen includes the full build path to the
file in the documentation.  This is most prevalent in the <title>
attribute for a file.

Setting STRIP_FROM_PATH = ${CMAKE_CURRENT_SOURCE_DIR}/include means that
only the relevant portion of the path (that which the user would need to
use) is included.

--- a/msgpack_8h.html	2018-05-12 14:03:34.098715879 -0400
+++ b/msgpack_8h.html	2018-05-12 14:04:17.386349607 -0400
@@ -5,7 +5,7 @@
 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
 <meta name="generator" content="Doxygen 1.8.13"/>
 <meta name="viewport" content="width=device-width, initial-scale=1"/>
-<title>MessagePack for C: /home/jamessan/src/debian.org/pkg-vim/msgpack-c/include/msgpack.h File Reference</title>
+<title>MessagePack for C: msgpack.h File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <script type="text/javascript" src="jquery.js"></script>
 <script type="text/javascript" src="dynsections.js"></script>
2018-05-12 14:04:48 -04:00
Takatoshi Kondo
347658cdc1 Updated the version to 3.0.0.
See https://github.com/msgpack/msgpack-c/pull/639#issuecomment-353786498
So I updated the version to 3.0.0.
In the version 2.x, it keeps the original behavior.
2018-04-08 22:27:45 +09:00
Takatoshi Kondo
423eaf25fb Removed -O3 -g -Werror options from CmakeLists.txt.
Added -g -Werror options to .travis.yml.
2018-04-04 13:07:21 +09:00
Emmanuel Lepage Vallée
579212996f
build: Do not set -g, -O3 and -Werror CFLAGS
Hello, here are a few changes to the default CFLAGS

## Why Werror

With each new compiler version, your code "break" and fail to compile. It is true that it's a sometime a "bug" in the code and need visibility to get fixed. However, Werror should *always* be a local CFLAGS and not a project one, see Google for endless people arguing back and forth and removing Werror is now the prevalent winner of that argument. In the latest GCC, it fails to compile because the fwrite result in unchecked. Even if you fix this in new releases, you cannot fix the past and all existing releases used in stable products suddenly fail to compile, wasting everybody time.

## Why -g

This should be decided by the one who compiles the code. Some people want small and pre-stripped binaries and appending this to the CFLAGS breaks the standard way of achieving this. Prepend it if you wish, but please do not append it.

## Why -O3

On many systems with limited cache or higher memory latency, `O3` is slower than `O2`, so IMHO it should not be hardcoded. In my case I used `Os` and it's faster. The `O` value should be left to the system, not hardcoded.
2017-12-12 01:26:22 -05:00
Takatoshi Kondo
10be66712d Partially fixed #460.
If msgpack-c compiles on "sparc" platform, then define
MSGPACK_ZONE_ALIGN=8 macro.
It allocates 8byte (64bit) alignment memory on zone allocating.
2017-07-20 11:00:16 +09:00
Takatoshi Kondo
a502097fd0 Solved #597.
Added `std::optional` and `std::string_view` adaptors.
2017-06-13 18:22:48 +09:00
Léonard Gérard
6871a82af7 Do not convert file everytime it is configured 2017-05-22 21:57:21 -07:00
Stefan Herbrechtsmeier
0aaf95608f cmake: Make boost mandatory if MSGPACK_BOOST is ON
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2017-05-13 00:57:03 +02:00
Stefan Herbrechtsmeier
918e7edba4 cmake: Add Boost library link directory
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2017-05-13 00:56:19 +02:00
Stefan Herbrechtsmeier
3d82c2d651 Add cmake package config support
Add support for CMake find_package command to msgpack. The package
exports the two targets msgpackc-static and msgpackc if shared is
enabled. The CMake find_package command works after installation
of msgpack and during build of another project which adds msgpack
as sub project via add_subdirectory command.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-04 08:33:18 +02:00
Stefan Herbrechtsmeier
09e8833d53 Add boost include directories only if MSGPACK_BOOST is enabled
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-03-22 13:04:03 +01:00
Thomas Holder
a51f33c02f CMake <= 2.8.11 compatibility
Keep compatible with cmake <= 2.8.11 by using the legacy PATH alias for
DIRECTORY with get_filename_component.
2017-03-08 21:45:13 -05:00
Takatoshi Kondo
88032f37e1 Merge pull request #570 from lluixhi/boost
Enable building against dynamically-linked Boost
2017-03-05 13:02:14 +09:00
Aric Belsito
a6599e5fb4
Enable building against dynamically-linked Boost 2017-03-03 12:31:56 -08:00
Aric Belsito
791f55da35
Make header install obey MSGPACK_ENABLE_CXX 2017-03-03 12:25:55 -08:00
Takatoshi Kondo
c704d4bfab Added new example. 2017-01-09 16:18:35 +09:00
Takatoshi Kondo
4466bda819 Updated travis-ci.
Use container based build `sudo: false`.
2017-01-07 01:20:22 +09:00
Takatoshi Kondo
84ad9a2634 Added Spirit.X3 based parse.
It uses iterator pair instead of data and size.
2017-01-05 21:24:25 +09:00
Takatoshi Kondo
4ec0fdf207 Fixed #544.
Replaced -std=c++03 with -std=c++98.
2016-12-11 15:53:59 +09:00
Takatoshi Kondo
73af452ed8 Fixed #507.
Removed -Wno-mismatched-tags option from g++.
g++ doesn't support the option and doesn't care the mismatch originally.
2016-07-29 19:49:53 +09:00
Takatoshi Kondo
45b8d29cc0 Added CMAKE_VERSION checking.
cmake version less than 3.1 doesn't have the policy CMP0054.
2016-06-22 00:20:19 +09:00
Takatoshi Kondo
0bfe4c49b7 Set CMP0054 policy to NEW. 2016-06-21 23:50:33 +09:00
Yusuke Sasaki
edc8004985 avoid to install DLLs in lib/ 2016-06-18 02:51:01 +09:00
Yusuke Sasaki
7f37eac04c switch suffix of import library between MSVC and MinGW 2016-06-18 02:50:51 +09:00
Takatoshi Kondo
7094e0872e Added msgpack-c library file generation.
When you add or remove .h .hpp .c files in the msgpack-c library, run
make_file_list.sh. It generates (overwrites) Files.cmake for cmake and
src/files.mk for autotools. They are a part of repository managed
files. Files.cmake is included by CMakeLists.txt and src/files.mk is
included by src/Makefile.am.
2016-05-29 21:09:03 +09:00
Takatoshi Kondo
cc02da0ccf Fixed #465
Added C-Style array support.

Existing mapping:
  convert:
  pack:
    char[N]       => STR
    const char[N] => STR
  object:
    char[N]       => STR (v1 only)
    const char[N] => STR (v1 only)
  object_with_zone:
    char[N]       => STR
    const char[N] => STR

Additional mapping:

  convert:
    STR        => char[N]
    ARRAY      => T[N]
  pack:
    T[N]       => ARRAY
    const T[N] => ARRAY
  object:
  object_with_zone:
    T[N]       => ARRAY
    const T[N] => ARRAY
2016-05-16 23:00:30 +09:00
Takatoshi Kondo
c9814de513 Added -Wno-mismatched-tags to msgpackc-static. 2016-04-14 14:44:01 +09:00
proller
bf7bc19ccb Fix compiling without shared 2016-04-06 21:42:22 +03:00
Takatoshi Kondo
db90ee4283 Removed obsolete unpack() API. 2016-03-26 11:46:45 +09:00
Takatoshi Kondo
31a06a0682 Removed obsolete APIs form v2.
Removed MSGPACK_DISABLE_LEGACY_CONVERT from v2. Those APIs are removed
from v2.
2016-03-25 09:16:27 +09:00
Takatoshi Kondo
54cb4350b3 Re-organized tree to prepare for version 2.0.0.
See https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_versioning
2016-01-31 19:28:31 +09:00
Takatoshi Kondo
3c271892e3 Fixed #399
If MSGPACK_DISABLE_LEGACY_CONVERT is defined, msgpack::object::convert(T*) is removed.
Added MSGPACK_DISABLE_LEGACY_CONVERT to build system and documents.

Please define MSGPACK_DISABLE_LEGACY_CONVERT and update your code as follows:
Replace
  int i;
  obj.convert(&i); // Removed pointer version
with
  int i;
  obj.convert(i);  // Reference version
2016-01-21 22:28:53 +09:00
Takatoshi Kondo
ba73841240 Added MSGPACK_DISABLE_LEGACY_NIL to build system and documents. 2016-01-21 20:47:16 +09:00
Takatoshi Kondo
c2f523e463 Merge branch 'fix_382' of https://github.com/redboltz/msgpack-c into redboltz-fix_382 2016-01-15 12:44:40 +09:00
Takatoshi Kondo
c06d4d70ef Fixed #395
libmsgpack.[a|so] is the library file for C++.
libmsgpackc.[a|so] is the library file for C.
Since version 1.0.0, the C++ parts of msgpack-c is a header only
library. So libmsgpack.* shouldn't be generated.

On the autotools building environment, removed libmsgpack.*
generation. On the cmake building environment, replaced libmsgpack.*
with libmsgpackc.* and set so-version to 2.0.0.
2016-01-14 07:59:37 +09:00