From e61a95a258bc3062d2d4900f95df3719ecfdbea7 Mon Sep 17 00:00:00 2001 From: thecomputekid Date: Fri, 28 Nov 2025 11:32:53 +0000 Subject: [PATCH] Remove C from CMake There is no need to declare C as a needed language in cmake to build the project. --- CMakeLists.txt | 2 +- googlemock/CMakeLists.txt | 4 ++-- googletest/CMakeLists.txt | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c784f3c7c..3875f2a52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) -project(googletest-distribution) +project(googletest-distribution LANGUAGES CXX) set(GOOGLETEST_VERSION 1.16.0) if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index 99b2411f3..8786eceb2 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -35,9 +35,9 @@ endif() # CMake files in this project can refer to the root source directory # as ${gmock_SOURCE_DIR} and to the root binary directory as # ${gmock_BINARY_DIR}. -# Language "C" is required for find_package(Threads). + cmake_minimum_required(VERSION 3.13) -project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) +project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX) if (COMMAND set_up_hermetic_build) set_up_hermetic_build() diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index 2e5388945..73ee45986 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -42,12 +42,11 @@ endif() # CMake files in this project can refer to the root source directory # as ${gtest_SOURCE_DIR} and to the root binary directory as # ${gtest_BINARY_DIR}. -# Language "C" is required for find_package(Threads). # Project version. cmake_minimum_required(VERSION 3.13) -project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) +project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX) if (COMMAND set_up_hermetic_build) set_up_hermetic_build()