FWIW the CMake folk actually document this [0]. Having said that, it seems numerous CMake users find this behaviour surprising [1] and I can certainly attest to having tripped over it before.
[0]: https://gitlab.kitware.com/cmake/community/wikis/FAQ#i-run-an-out-of-source-build-but-cmake-generates-in-source-anyway-why [1]: https://stackoverflow.com/questions/9680420/looking-for-a-cmake-clean-command-to-clear-up-cmake-output > On Jun 24, 2019, at 12:14, Chris Guikema <[email protected]> > wrote: > > Hello Amit, > > A CMakeCache.txt file can get accidentally created quite easily. I reproduced > the issue by running "ccmake .." to pull up the interactive GUI in the top > level directory instead of a build folder. > > chrisguikema@ubuntu ~/seL4/camkes-vm $ ls > camkes_README.md CMakeLists.txt init-build.sh kernel projects README.md > test tools > > CMake Error: The source directory "/home/chrisguikema/seL4/" does not appear > to contain CMakeLists.txt. > Specify --help for usage, or press the help button on the CMake GUI. > > chrisguikema@ubuntu ~/seL4/camkes-vm $ ls > camkes_README.md CMakeFiles kernel README.md tools > CMakeCache.txt CMakeLists.txt init-build.sh projects test > > The easiest solution is to just delete the file. It shouldn't just appear, > except by mistake. > > -----Original Message----- > From: Devel <[email protected]> On Behalf Of Amit Goyal > Sent: Monday, June 24, 2019 3:05 PM > To: Aditya Upadhyay <[email protected]> > Cc: [email protected] > Subject: Re: [seL4] CMake Error > > CAUTION: This email originated from outside the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > Hi All, > > Somehow a file named CMakeCache.txt came into my top level directory. I > removed that file and ran the init script. It is working fine now. Is this > file created intentionally or is it some bug? > > -- > Thanks and Regards, > Amit Goyal > > On 2019-06-20 10:16, Aditya Upadhyay wrote: >> Earlier I was facing similar issue. But solved by updating gcc 4.8 to >> gcc 7.4. >> $ sudo apt-get install --reinstall gcc >> >> P.S. I am also a newbie in this seL4 thing. >> >> On Thu, Jun 20, 2019 at 5:01 AM Mcleod, Kent (Data61, Kensington NSW) >> <[email protected]> wrote: >>> >>> Is there a kernel folder in the directory above your build directory, >>> adjacent to the init script that you are calling? Can you instead try >>> running ./init --plat pc99 --tut hello-camkes-2 --solution in the top >>> directory of the project. It will create a build directory for you. >>>>>> Could not find toolchain file: ../kernel/gcc.cmake Call Stack >>>>>> (most recent call first): >>>>>> CMakeLists.txt >>>>>> >>>>>> >>>>>> CMake Error: CMake was unable to find a build program >>> corresponding >>>>>> to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need >>> to >>>>>> select a different build tool. >>>>>> CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake >>>>>> Error: CMAKE_CXX_COMPILER not set, after EnableLanguage >>> >>> >>> _______________________________________________ >>> Devel mailing list >>> [email protected] >>> https://sel4.systems/lists/listinfo/devel > > > _______________________________________________ > Devel mailing list > [email protected] > https://sel4.systems/lists/listinfo/devel > _______________________________________________ > Devel mailing list > [email protected] > https://sel4.systems/lists/listinfo/devel _______________________________________________ Devel mailing list [email protected] https://sel4.systems/lists/listinfo/devel
