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

Use the COMPILE_LANGUAGE CMake genexp instead of LINKER_LANGUAGE #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mosra
Copy link
Owner

@mosra mosra commented Jan 1, 2025

With this, the Corrade pedantic flags should no longer cause annoying warning when used with targets that mix C and C++.

Unfortunately, in CMake 3.11 and older, if the projects use just C or CXX, the thing will fail with an error that the language is unknown, which makes it useless. Thus gotta wait with this until 3.12 is the minimum supported: https://gitlab.kitware.com/cmake/cmake/-/commit/4f82199befee194aa924fd4dcdb2f4aad1f7dab6

I spent ages looking for a COMPILE_LANGUAGE CMake target property, it
was just not there. Obviously it wasn't, because this is different on a
per-file basis, it's a generator expression on its own.

With this, the Corrade pedantic flags should no longer cause annoying
warning when used with targets that mix C and C++.

Unfortunately, in CMake 3.11 and older, if the projects uses just C or
CXX, the thing will fail with an error that the language is unknown,
which makes it useless. Thus gotta wait with this until 3.12 is the
minimum supported:

    https://gitlab.kitware.com/cmake/cmake/-/commit/4f82199befee194aa924fd4dcdb2f4aad1f7dab6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant