Closed Apreche closed 3 years ago
Hi, Scott!
I'm sorry for the inconvenience. From time to time I test the build steps using older CMake versions but unfortunately I hadn't ran across this issue.
Here is a short explanation of how CMake works:
The first argument of the cmake
command should be a directory with a CMakeLists.txt
file in it. CMake will then generate temporary files such as CMakeCache.txt
and Makefile
; they are created in the current directory by default, as shown in your second code snippet. -B
should in theory override this output directory, but unfortunately it didn't work for you.
Another way of doing this would be:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release # Upper directory contains 'CMakeLists.txt'.
cmake --build . # Equivalent to 'make' in your case.
If you find the build
directory superfluous, what you did is already okay.
I will try to make the build instructions clearer so that nobody else faces the same issue in the future.
Thanks!
Wow, thanks for the prompt and very helpful response. This worked perfectly. Excited to make some little apps with this. Thanks!
Cool! Don't hesitate to open an issue or discussion if you have any doubts.
Cheers!
I'm not familiar with cmake, but the instructions in the README were not working for me. I could not get it to put the build files into a build directory. I tried to create a build directory, and it complained that the
CMakeLists.txt
was not located in that build directory. Moving the file into that directory didn't work. In the end, I was only able to make it work just by building in the projects top level directory like so:cmake -DCMAKE_BUILD_TYPE=Release && make
When I checked the man page for my version of cmake, there was no mention whatsoever of the
-B
parameter. I have cmake version 3.10.2 on Ubuntu 18.04.Here is some terminal output of me trying to make it work that is probably a better illustration of the problem.
vs