CUDA : Cannot get compiler information

已完成

I got this error when using CUDA in a sub-project, added with `add_subdirectory` :

 

/home/XXX/.local/share/JetBrains/Toolbox/apps/CLion/ch-0/222.4345.21/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/home/XXX/.local/share/JetBrains/Toolbox/apps/CLion/ch-0/222.4345.21/bin/ninja/linux/ninja -DCMAKE_C_COMPILER=/usr/bin/cc -DCMAKE_CXX_COMPILER=/usr/bin/c++ -G Ninja -S /home/XXX/Documents/LSTS/git-root -B /home/XXX/Documents/LSTS/git-root/cmake-build-debug
-- CUDA found, using GPU-optimized version of the algorithm.
-- HFS directory: /opt/hfs19.5
-- Found Houdini 19.5.403
-- OpenMP found.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/XXX/Documents/LSTS/git-root/cmake-build-debug

Cannot get compiler information:
  Compiler exited with error code 1: /usr/local/cuda-11.8/bin/nvcc -DAMD64 -DENABLE_THREADS -DFBX_ENABLED=1 -DLINUX -DMAKING_DSO -DOPENCL_ENABLED=1 -DOPENVDB_ENABLED=1 -DSESI_LITTLE_ENDIAN -DSIZEOF_VOID_P=8 -DUSE_PTHREADS -DUSE_PYTHON3=1 -DUT_ASSERT_LEVEL=2 -DVERSION=\"19.5.403\" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS=1 -isystem=/home/XXX/Documents/LSTS/opencv-4.6.0/cmake-build-relwithdebinfo/install/include/opencv4 -isystem=/usr/include/eigen3 -isystem=/opt/hfs19.5/toolkit/include -isystem=/opt/hfs19.5/toolkit/include/python3.9 -g --generate-code=arch=compute_75,code=[compute_75,sm_75] -fPIC -W -Wall -Wno-parentheses -Wno-reorder -Wno-sign-compare -Wno-uninitialized -Wno-unused-parameter -Wunused -Wdeprecated-declarations -Wno-deprecated -D_GLIBCXX_USE_CXX11_ABI=0 -fno-strict-aliasing -Wno-unused-local-typedefs -faligned-new -std=c++17 --dryrun /tmp/compiler-file3998891677916163463.cu
    nvcc fatal   : Unknown option '-fPIC'

When I open the sub-project in CLion, I don't get this error and everything is fine.

It is still possible to compile the project (as the CMake generation is successful), but the editor syntax higlighting features does not work in the subproject.

 

评论操作 固定链接

Hello!

Please send your entire project to clion-support at jetbrains.com so that we could take a look. Thanks.

0

请先登录再写评论。