# The source directory does not appear to contain CMakeLists.txt. ???

**URL:** <https://discourse.cmake.org/t/the-source-directory-does-not-appear-to-contain-cmakelists-txt/6284>\
**Category:** Code\
**Tags:** os:linux\
**Created:** [August 16, 2022, 1:50pm UTC](https://discourse.cmake.org/t/the-source-directory-does-not-appear-to-contain-cmakelists-txt/6284 "2022-08-16T13:50:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asmae](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@Asmae](https://discourse.cmake.org/u/Asmae)\
**Post date:** [August 16, 2022, 1:50pm UTC](https://discourse.cmake.org/t/the-source-directory-does-not-appear-to-contain-cmakelists-txt/6284/1 "2022-08-16T13:50:23Z")

</div>

I do this command ccmake -DITK\_USE\_REVIEW=ON … and a CMAKE error appear:  
CMake Error: The source directory “/home/asma/gate” does not appear to  
contain CMakeLists.txt.  
Specify --help for usage, or press the help button on the CMake GUI.

but I’m sure thet the directory /home/asma/gate contain CMakeLists.txt

---

<div class="post-metadata">

**Author:** ![buildSystemPerson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/buildsystemperson/32/2851_2.png) [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)\
**Post date:** [August 16, 2022, 3:52pm UTC](https://discourse.cmake.org/t/the-source-directory-does-not-appear-to-contain-cmakelists-txt/6284/2 "2022-08-16T15:52:24Z")

</div>

Be explicit with the source/build directories.

```auto
cd /home/asma/gate
cmake -S . -B build/

# If the above commands succeed than use ccmake like this
ccmake -S . -B build/

```

---

<div class="post-metadata">

**Author:** ![Asmae](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@Asmae](https://discourse.cmake.org/u/Asmae)\
**Post date:** [August 16, 2022, 5:05pm UTC](https://discourse.cmake.org/t/the-source-directory-does-not-appear-to-contain-cmakelists-txt/6284/3 "2022-08-16T17:05:57Z")

</div>

First thank you for your reply.

What do you mean by source/build directories.

When I did: cmake -S . -B build/ I got the same error:

CMake Error: The source directory “/home/asma/gate” does not appear to contain CMakeLists.txt.  
Specify --help for usage, or press the help button on the CMake GUI.

---

<div class="post-metadata">

**Author:** ![EricGT](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/e/f1d935/32.png) [@EricGT](https://discourse.cmake.org/u/EricGT)\
**Post date:** [August 16, 2022, 5:20pm UTC](https://discourse.cmake.org/t/the-source-directory-does-not-appear-to-contain-cmakelists-txt/6284/4 "2022-08-16T17:20:14Z")

</div>

Can you give us a copy of the output of the [tree](https://www.tecmint.com/linux-tree-command-examples/) command for “/home/asma/gate”

Also since the list will be long and we don’t need to see it take up space please do the following

In the post you will be pasting the output

1. Place the cursor on a blank line where you plan to paste the output.
2. In the menu for the editor click the gear (far right in list of icons).
3. Select `Hide Details`.  
This will insert some text into the reply.
4. Replace `This text will be hidden` with two lines of ````` and a blank line in between.
5. In the blank line between the two lines of ````` paste the output.
6. Change `Summary` to `Click triangle to expand output`

* * *

Here is an example.

> **Click triangle to expand output**
>
> ```auto
> C:.
> | CMakeLists.txt
> | tutorial.cxx
> |
> \---build
> | CMakeCache.txt
> |
> \---CMakeFiles
> | cmake.check_cache
> | CMakeOutput.log
> |
> \---3.23.3
> CMakeSystem.cmake
> 
> ```
