google / google/prefab

use enable_language as needed in cmake outputs?

Open
#162 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
236
Forks
33
PR merge metrics
No merged PRs in 30d

Description

As an aside, it would also be useful to check inside the `SDL2Config.cmake` config file whether the `CXX` language is actually enabled.
Because if it is not, the build process will fail at a later time.
See e.g. [this issue](https://issuetracker.google.com/issues/236447801) I created earlier this year.

I think the cmake config file might need something like:
```cmake
include(CheckLanguage)
check_language(CXX)
if(NOT CMAKE_CXX_COMPILER)
message(WARNING "SDL2 requires CXX, but it not enabled.")
endif()
```
[`CheckLanguage`](https://cmake.org/cmake/help/latest/module/CheckLanguage.html) documentation

Or skip the warning and do `enable_language(CXX)` yourself.

_Originally posted by @madebr in https://github.com/google/prefab/issues/161#issuecomment-1275363135_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.