[FR]: Remove Language C dependency on cmakes.
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
### Does the feature exist in the most recent commit?
I noticed the CMake imposes this in projects that use googletest and compile it as part of their build process.
I am talking specifically about `CMakeLists.txt` in `googletest` and `googlemock`
lines `50` and `40` respectively:
```
project(gtest/mock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
```
I have tried to edit the cmake, and remove the C language and it seems working, but I am not so familiar with code base of gtest if it is still required.
I tried to go the old method of compiling it separately and linking it. however that is significantly more complex than fetching it from the repo. Unfortunately `set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)` didn't work either.
### Why do we need this feature?
It would make it easier to integrate it using cmake.
### Describe the proposal.
remove the C from languages in project setup in cmake.
### Is the feature specific to an operating system, compiler, or build system version?
I have been using windows (msvc and ninja). Unfortunately I don't know the impact of this on other platforms.
Contributor guide
Research direction
Start with CMakeLists.txt in googletest and googlemock at the project declarations around lines 50 and 40. Read how the C and CXX languages are used in those build files, then validate the proposed change with a Windows MSVC and Ninja CMake integration. Done means projects can integrate googletest without the unnecessary C language dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake, cpp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100