Closed vrince closed 1 year ago
@pboettch here is a draft of FetchContent
move ... still some stuff to clean on the test side since there is a test to check if find_package(...)
works and I remove everything export-related (feeling a little bad about that .... sorry).
Contemplating to set JSON_VALIDATOR_BUILD_EXAMPLES
and JSON_VALIDATOR_BUILD_TESTS
off by default document then for internal developers.
Beautiful so far.
This will supersede #162 and #185, right?
@pboettch being at it ... making it a c++11
project and dropping the regex boost gcc 4.9 thing?
@pboettch being at it ... making it a
c++11
project and dropping the regex boost gcc 4.9 thing?
Making in C++11 OK, but not dropping the boost-regex-thing ftm. Or in a separate PR. I have one project with gcc-4.9 I'd need to check before.
It might be worth keeping Boost regex support since std::regex
has pretty poor performance: https://stackoverflow.com/questions/70583395/why-is-stdregex-notoriously-much-slower-than-other-regular-expression-librarie
I'd suggest reworking the CMake setup logic to allow users to provide Boost as an existing target or by providing the config file. Using NOT TARGET Boost::regex
before using find_package
will probably suffice.
This also implies using Boost::regex
instead of Boost_*
variables.
Making the use of Boost regex possible on any platform would also be good.
Guys this is unfinished business my goal was to simplify integration into other projects using CMake Fetch content (with it does in its current state) but then it crashed on me for some reason when I use it. So I used another lib to do json schema validation. Not sure I'll devote the time needed to finalize this MR.
Yeah, sorry for not having continued until now. Time is going by so fast.
What crash did you observe?
All PRs have been closed due to me changing the main-branch to main
. Please reissue your pull-request to that branch. Sorry and thanks.
This pull request is quite promising. @pboettch do you need any help to finalize the integration?
Consider #262 for a more complete implementation
This is a draft of cmake simplification following the discussion from #185
note: It's maybe too big of a move as I see a lot of effort have been put in a couple of years ago to make
json-schema-validator
works withfind-package
and this MR goes completely in the other direction.The goal of this MR is to make CMake process dead simple and make usage of this library really easy to help adoption. Bottom line the following cmake is all it needs to use both
json-schema-validator
and appropriate version ofnlohmann_json
for people starting from scratch :This is just an example once merged the GIT_TAG will make more sense...
This MR also contains:
nlohmann_json
is not foundJSON_VALIDATOR_BUILD_INSTALL
nlohmann_json
presintalledjson-schema-*
cmakeConfig
to export2
make it a c++11 project and drop boost regex ?