Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » cmake generation problem(wrong source directory)
cmake generation problem [message #1829500] Sun, 05 July 2020 15:12 Go to next message
Timothy Stark is currently offline Timothy StarkFriend
Messages: 1
Registered: July 2020
Junior Member
When I upgraded to version 2020-06, I tried to re-generate cmake build package but I kept to get missing CMakeLists.txt in wrong source directory. Earlier CDT version, it worked fine. I am using cmake version 3.17 in MSYS2 packages.

I tried to set build as M:/Projects/ofs/ofs-build and source as M:/Projects/ofs/ofs-sources but... When I attempted to close and apply, I got some errors. It tried to find CMakeLists.txt in wrong source directory where Eclipse executable files are itself!

-LAH .
CMake Error: The source directory "C:/Eclipse/2020-06" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
-- Cache values
Command terminated with rc=1
Re: cmake generation problem [message #1858738 is a reply to message #1829500] Wed, 19 April 2023 03:15 Go to previous message
Takeshi Miura is currently offline Takeshi MiuraFriend
Messages: 1
Registered: April 2023
Junior Member
Same Issue on the Ubuntu 22.04.2 LTS

CDT Build Console[SampleProject]


    -LAH .
    CMake Warning:
    Ignoring extra path from command line:

    "."


    -- Cache values
    CMake Error: The source directory "/home/c3p/cpp-2023-03/eclipse" does not appear to contain CMakeLists.txt.
    Specify --help for usage, or press the help button on the CMake GUI.
    Command terminated with rc=1

Resolution:

  • Probably internal command:
    machine:~/cpp-2023-03/eclipse$ cmake -LAH . 
    

  • So, move eclipse's current directory to the project holder.

    machine:~/cdt-workspace$ mkdir SampleProject2
    machine:~/cdt-workspace$ cd SampleProject2
    machine:~/cdt-workspace/SampleProject2$ ~/cpp-2023-03/eclipse/eclipse (bring up IDE)
    

  1. File | New | c/c++ project | emtpy cmake project
  2. project -> properties | cmake | generate -> Apply (above error nothing) -> Ok
  3. F5 -> Close Project -> Open Project
  4. project | c/c++ index | rebuild


CDT Project construction Success.
It's a specification ?

Thanks.

[Updated on: Sun, 23 April 2023 04:31]

Report message to a moderator

Previous Topic:Multiple "could not be resolved" problems
Next Topic:any plugin to create visual representation of classes or uml?
Goto Forum:
  


Current Time: Thu Sep 26 13:04:18 GMT 2024

Powered by FUDForum. Page generated in 0.02006 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top