dreamworksanimation / openmoonray

MoonRay is DreamWorks’ open-source, award-winning, state-of-the-art production MCRT renderer.
https://openmoonray.org/
Apache License 2.0
4.32k stars 254 forks source link

no cuda found when compiling the code with cmake and vscode! #127

Closed jakoaltrd closed 1 year ago

jakoaltrd commented 1 year ago

PS E:\openmoonray> cmake -G "MinGW Makefiles" -S .\ -B .\build -- The C compiler identification is GNU 13.1.0 -- The CXX compiler identification is GNU 13.1.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/mingw64/bin/gcc.exe - 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: C:/mingw64/bin/c++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for a CUDA compiler -- Looking for a CUDA compiler - NOTFOUND -- No CUDA support CMake Error at D:/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR chrono date_time filesystem program_options system) Call Stack (most recent call first): D:/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) D:/CMake/share/cmake-3.27/Modules/FindBoost.cmake:2378 (find_package_handle_standard_args) arras/arras4_core/CMakeLists.txt:31 (find_package)

-- Configuring incomplete, errors occurred! PS E:\openmoonray>

I had cuda 12.2 installed and put in my path, still shows this error

heavyrain266 commented 1 year ago

Hello, since you're compiling with MinGW, try installing or building all depedencies using MSYS2. The issue with missing cuda libs and compiler originates from the fact that nvcc is heavly based on MSVC and calls cl.exe under the hood Also worth to note that Nvidia is not providing official support for MinGW.

jakoaltrd commented 1 year ago

Hello, since you're compiling with MinGW, try installing or building all depedencies using MSYS2. The issue with missing cuda libs and compiler originates from the fact that nvcc is heavly based on MSVC and calls cl.exe under the hood Also worth to note that Nvidia is not providing official support for MinGW.

cuda issue is solved, but the boost lib is missing, I installed boost and add the directories in cmakelists.txt like **

include boost directorys

include_directories(C:/boost_1_83_0)

include boost lib

link_directories(C:/boost_1_83_0/stage/lib/) **

still shows this error.help