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

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

Be explicit with the source/build directories.

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

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

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.

Can you give us a copy of the output of the tree 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
C:.
|   CMakeLists.txt
|   tutorial.cxx
|
\---build
    |   CMakeCache.txt
    |
    \---CMakeFiles
        |   cmake.check_cache
        |   CMakeOutput.log
        |
        \---3.23.3
                CMakeSystem.cmake
2 Likes