Commit Graph

549 Commits

Author SHA1 Message Date
Daniel Griscom
e8c812b500 Added test cases and documentation for json_array_foreach() 2013-05-12 15:34:26 -04:00
Daniel Griscom
6950cd203b Add json_array_foreach() #define, parallelling json_object_foreach() 2013-05-12 15:03:26 -04:00
Petri Lehtinen
d3bd463897 Merge pull request #115 from JoakimSoderberg/cmake_pkgconfig
Cmake pkgconfig
2013-05-06 22:38:28 -07:00
Joakim Soderberg
54d86fb4a4 Create and install the pkg-config file jansson.pc for CMake.
Use the same jansson.pc.in file as the ./configure script does to generate the jansson.pc file for pkg-config. Also make an install rule for this.
2013-05-06 12:34:52 +00:00
Joakim Soderberg
42d398243d Fix the cmake Sphinx find script.
The cmake sphinx find script version parsing assumes a format of 1.2.3, but sphinx version can be 1.2b3 as well, so parse those correctly as well.
2013-05-06 12:31:29 +00:00
Andrei Epure
f675514815 jansson:doc: modified incref doc
Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
2013-04-29 15:32:52 +03:00
Andrei Epure
5793142861 test:suites:api: modified error message
In the "/* perform the same update again */" area the error
message should be "unable to update an non-empty object"
instead of "unable to update an empty object".

Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
2013-04-29 15:32:52 +03:00
Petri Lehtinen
b227f96c45 Merge pull request #112 from JoakimSoderberg/fpic_cmake_support
Additional CMake documentation + Fpic cmake support
2013-04-29 03:56:23 -07:00
Joakim Soderberg
0687442f5d Fixed some minor issues. 2013-04-25 13:59:26 +00:00
Joakim Soderberg
8390c90a91 Added more detailed CMake documentation.
- Also added better FindSphinx support so that we can detect the version and not  have a fatal error if it's too old.
- Added support for building latex documentation with -DBUILD_LATEX. Off by default.
- Added suppor for building man pages with -DBUILD_MAN. On by default (unless sphins is too old to support it).
2013-04-24 14:14:00 +00:00
Joakim Soderberg
3000831365 Use -fPIC when possible.
So that we can link the library statically to shared libraries.
2013-04-18 09:25:17 +00:00
Petri Lehtinen
6b1cba94e3 Document CMake build process, deprecate the VS2010 project 2013-04-15 10:31:23 +03:00
Petri Lehtinen
9591d3a155 Tweak Android build documentation 2013-04-15 10:25:32 +03:00
Petri Lehtinen
83d04ddd68 Merge branch 'master' of git://github.com/svic/jansson 2013-04-15 10:21:31 +03:00
Petri Lehtinen
70232676f7 Merge branch '2.4' 2013-04-15 09:15:35 +03:00
Petri Lehtinen
257a716073 Fix the signature again, and also rest of the errors
Next time, remember to check with -Werror first...
2013-04-15 09:15:03 +03:00
Petri Lehtinen
0ccd2c7715 Merge branch '2.4' 2013-04-15 09:09:01 +03:00
Petri Lehtinen
42e307b3c5 Fix the signature of a test function 2013-04-15 09:08:47 +03:00
Petri Lehtinen
61cba2ae50 Merge branch '2.4' 2013-04-15 08:49:47 +03:00
Petri Lehtinen
867079c820 json_dump*(): Don't crash if json is NULL and JSON_ENCODE_ANY is set 2013-04-15 08:49:09 +03:00
Garner Lee
d20751d53d Add android doc. 2013-04-11 13:32:04 -07:00
Petri Lehtinen
6281d1c549 Merge pull request #108 from Zillode/1edff47af38a2335f88300ee6dc437118f5a20ff
Fixes redefined warnings ("_GNU_SOURCE")
2013-04-02 05:40:49 -07:00
Petri Lehtinen
8fd475bf96 Merge branch '2.4' 2013-04-01 14:41:14 +03:00
Petri Lehtinen
bbd3b0ca4f Fix a typo 2013-04-01 14:41:10 +03:00
Garner Lee
7c4f323abc Create Android.mk, preconfigured jansson_config.h and CleanSpec.mk for Android-like build systems. 2013-03-27 17:31:05 -07:00
Lode Hoste
1edff47af3 Do not define _GNU_SOURCE is already defined 2013-03-14 21:34:11 +01:00
Petri Lehtinen
dc2d54d9c6 Fix a refleak in test/bin/json_process.c 2013-03-14 22:24:57 +02:00
Petri Lehtinen
263fd0c9d3 Remove trailing whitespace 2013-03-14 22:18:21 +02:00
Petri Lehtinen
6db70f0301 cmake: Add stripped tests 2013-03-14 22:16:16 +02:00
Petri Lehtinen
70f663db29 Merge branch 'rebased_cmake_patch' of git://github.com/JoakimSoderberg/jansson 2013-03-14 22:16:10 +02:00
Joakim Söderberg
59bc1f42e4 Got rid of some warnings for unused variables. 2013-03-13 00:15:37 +01:00
Joakim Söderberg
b1b4f307d5 Add back the old ENV variabe approach to json_process.
Enable using the old envrionment variable passing of settings for json_process
so that the current autoconf test suite scripts can run nicely.

json_process now takes an optional command line parameter --env which
causes it to use the old method of reading the settings from
environment variables instead of directly from the "env" file.

Also added a --strip command line option, this will be used to
run the stripped tests with CMake as well.
2013-03-13 00:09:08 +01:00
Petri Lehtinen
a3e6369105 Merge branch '2.4' 2013-03-09 21:15:22 +02:00
Petri Lehtinen
3d0d61fdaf Use json_decref() properly in tutorial 2013-03-09 21:15:09 +02:00
Joakim Soderberg
650707fccc Moved *config.h.cmake to the cmake directory. 2013-03-07 18:38:47 +01:00
Joakim Soderberg
33b0855b27 Get rid of type warning on MSVC.
We should use json_int_t instead of int, since this can be different
depending on platform. Also MSVC warns that this can cause "loss of
information" since it's converting long long to int.
2013-03-07 16:27:41 +01:00
Joakim Soderberg
7214a222c7 Skip using a debug postfix with visual studio.
The output dir is different anyway, and this just makes it more
complicated to build projects that link to this, because they need
different link rules based on the build type.
2013-03-07 16:21:35 +01:00
Joakim Söderberg
81ce127048 Compile tests by default.
- Encourage actually using the unit tests by compiling them by default.
Set the WITHOUT_TESTS variable to build without instead...

- Changed comments to keep within 80 characters.
- Don't have a hard coded path for valgrind, simply assuem it's in the path instead (an OSX ports install puts it in /opt/local/bin for instance).
- Fixed building the shared lib.
2013-03-07 16:19:56 +01:00
Joakim Söderberg
344d2b00ea Fix incorrect cast to ssize_t.
gcc 4.2.1 warns about a possible incorrect cast to ssize_t when comparing against refcount, which is of type size_t. signed vs unsigned comparison.

Sinc warnings are treated as errors (as in the autoconf project) this would cause a compile error.
2013-03-07 16:13:40 +01:00
Joakim Söderberg
52a8072727 Rename the CMakeModules directory to simply cmake.
This is more consistent with the other directories in the project.
2013-03-07 16:12:08 +01:00
Joakim Soderberg
741e6915e2 Always use LF as line ending so that we don't get any problems with line
endings in any tests.
2013-03-07 16:12:07 +01:00
Joakim Soderberg
e40d52c550 Consolidated the CMake project.
- Moved everything to one CMakeLists.txt
- Added support for the json_process test suites (instead of just the API
  tests).
- Changed to use the modified json_process version that does away with the
  environment variables (originally written by DanielT).
- Had to exclude "test_memory_funcs" on MSVC, since void pointer
  arithmetics are not allowed as it is done in secure_malloc and
  secure_free.
- Had to add a check for "ssize_t". This is not available on Windows and
  maybe on some other platforms (used in test_pack.c)
- Result from running ctest (The failure seems unrelated to CMake, it's
  just that the expected result is in a different order):
99% tests passed, 1 tests failed out of 121

Total Test time (real) =   1.31 sec

The following tests FAILED:
         24 - valid__complex-array (Failed)
2013-03-07 16:11:07 +01:00
Paul Harris
3d5bea5714 Fixes for cmake for MSVC2010 2013-03-07 16:06:38 +01:00
Paul Harris
3e03b07831 Add CMake build system.
Added multiple CMake-related files to project.
Supports building the library and the tests.
See CMakeLists.txt for notes on how it works.

I had to adjust 3 existing files in order to disable some configuration
that should be taken care of by cmake/automake anyway.

I also added jansson.def from a future jansson version,
to test cmake's support for .def files (which works fine).
2013-03-07 16:06:01 +01:00
Petri Lehtinen
e00cd4f941 Merge branch '2.4' 2013-02-05 12:51:06 +02:00
Petri Lehtinen
a1882fee02 check-exports test: Filter out symbols that start with an underscore
These are usually internal to libc, and such symbols are exported in
the shared library on some platforms.
2013-02-05 12:48:38 +02:00
Petri Lehtinen
4a5626695c Merge branch '2.4' 2013-02-04 09:55:39 +02:00
Petri Lehtinen
afa1d37e20 Enable -Werror in Travis builds 2013-02-04 09:55:34 +02:00
Petri Lehtinen
b9967fdbcf Merge branch '2.4' 2013-02-04 09:52:31 +02:00
Petri Lehtinen
ccf6e48a52 Don't use -Werror by default
It may be problematic when compilers add new warnings over time.
./configure && make should always just work.
2013-02-04 09:51:42 +02:00