How to pass the compilation options of the host compiler to NVCC

I have set up some CXXFLAGS, and when compiling .cpp files, these paths are valid. However, when compiling .cu files, I cannot find the header file, and the header file paths are all in CXXFLAGS. What should I configure to solve this problem

| /home/zxy/build2/tmp/work/armv8a-oe4t-linux/python3-pytorch/2.4.1/recipe-sysroot-native/usr/local/cuda-12.6/bin/..//include/crt/host_config.h:218:10: fatal error: features.h: No such file or directory
|   218 | #include <features.h> /* for __THROW */
|       |          ^~~~~~~~~~~~
| compilation terminated.
| Compiling       src/device/common.cu

As per documentation:

to specify an include search path, use either of these:

--include-path path
-I path

If the question is really about CMake’s handling of include paths, sorry, can’t help with that.

What is the nvcc command line? If you want to use environment variables, see 1. Introduction — NVIDIA CUDA Compiler Driver 12.9 documentation

Thanks, using the nvcc command directly should be relatively simple, but my question may involve cmake’s passing and handling of parameters, and I need to study it