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

Do not pass C++ warning options to C compiler #219

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

kimci86
Copy link
Contributor

@kimci86 kimci86 commented Dec 21, 2023

GCC outputs warnings about C++ flags when compiling the C example.

cc1: warning: command-line option ‘-Wnon-virtual-dtor’ is valid for C++/ObjC++ but not for C
cc1: warning: command-line option ‘-Woverloaded-virtual’ is valid for C++/ObjC++ but not for C
cc1: warning: command-line option ‘-Wold-style-cast’ is valid for C++/ObjC++ but not for C

Using CMake generator expression COMPILE_LANGUAGE to make some flags active only when compiling C++ solves it.

@ChrisThrasher ChrisThrasher merged commit 0601d5f into SFML:master Dec 21, 2023
14 checks passed
@kimci86 kimci86 deleted the bugfix/c++_warnings_in_c branch December 22, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants