-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Windows clang-cl -Wdeprecated-declarations warnings #143
Comments
…ileno when using clang-cl - closes #143
you can try the header from the dev branch - this should be silenced now |
Still getting the same warnings unfortunately. (I copy pasted the header from dev over the one I currently have). EDIT: Suppressing the warning for the entire file doesn't work either. |
I hadn't tested with clang-cl (until now) - I guess both |
…ction since they are not mutually exclusive because of clang-cl... (+ suppressed a clang warning about strtok)
just pushed a change - try it again and let me know |
Getting |
damn.... I was compiling a hello world test case with clang-cl from the visual studio developer prompt - I was able to get it to compile (no warnings/errors) but not to link - so I don't have it all setup properly yet. I now noticed that there are a few other places where the compiler checks are used in a mutually-exclusive way - don't know why it isn't error-ing there on my side...... I guess I should set it up and test properly... |
…REQUIRE macro not being defined - was disabling exceptions in the feature detection after clang/msvc became non-mutually exclusive. Also detecting if exceptions are disabled for MSVC properly - relates to 44
I found out the reason for the DOCTEST_REQUIRE problems and I fixed it (along with some other issues) - tested the framework with the LLVM toolchain and it works as expected! try it out :) |
That fixed it! Thanks for the quick response! |
I might have spoken too soon. reproc's MacOS CI is failing after including latest doctest. https://travis-ci.com/DaanDeMeyer/reproc/jobs/140907999 I think an include is missing somewhere but I'm not sure. |
Those are linker errors. I have no clue as to why that might be happening. This does not seem related to clang-cl changes - it might be caused by the huge refactoring that took place between versions 1.2.9 and the soon-to-be-released 2.0. Doctest is tested with quite the big build matrix but this calls for further investigation... I'll try to think of something. |
So I bisected the history of doctest between version 1.2.9 and 2.0 and since this commit your build starts breaking on OSX: That commit is the biggest in the history of the framework - it was the foundation of the new reporter system based on streams (streams are also in the linker errors)... It is all standard C++ so I would suspect a toolchain issue - I tried specifying explicitly to use the xcode10 osx image on travis - didn't help. I'll have to think a bit more about this. |
So... turns out I've already encountered this issue before - and the "solution" was to include I managed to get your build to work by including So after all this isn't related to clang-cl. Will write here soon. |
…em is this: when using clang from xcode - that means libc++. in that case I include <iosfwd> instead of forward-declaring std::ostream myself. Then if the user includes somewhere only the doctest header and <string> and then does a comparison - then and only then will there be some linker issue which I previously had managed to resolve by telling the users to also include <iostream> in that place in their tests. This is a toolchain issue when using the <iosfwd> header - the details are still not clear to me but I managed to get the linker to pull in what is necessary by adding a dummy unused global function in the implementation of doctest that uses operator<< of std::string to print to std::cout.
finally resolved "properly" - turns out the problem is this: when using clang from xcode - that means libc++. in that case I include try the latest version of the header from the |
Everything's green now! Thanks a lot for all the detailed responses. I'll stay on the current dev commit and switch to 2.0 when it releases. |
…ileno when using clang-cl - closes #143
…ction since they are not mutually exclusive because of clang-cl... (+ suppressed a clang warning about strtok)
…REQUIRE macro not being defined - was disabling exceptions in the feature detection after clang/msvc became non-mutually exclusive. Also detecting if exceptions are disabled for MSVC properly - relates to 44
…em is this: when using clang from xcode - that means libc++. in that case I include <iosfwd> instead of forward-declaring std::ostream myself. Then if the user includes somewhere only the doctest header and <string> and then does a comparison - then and only then will there be some linker issue which I previously had managed to resolve by telling the users to also include <iostream> in that place in their tests. This is a toolchain issue when using the <iosfwd> header - the details are still not clear to me but I managed to get the linker to pull in what is necessary by adding a dummy unused global function in the implementation of doctest that uses operator<< of std::string to print to std::cout.
Compiling doctest with clang-cl (Clang 6.0.1) on Windows results in several Wdeprecated-declarations warnings.
Can be reproduced by compiling https://github.com/DaanDeMeyer/reproc on Windows with clang-cl. If the compile output isn't sufficient to solve the warnings I can add more detailed steps to reproduce.
From a quick look at doctest's source I think Wdeprecated-declarations just needs to be added to the list of ignored warnings.
The text was updated successfully, but these errors were encountered: