# No CMAKE\_LANGUAGE\_COMPILER could be found.

**URL:** https://discourse.cmake.org/t/no-cmake-language-compiler-could-be-found/7067
**Category:** Usage
**Tags:** os:linux
**Created:** [December 14, 2022, 2:03am UTC](https://discourse.cmake.org/t/no-cmake-language-compiler-could-be-found/7067 "2022-12-14T02:03:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Moran](https://discourse.cmake.org/user_avatar/discourse.cmake.org/moran/32/3001_2.png) [@Moran](https://discourse.cmake.org/u/Moran)
#### Post date: [December 14, 2022, 2:03am UTC](https://discourse.cmake.org/t/no-cmake-language-compiler-could-be-found/7067/1 "2022-12-14T02:03:27Z")

</div>

I met some trouble when i try to create dir of build , i type `cmake -B build`, then error occur。 I google this mistake but cannot found .

environment：  
Distributor ID: Ubuntu  
Description: Ubuntu 18.04.6 LTS  
Release: 18.04  
Codename: bionic  
Linux cs144vm 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux  
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

cs144@cs144vm ~/w/c/testlib\> cmake -B build/  
CMake Error: Could not find cmake module file: CMakeDetermineLANGUAGECompiler.cmake  
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.  
Missing variable is:  
CMAKE\_LANGUAGE\_COMPILER\_ENV\_VAR  
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.  
Missing variable is:  
CMAKE\_LANGUAGE\_COMPILER  
CMake Error: Could not find cmake module file: /home/cs144/workspace/cmake-3.25.1-tutorial-source/testlib/build/CMakeFiles/3.25.1/CMakeLANGUAGECompiler.cmake  
CMake Error at CMakeLists.txt:9 (project):  
No CMAKE\_LANGUAGE\_COMPILER could be found.

Tell CMake where to find the compiler by setting the CMake cache entry  
CMAKE\_LANGUAGE\_COMPILER to the full path to the compiler, or to the  
compiler name if it is in the PATH.

CMake Error: Could not find cmake module file: CMakeLANGUAGEInformation.cmake  
CMake Error: CMAKE\_LANGUAGE\_COMPILER not set, after EnableLanguage  
– Configuring incomplete, errors occurred!  
See also “/home/cs144/workspace/cmake-3.25.1-tutorial-source/testlib/build/CMakeFiles/CMakeOutput.log”.

my CMakeLists.txt:

```auto
cmake_minimum_required(VERSION 3.20)

set(CXX_STANDARD 11)
set(CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)

project(testlib LANGUAGE CXX C)

add_executable(main)

file(GLOB sources CONFIGURE_DEPENDS *.cpp *.h )

target_sources(main PUBLIC ${sources})

```

---

<div class="post-metadata">

### Author: ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)
#### Post date: [December 15, 2022, 1:02pm UTC](https://discourse.cmake.org/t/no-cmake-language-compiler-could-be-found/7067/2 "2022-12-15T13:02:45Z")

</div>

> [@Moran](#):
>
> `project(testlib LANGUAGE CXX C)`

According to the [docs](https://cmake.org/cmake/help/latest/command/project.html), the argument is `LANGUAGES`, not `LANGUAGE`. The typo makes it interpreted as the first (simple) signature of `project()` which simply lists languages after the project name, so it’s looking for modules to support a language named `LANGUAGE` (and failing, which is what the error messages say).
