Cuda Architectures reappear, don't understand why

I am compiling Blender myself and face a somewhat strange issue. I’m modifying CMakeLists.txt in the downloaded blender git folder, eliminating architectures I don’t need. My line now is this:

set(CYCLES_CUDA_BINARIES_ARCH sm_50 sm_52 sm_60 sm_61 sm_70 CACHE STRING "CUDA architectures to build binaries for")

What I don’t get is, even though sm_30 is clearly not included any more, on a fresh build or project initialization those kernels reappear in CMakeCache.txt. For example, I use make release nobuild builddir MyDir. When I go to MyDir once this has completed, the unwanted architectures are still in CMakeCache.txt.

I know I can just edit CMakeCache.txt, but I wonder why those changes are not propagated to CMakeCache.txt automatically. I am compiling on Windows using MSVC 2017.

Adding the release argument means it uses build_files/cmake/config/blender_release.cmake.

1 Like