googletest
googletest copied to clipboard
[FR]: Remove Language C dependency on cmakes.
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.