cuda architecture error

This is snippet in my CMakeLists.txt. I have set the architecture but I still get error when I am making my packages.if(CUDA_FOUND)
  enable_language(CUDA)
  include(FindCUDA)

  set(CUDA_PROPAGATE_HOST_FLAGS OFF)
  set(
      CUDA_NVCC_FLAGS
      ${CUDA_NVCC_FLAGS};
      -std=c++11
      -maxrregcount=32;
      -O3;
      -arch=sm_35;
      -w

CMake Error at autorally/autorally_core/src/StateEstimator/CMakeLists.txt:18 (target_include_directories):
  Cannot specify include directories for target
  "/usr/local/lib/cmake/GTSAM/../../../include" which is not built by this
  project.


==========/usr/local/lib/GeographicLib::GeographicLib_SHARED
CMake Warning at autorally/autorally_core/src/CameraAutoBalance/CMakeLists.txt:44 (message):
  Could not find Spinnaker library.  Will not build CameraAutoBalance for
  FLIR cameras


-- +++ processing catkin package: 'autorally_control'
-- ==> add_subdirectory(autorally/autorally_control)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.55.0")  
CMake Warning (dev) at /opt/ros/noetic/share/dynamic_reconfigure/cmake/dynamic_reconfigure-macros.cmake:128 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  /opt/ros/noetic/share/dynamic_reconfigure/cmake/dynamic_reconfigure-macros.cmake:89 (dynreconf_called)
  autorally/autorally_control/CMakeLists.txt:24 (generate_dynamic_reconfigure_options)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Installing devel-space wrapper /home/tanmayd26/catkin_ws/src/autorally/autorally_control/src/gpsWaypoint/GenerateWaypoints to /home/tanmayd26/catkin_ws/devel/lib/autorally_control
CMake Warning (dev) at autorally/autorally_control/src/path_integral/CMakeLists.txt:18 (find_package):
  Policy CMP0146 is not set: The FindCUDA module is removed.  Run "cmake
  --help-policy CMP0146" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /usr/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:277 (message):
  CMAKE_CUDA_ARCHITECTURES must be non-empty if set.

Locking; spam was detected and there’s a duplicate after approving.