C++20#6606
Conversation
|
GCC 12 in C++20 mode might have a false positive here (cc @lucafedeli88 ?): |
ah, that's really weird... |
I've tried compiling this branch on my machine (GCC 15.2.0) and the issue does not show up. So it may be a false positive. |
|
@ax3l , I am increasingly convinced that the g++12 warning is a false positive (see google/googletest#4570). Maybe we can write a workaround if we need to use that version of the compiler. FYI, with v12.5.0 I don't see the issue on my machine. Which specific version of g++ are you using ? |
|
I think for the failed cuda checks, we just need to switch from 11.7 to 12.2. |
| # Old GCCs: std::filesystem as a separate library | ||
| try_compile(CXX_HAS_STD_FS "${WarpX_BINARY_DIR}/temp" | ||
| "${WarpX_SOURCE_DIR}/cmake/has_filesystem.cpp" | ||
| CMAKE_FLAGS -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON | ||
| CMAKE_FLAGS -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON |
There was a problem hiding this comment.
The old GCC we supported here does probably not support C++20 anyway. But we can remove this another time, does not hurt.
| endforeach() | ||
| foreach(warpx_tgt IN LISTS _ALL_TARGETS) | ||
| target_compile_features(${warpx_tgt} PUBLIC cuda_std_17) | ||
| target_compile_features(${warpx_tgt} PUBLIC cuda_std_20) |
Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
|
After merging the Adastra update from #6591, we need to re-update it here (see merge conflict). Do you want to test it manually first or can we go ahead with updating the script trivially? |
@EZoni , I should have fixed the merge conflict. I am 99.9% sure that it will work as it is. To be sure, I will test it tomorrow. |
|
@ax3l , I've ported my clang-tidy fix to your PR (see #6803) in order to test that everything is OK. Feel free to merge the changes in
|
|
Thank you both for your help! 🎉 ✨ |

Switch to C++20. AMReX is making the switch soon (AMReX-Codes/amrex#4840) and is preparing CI in AMReX-Codes/amrex#4976 so we can also generally pull up the requirements.