GithubHelp home page GithubHelp logo

Comments (5)

mvieth avatar mvieth commented on July 24, 2024

Now I use the vcpkg toolchain to compile the PCL original source code,

What do you mean exactly? Could you describe that in more detail, ideally with the commands you are using? Do you use the vcpkg --head option?

from pcl.

QiuYilin avatar QiuYilin commented on July 24, 2024

@mvieth
I mean I don't install PCL from vcpkg but compile PCL source code directly, using vcpkg's dependencies at the same time.

"C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_INSTALL_PREFIX=C:/program_on_git/thirdParty/pcl/out/install/VS+vcpkg -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_OVERLAY_TRIPLETS=C:\src\vcpkg\sfr-registry\triplets -DBUILD_examples=ON -DWITH_CUDA=ON -DBUILD_GPU=ON -DBUILD_CUDA=ON -SC:/program_on_git/thirdParty/pcl -BC:/program_on_git/thirdParty/pcl/out/build/VS+vcpkg -G "Visual Studio 17 2022" -T host=x64 -A x64

from pcl.

larshg avatar larshg commented on July 24, 2024

I have had trouble when having multiple versions of cuda installed before as well.
Generally we use the enable_language(cuda) option - so you could also try to make a minimal cmake working example and we can take it on from there.

from pcl.

mvieth avatar mvieth commented on July 24, 2024

For me (on Ubuntu Linux), setting the following CMake variables correctly sometimes helped CMake find cuda: -DCMAKE_CUDA_COMPILER=<path to nvcc executable>, also CUDA_TOOLKIT_ROOT_DIR, CUDAToolkit_ROOT

from pcl.

QiuYilin avatar QiuYilin commented on July 24, 2024

By tracing the cmake code, I found the problem.

 C:\program_on_git\thirdParty\pcl\build\CMakeFiles\CheckCUDA> cmake . -G "Visual Studio 17 2022" -A "x64" -T "host=x64" -DCMAKE_GENERATOR_INSTANCE:INTERNAL="C:\Program Files\Microsoft Visual Studio\2022\Community"
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
CMake Error at C:/Program Files/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:529 (message):
  No CUDA toolset found.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  C:/Program Files/CMake/share/cmake-3.28/Modules/CMakeDetermineCUDACompiler.cmake:135 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:2 (project)

In CMakeDetermineCompilerId.cmake

    if(lang STREQUAL CUDA)
      if(NOT CMAKE_VS_PLATFORM_TOOLSET_CUDA)
        message(FATAL_ERROR "No CUDA toolset found.")
      endif()

The problem is that when cuda is installed, some files will be copied to the visual studio folder, and I reinstalled visual studio some time ago, so reinstalling cuda or manually copying the files can solve the problem. This is a problem that has nothing to do with pcl, sorry I don't have it Debug carefully before raising an issue.

from pcl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.