I'm using the Emacs eshell's alias feature to make an alias to the cmake
command like below:
$ alias cmake 'cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1'
The alias is created correctly, here is the output of running which cmake
inside eshell:
$ which cmake
cmake is an alias, defined as "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
However, when running this alias cmake
inside my project, it doesn't recognize the input path correctly. For example, when running cmake ..
, it seems unable to interpret the ..
path.
Here are the detailed steps to produce this error:
$ cd my-project # the CMakeLists.txt is stored at the root folder of this project
$ mkdir build
$ cd build
$ cmake .. # running the cmake alias
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Error: The source directory "/home/trungtq/workspace/ocaml/discover/llvm-normalizer/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Does anyone know how to fix this problem?
Thank you very much!