jsoncpp icon indicating copy to clipboard operation
jsoncpp copied to clipboard

Make the build configuration under Bazel more correct.

Open bcsgh opened this issue 8 months ago • 2 comments

  • Expose JSON_USE_EXCEPTION and JSON_HAS_INT64 as Bazel config flags with defaults that match the existing Bazel build.
  • Switch //:jsoncpp from using copts to defines for JSON_USE_EXCEPTION and JSON_HAS_INT64 so that rules that depend on it get the same config.
  • Make src/test_lib_json/fuzz.cpp respect JSON_USE_EXCEPTION.
  • #ifdef stuff that should only be used with JSON_USE_EXCEPTION.

Note:

See also https://github.com/open-source-parsers/jsoncpp/pull/1601

Testing:

This builds with all 4 combinations:

for i in true false ; do
  for e in true false ; do
    bazel build --@//:use_exception=${e} --@//:has_int64=${i} ...
  done
done

bcsgh avatar Mar 16 '25 22:03 bcsgh

Poke?

bcsgh avatar Apr 10 '25 04:04 bcsgh

Poke?

bcsgh avatar May 01 '25 01:05 bcsgh

Any chance of getting a review of this?

bcsgh avatar Jul 25 '25 01:07 bcsgh