-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake error on Ubuntu #26
Comments
Hi there! Looks like you forgot the Running (And thank you very much for the kind words!) |
Thanks!!! I got it
|
Worth noting I had exactly the same output and it wasn't because I hadn't recursively cloned the repo; in my case it was an old version of CMake. The -B flag was introduced in CMake 3.13. When running "cmake . -B build", older versions of CMake will look for source files in "bulid" |
I had a similar problem and |
upgrading
worked for me. |
hi, I really admire your work.
I met the problem when compiling C++ library with cmake , I have installed cmake==3.22.1.
ubuntu@ubuntu:~/Documents/instant-ngp-master/build$ cmake -version cmake version 3.22.1
I tried 'cmake . -B build', but got error as below:
ubuntu@ubuntu:~/Documents/instant-ngp-master$ cmake . -B build
CMake Error: The source directory "/home/ubuntu/Documents/instant-ngp-master/build" does not exist.
after 'mkdir build', it got a new error as below:
ubuntu@ubuntu:~/Documents/instant-ngp-master$ mkdir build
ubuntu@ubuntu:~/Documents/instant-ngp-master$ cmake . -B build
CMake Error: The source directory "/home/ubuntu/Documents/instant-ngp-master/build" does not appear to contain CMakeLists.txt.
I have never met such error but copied CMakeLists.txt to build/CMakeLists.txt, a new error as below:
ubuntu@ubuntu:~/Documents/instant-ngp-master$ cmake . -B build
`-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is NVIDIA 11.1.105
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-11.1/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- No release type specified. Setting to 'Release'.
CMake Error at CMakeLists.txt:96 (add_subdirectory):
add_subdirectory given source "dependencies/glfw" which is not an existing
directory.
CMake Error at CMakeLists.txt:98 (set_target_properties):
set_target_properties Can not find target to add properties to: glfw
...`
I also tried the compile method I used before:
mkdir build cd build cmake ..
, got same error.I am not familiar with CMAKE, and just learned ‘cmake . -B build‘ could create the build directory automatically . My Ubuntu is 18.04, Now I have no idea what to do next , and would appreciate your help.
The text was updated successfully, but these errors were encountered: