-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsoncpp_readerwriter unit tests failed on Windows #1163
Comments
See discussion in open-source-parsers/jsoncpp#1163
You named the versions of everything except *jsoncpp itself. Why skip that one? If this were a failure of a specific testcase, we would look into it right away. But the whole suite is broken? To debug that, we would need your help. Also, we do not support cmake. Users do. I suggest trying meson. But if you have a fix for cmake, please submit a PR. We usually accept those pretty quickly In fact, I just merged one a few minutes ago, so perhaps the tip of I was telling someone last week that it seems like half the Issues here relate to cmake. Drives me crazy! Anyway, please re-open if you can point to a more specific failure. Or submit a new PR, based on the current tip of `master. |
@cdunn2001 |
Oh, only There is currently a difference between the tests run via cmake and via meson. Fixed a race condition in meson. But I'll bet this is something else. We might need your help to debug it. |
No just that. A lot of tests with legacy in name under |
Ah never mind....I think I probably figure that out. |
I can probably find some timeslot to help fixing the path in cmake. |
jsoncpp/src/test_lib_json/CMakeLists.txt Line 22 in 08ddeed
This is why the other test can run. |
Hello, This change can end up causing an issue if you are using jsoncpp as a sub project in CMake. Use of these variables was actually removed in commit 8371a43 in 2015 for this reason. I understand that using the variables in this way fixes the issue with the test failure, but perhaps there is another way this can be fixed without using these variables? |
Could you provide more details about the "issue"? |
Another question will be: if parent project did something strange to these variables, should jsoncpp respect that and break, or should it ignore/overwrite that? |
The issue is basically if you include jsoncpp as a sub project, it will set these variables which end up getting used for any other projects part of the build. You are right, I can override these variables, but then using jsoncpp ends up looking something like this:
(I'm not sure if I think a good answer about this is here: https://stackoverflow.com/questions/44469983/proper-usage-of-cmake-output-directory You could also try setting them on a project basis? Something like this:
I haven't tested this, but maybe something like that could work for you and not interfere with anything trying to use jsoncpp as a sub project? |
I think the issue is, those variables are not suppose to be visible to parent scope. Setting per-target properties is a good way, but I'm not familiar with details in jsoncpp, so should be better for its author to do the work. Another solution is, to detect what was set before jsoncpp makes changes, and restore them afterward. |
Describe the bug
On windows, we always have 2 tests failed.
On Linux (CentOS 7/Ubuntu 18.04) they works fine.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: