<div dir="ltr"><div>So, it doesn't seem that my setting in NVCC flags is being used:</div><div><br></div><div>In CMakeLists.txt:</div><div><br></div><div>project(tangram LANGUAGES CXX CUDA)</div><div>[...]</div><div><br></div><div>    FIND_PACKAGE(CUDA REQUIRED)<br>    if(CUDA_FOUND)<br>      add_definitions(-DCUDA_CALLABLE="__host__ __device__")<br>      set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-Xcompiler="-fopenmp -fPIC")<br>      set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--std=c++11 --expt-relaxed-constexpr)<br>      set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_70,code=sm_70)<br>      set(CUDA_PROPAGATE_HOST_FLAGS ON)<br>      set(CUDA_SEPARABLE_COMPILATION OFF)<br>      message(STATUS "CUDA include directories ${CUDA_INCLUDE_DIRS}")<br>      message(STATUS "Overwriting THRUST_DIR to point to ${CUDA_INCLUDE_DIRS}/thrust")<br>      set(THRUST_DIR "${CUDA_INCLUDE_DIRS}")<br>      set(EXTRA_LIBS ${CUDA_LIBRARIES})<br>      message("CUDA flags" ${CUDA_NVCC_FLAGS})<br>    else(CUDA_FOUND)<br>      message(FATAL "CUDA not found")<br>    endif(CUDA_FOUND)<br>[...]</div><div><br></div><div>Then, at cmake stage:</div><div>[...]<br></div><div>-- Overwriting THRUST_DIR to point to /projects/opt/centos7/cuda/9.0/include/thrust<br>CUDA flags-Xcompiler="-fopenmp -fPIC"--std=c++11--expt-relaxed-constexpr-gencodearch=compute_70,code=sm_70<br>-- Adding application directory app<br>[...]</div><div><br></div><div>But then, build fail, and when I do make VERBOSE=1:</div><div>[...]<br></div><div>[ 60%] Building CUDA object app/simple-vfgen-cuda/CMakeFiles/simple-vfgen-cuda.dir/simple-vfgen-cuda.cu.o<br>cd /home/qth20/develop/tangram/build/app/simple-vfgen-cuda && /projects/opt/centos7/cuda/9.0/bin/nvcc  -DCUDA_CALLABLE="\"__host__ __device__\"" -DHAVE_LAPACKE -DTHRUST -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA -DTHRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_OMP -I/home/qth20/develop/tangram -I/home/qth20/develop/tangram/build -I/home/qth20/develop/tangram/cinch/logging -I/home/qth20/installed/jali/include -I/home/qth20/installed/jali-tpls/include -I/home/qth20/installed/jali-tpls/trilinos-12-10-1/include -I/projects/opt/centos7/openmpi/3.1.0-gcc_8.1.0/include -I/home/qth20/installed/jali-tpls/trilinos-12-10-1/lib/cmake/Zoltan/../../../include -I/home/qth20/installed/jali-tpls/include/UnitTest++ -I/usr/include/lapacke -I/home/qth20/installed/xmof2d/include -I/projects/opt/centos7/cuda/9.0/include  -O3 -DNDEBUG   -std=c++11 -x cu -c /home/qth20/develop/tangram/app/simple-vfgen-cuda/<a href="http://simple-vfgen-cuda.cu">simple-vfgen-cuda.cu</a> -o CMakeFiles/simple-vfgen-cuda.dir/simple-vfgen-cuda.cu.o<br>[...]<br></div><div><br></div><div>None of the flags was passed into nvcc. This is with cmake/<a href="http://3.11.1.">3.11.1.</a> Does upgrading to 3.12 recommended to solve the issue?</div><div><br></div><div>Thanks,</div><div>Quang<br></div></div>