Skip to content

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