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

Tell CMake to not check for a C++ compiler #653

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

aperezdc
Copy link
Contributor

By default CMake checks both for C and C++ compilers, while the latter is not needed. Setting the list of languages to just C in the call to project() removes the unneeded check.

@aperezdc
Copy link
Contributor Author

JFTR, I found out that the unneeded C++ check was being done thanks to this report from Buildroot's autobuilder 🔧

@fred-wang
Copy link
Contributor

Thanks, this LGTM. @eustas can you please review this?

Cmake reference: https://cmake.org/cmake/help/v3.11/command/project.html

@eustas
Copy link
Collaborator

eustas commented Mar 26, 2018

I believe CMake 2.8.6 do not recognize LANGUAGES keyword. We can omit it, because there is no VERSION part.

@aperezdc
Copy link
Contributor Author

@eustas If you need to support CMake 2.8, according to the documentation it is possible to use:

project(brotli C)

I'll check whether omitting the LANGUAGES keyword works also in more recent versions (my local version is 3.10.x) and update the PR.

By default CMake checks both for C and C++ compilers, while the latter
is not needed. Setting the list of languages to just "C" in the call to
project() removes the unneeded check.
@aperezdc
Copy link
Contributor Author

The plain project(brotli C) worked fine for me with CMake 3.10.3, so I have updated the PR. Hopefully the CI will pass as well 😉

@eustas
Copy link
Collaborator

eustas commented Mar 26, 2018

Thanks!

@eustas eustas merged commit 515fc62 into google:master Mar 26, 2018
@aperezdc aperezdc deleted the no-cxx-check branch March 26, 2018 17:39
juj pushed a commit to Unity-Technologies/brotli that referenced this pull request May 13, 2023
By default CMake checks both for C and C++ compilers, while the latter
is not needed. Setting the list of languages to just "C" in the call to
project() removes the unneeded check.
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.

3 participants