Can't generate CMakeCache with Optix enabled

I’ve enabled Optix and pointed to installed Optix SDK include but then I get this error:

Found OptiX: /home/xxx/blender-git/blender/NVIDIA-OptiX-SDK-7.0.0-linux64/include  
CMake Warning at intern/cycles/kernel/CMakeLists.txt:368 (message):
  CUDA version .  detected, build may succeed but only CUDA 10.1 is
  officially supported


CMake Error at intern/cycles/kernel/CMakeLists.txt:465 (elseif):
  given arguments:

    "sm_30" "MATCHES" "sm_7." "AND" "LESS" "100"

  Unknown arguments specified


Configuring incomplete, errors occurred!

Solved by enabling also WITH_CYCLES_CUDA_BINARIES :man_facepalming: