cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.28k stars 901 forks source link

Target "MVS" requires the language dialect "CUDA17" #909

Open Codey-Chang opened 1 year ago

Codey-Chang commented 1 year ago

ubuntu:20 cuda:11.6

(base) zz@zz-com:~/openMVS/make$ cmake . ../ -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="../.././vcglib" -- Detected version of GNU GCC: 94 (904) Compiling with C++17 -- WARNING: BREAKPAD was not found: Please specify BREAKPAD directory using BREAKPAD_ROOT env. variable -- Can't find BreakPad. Continuing without it. -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: iostreams program_options system serialization -- Eigen 3.4.0 found (include: /usr/local/include/eigen3) -- OpenCV 4.5.5 found (include: /usr/local/include/opencv4) -- Using header-only CGAL -- Targetting Unix Makefiles -- Using /usr/bin/c++ compiler. -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")
-- Boost include dirs: /usr/include -- Boost libraries:
-- Using gcc version 4 or later. Adding -frounding-math -- VCG found (include: /home/zz/vcglib) -- GLEW 2.1.0 found (include: /usr/include) -- GLFW3 3.3.2 found (include: ) -- Configuring done CMake Error in libs/MVS/CMakeLists.txt: Target "MVS" requires the language dialect "CUDA17" . But the current compiler "NVIDIA" does not support this, or CMake does not know the flags to enable it.

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.

I have tried set(CMAKE_CXX_STANDARD 17) set(CMAKE_CUDA_STANDARD 14) set(CMAKE_CUDA_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) but it does not work!

cdcseacave commented 1 year ago

I saw this error several times now on linux, somehow the CUDA env is not set up well and it does not find its components, like nvcc; try https://stackoverflow.com/a/19981506/1622193 or/and setting export CUDACXX=/usr/local/cuda/bin/nvcc

Codey-Chang commented 1 year ago

I saw this error several times now on linux, somehow the CUDA env is not set up well and it does not find its components, like nvcc; try https://stackoverflow.com/a/19981506/1622193 or/and setting export CUDACXX=/usr/local/cuda/bin/nvcc

thank you very much.I add export CUDACXX=/usr/local/cuda/bin/nvcc in the ~/.bashrc and it does work. lol