CXX flags are being automatically added to ncvv as CUDA_FLAGS

Summary:

CXX flags are being automatically added to ncvv as CUDA_FLAGS which causes nvcc compilation error.

CMake appends the CXX flags to the list of CUDA flags automatically.

Compiler versions:

The CUDA compiler identification is NVIDIA 10.2.89.

The CXX compiler identification is GNU 7.5.0.

CUDA settings in the CmakeLists.txt file:



CUDA settings

include_directories(${CUDA_INCLUDE_DIRS})

link_directories((${CUDA_LIB_DIRS}))

SET(CUDA_SEPARABLE_COMPILATION ON)

set(CUDA_VERBOSE_BUILD ON)


CUDA flags defined and set:

CUDA_FLAGS: -gencode arch=compute_70,code=sm_70 --std=c++14 -g -G

During compilation the following CXX flags are being appended to the list of flags above:

CXX_FLAGS: -O3 -DNDEBUG -DRTI_UNIX -DRTI_LINUX -DRTI_64BIT -march=armv8-a -std=c++14

Error:

nvcc fatal : ‘arch=armv8-a’: expected a number

Hi, I encountered the same problem.
Have you resolved the issue?