Skip to content
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

Add support for compiling with clang-cl #286

Merged
merged 1 commit into from Sep 10, 2019
Merged

Add support for compiling with clang-cl #286

merged 1 commit into from Sep 10, 2019

Conversation

DaanDeMeyer
Copy link
Contributor

The previous logic was adding GNU style command line flags when clang-cl was used which wants MSVC style command line flags. I've changed the logic to the same logic used in reproc to support clang-cl which fixes the issue.

@DaanDeMeyer DaanDeMeyer changed the title Add support for compiling with clang-cl WIP: Add support for compiling with clang-cl Sep 8, 2019
@DaanDeMeyer DaanDeMeyer changed the title WIP: Add support for compiling with clang-cl Add support for compiling with clang-cl Sep 8, 2019
@DaanDeMeyer
Copy link
Contributor Author

I also had to disable a few warnings to get everything (the examples) to compile without warnings.

@DaanDeMeyer DaanDeMeyer closed this Sep 8, 2019
@DaanDeMeyer DaanDeMeyer reopened this Sep 8, 2019
@DaanDeMeyer
Copy link
Contributor Author

Turns out the warnings were already disabled somewhere else. I changed the logic to reuse that instead of disabling the same warnings twice.

add_compiler_flags(-fstrict-aliasing)

# The following options are not valid when clang-cl is used.
if(UNIX)
Copy link
Member

@onqtam onqtam Sep 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this check could be UNIX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" since we use MinGW on windows, or perhaps clang-cl could be excluded like this. But this is a minor nitpick so I could just merge this as it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did NOT MSVC which should handle all cases. It might be too extensive but we can solve that once we actually encounter issues with this approach.

@onqtam onqtam merged commit 8c8d716 into doctest:dev Sep 10, 2019
@DaanDeMeyer DaanDeMeyer deleted the cmake branch September 10, 2019 23:17
onqtam pushed a commit that referenced this pull request Sep 22, 2019
jhasse pushed a commit to jhasse/doctest that referenced this pull request Jan 28, 2021
- Addresses doctest#553, doctest#341, and doctest#286
- Edge shapes are now either one-sided or two-sided
- Only one-sided edges support smooth collision and must be connected to other edges on both sides
- Edge and chain shapes APIs updated to reflect changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants