Add compile options for clang-cl to allow it to compile riptide_cpp. #121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While trying to work out a compile error for #120 when compiling with Linux/GCC, I tried compiling with
clang-cland MSVC to see if I could easily reproduce the error that way. I wasn't quite able to get riptide_cpp to compile withclang-cl(and VS 2022.0), but I did make some progress towards getting it compiling -- mainly I needed to add the existing compile options for Clang to the options forclang-cl(detected as MSVC + Clang).It might be useful to set up a clang-cl build for riptide_cpp in the future. To that end, I'm submitting the CMakeLists.txt changes I tried, so when someone has time to sort out the remaining issue(s) they'll have a better starting point.
The remaining issues I see when attempting to compile:
One other thing that surprised me (that seems worth investigating) -- even though the root CMakeLists.txt in the repo specifies the C++17 standard is required and that's respected when building with MSVC, building with clang-cl (via
python setup.py build) doesn't appear to respect the setting and falls back to compiling with C++14. I'm using CMake 3.22.1 in case it matters. From one build log: