gpumatrix icon indicating copy to clipboard operation
gpumatrix copied to clipboard

CUDA_NVCC_FLAGS caused "redefinition of argument 'std'"

Open TianBo-Timothy opened this issue 8 years ago • 1 comments

The latest commit (314f5e2) fixed a few issues I posted (#3, #4 and #5). However the newly added CUDA_NVCC_FLAGS seems to be responsible for an error "redefinition of argument 'std'". The complete error message is as follows:

[  6%] Building NVCC (Device) object src/CMakeFiles/GPUMatrix.dir/impl/backend/cuda/GPUMatrix_generated_FunctionImpl.cu.o
nvcc fatal   : redefinition of argument 'std'
CMake Error at GPUMatrix_generated_FunctionImpl.cu.o.cmake:207 (message):
  Error generating
  /home/xxx/workspace/gpumatrix/build/src/CMakeFiles/GPUMatrix.dir/./impl/backend/cuda/./GPUMatrix_generated_FunctionImpl.cu.o


src/CMakeFiles/GPUMatrix.dir/build.make:1771: recipe for target 'src/CMakeFiles/GPUMatrix.dir/impl/backend/cuda/GPUMatrix_generated_FunctionImpl.cu.o' failed
make[2]: *** [src/CMakeFiles/GPUMatrix.dir/impl/backend/cuda/GPUMatrix_generated_FunctionImpl.cu.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/GPUMatrix.dir/all' failed
make[1]: *** [src/CMakeFiles/GPUMatrix.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

The project compiles if I comment out the following line in CMakeLists.txt: set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11")

TianBo-Timothy avatar Dec 25 '17 13:12 TianBo-Timothy

that maybe because of you have already a -std option in your CUDA_NVCC_FLAGS.

Detections will be added in the future.

rudaoshi avatar Jan 07 '18 06:01 rudaoshi