-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
WIP: use templated is_negative to avoid warning on some compilers #2736
Conversation
Thanks for the PR! I think it would be a good idea to also add the Intel compiler to the CI. Any proposal for this? |
Sure! I wanted to play around and see what could be done for this issue. Adding Intel Compiler(s) is great idea. I will look into it. |
@nickaein If you can point me to instructions how to install it in Ubuntu, I can add it to the Docker image I'm using in the CI. I just wanted to make sure these warnings don't come back... |
As an update, I installed Intel C++ compiler inside the existing json-ci docker image: FROM nlohmann/json-ci
RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main" && \
apt-get update
RUN apt-get install -y --no-install-recommends \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic And add it to the CI of my fork in this commit: nickaein@7cc2c69. The pipline for this compiler passes without any issues (link). Unfortunately, the infamous sign warning (e.g. #755) is not reproduced on this compiler version. I'm using Nevertheless, there are other environments that Intel compiler(s) can be installed (e.g. Windows/MacOS). The GitHub Workflow for their setup is available at: oneapi-ci project. While their setup is different from CI of this project, I think it might worth adapting it. This will bifurcate the current CI architecture, but that could be a plus to have these configuration isolated (e.g. not polluting |
Thanks for looking into it! I could reproduce your findings that everything works fine (i.e., without warning on source /opt/intel/oneapi/setvars.sh I tried
Now I'm stuck with this error message:
Next, I will check if this may be a doctest issue. Anyway, I'm thinking of adding the Intel compilers to my Docker. |
@nickaein You are 2 hours ahead of me :-) doctest/doctest#502 - and you also linked the issue. Uff, if I had seen that, I could have saved some time ;) |
Oops, I should've mentioned earlier that I'm going to continue working on this. My bad. Yeah it was not a straightforward task to setup these compilers. I had to use the following weird compiler flags to get it working. Yours is easier to grasp.
Having the experience on configuring these compilers, you probably can give your opinion on last point of my previous comment #2736 (comment). Basically, I think adapting oneapi-ci's Actions workflow may be a good approach as we can cover different variants of Intel compilers (LLVM-based, Classic, Data Parallel C++ aka. icx, icc, dpcpp) on Windows/MacOS/Linux platforms, without polluting A proof of concept is available on |
Yes, I agree that it may be good to have all the Intel compilers combined at one place - especially since there are also Windows/macOS versions. I'll be happy about PRs! |
9d50b3d
to
25ed410
Compare
@nickaein thanks, this solves the problem for me 👍 I tried sth similar but without success, so kudos to you :) |
25ed410
to
da50013
Compare
That's awesome! Sorry I didn't have time to finalize this and integrate Intel compiler. Thanks for carrying the torch and finishing this up :) |
Related to #2676, #1390, #755, #2712
[Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.]
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filesingle_include/nlohmann/json.hpp
. The whole process is described here.Please don't
#ifdef
s or other means.