<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62366>62366</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Default build of libcxx fails with 'Unknown CMake command CHECK_C_SOURCE_COMPILES'
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
rnikander
</td>
</tr>
</table>
<pre>
I filed a similar bug about the [default build instructions](https://libcxx.llvm.org/BuildingLibcxx.html) not working: https://github.com/llvm/llvm-project/issues/61488
But since this is a new error, so I thought I'd create a new issue.
I followed the instructions exactly, and got this:
```console
% cmake -G Ninja -S runtimes -B build -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
[...]
CMake Error at /Users/rob/Dev/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake:809 (CHECK_C_SOURCE_COMPILES):
Unknown CMake command "CHECK_C_SOURCE_COMPILES".
Call Stack (most recent call first):
CMakeLists.txt:159 (include)
```
Using CMake 3.26.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU02PozgQ_TXmUgoixUeSA4d8sRNtuns12ew1MrYBT4zd8ken59-vgEyro90-jYTA2FXvVb3nos7JVgtRknxD8l1Eg--MLa2WV6q5sFFt-M_yAI1UggMFJ3upqIU6tEBrEzz4TgDJN1w0NCgPdZCKg9TO28C8NNqRfEdw2Xn_6ki6JlgRrJSs2ft7rNRbHxvbEqw2Q57U7XE66XyvCK5AGw83Y69StyRdwyNKK30X6piZfoBUb78-s1drfgjmCVbSuSAcwaqYZ8slkGRHkvX03gQPTmomwHfSgXRAQYsbCGuNJbgFZ-AAvjOh7TwcCC44MCuoF_fAETt-wDxAY5QyN8FHXT7LAOKdMq9-DshUc2iNH4mHbj4hkCKZHma0M0rcdzEH1tOrgNkf8Cz1DwqzE9igveyFg9nmrvtsdzz-83TZP683x_3l-_n578PT_kTSHUGcNCfpZlrQWk7roG9Sc4J4p8o3cRwPpo2_26eBdT9oAtQDwershB0UtaYmWO3E239Vv3sxVkyw6g0PanThG9VciaHGl9dRlXiKSdfLZAUEl9tv--2fl-3l9HL-vt1fti9Pfx2O-xPB1YdOAGd91eamYaqNmb4fBCWIX2ZjfO-GKgUnT9l1IOuN82AFE9oDG04aaZ1_4BopjtJ5F_t3T9L1PB_rlJqpwMUQ-2jbZy_PTur2XmUaYxFDxMuUr9IVjUQ5L5aYFWm6KqKurJOsmfMmmXMukoxllCeIjIk5pnm-bBaRLDHBNMkwR8yLtIiXWd4sClYUWKyGUJIloqdSfQxVNN7PssC0KCJFa6Hcrym35WhYHVpHskSN7X2keemVKHcP82wamG4NNFQqBzfpOyC4-H8nvrRhEQWryt8Y4qGXfwMAAP__w_F42Q">