How to build master (2.92) with Optix enable?

hmm, I don’t understand what you expect : Here’s my output:

C:\Users\peter>dir c:\OptiXSDK7.0.0\include\optix.h
Volume in Laufwerk C: hat keine Bezeichnung.
Volumeseriennummer: B28F-A668

Verzeichnis von c:\OptiXSDK7.0.0\include

25.07.2019 22:52 1.764 optix.h
1 Datei(en), 1.764 Bytes
0 Verzeichnis(se), 247.380.303.872 Bytes frei

Maybe I should mention that I’m using 2 PC’s . PC1 contains a RTX 2070.
There I have done nothing special , just downloaded Optix 7.0.0 and installed in default location in c:\ProgrammData\Nvidia corporation\OptiX SDK 7.0.0 (yes with spaces)
I did not set OPTIX_ROOT_DIR other anything else, just run “make release” and it builds Blender with OPTIX enabled !

On PC2 I have a GTX 2080 but with actual Nvidia driver. An here I have this problem to get OPTIX to work and tried everything mentioned here in this thread, with no success.
Yes you’re right, I just say it doesn’t work, but what can I tell more ?
(A precompiled version of Blender works with OPTIX on this system)

Is there something different in handling of the build system, when a non RTX is found, even when Nvidia meanwhile supports Optix even with no RTX adapters ?

I’m just validating the files exist at the location we are expecting.

What’s the output of the following?

from the console run:

cd c:\blender-git\blender 
set OPTIX_ROOT_DIR=c:\OptiXSDK7.0.0\include
make release nobuild

you may need to adjust the first line if you cloned it elsewhere

Ok, meanwhile I
updated VS 2019, deleted the whole blender dir, git cloned again, did a
make update
make release
and now it works !
Sorry for bothering you, I don’t know what was wrong before…
Regards Peter

One last question, because a working build is fine, but I‘d like to understand a bit more, independently of my special problem.

Why will OPTIX include dir „sometimes“ be detected , even if not in the disussed path and no environment var is set , or any cmake changes are made, and sometimes not ?

Are there recent changes in the build system regarding this stuff ?

@PeterKrauspe I would assume that is just the effect of the Cmake cache still containing the path.

It happens even if I delete everything before …
I shoudn’t have said “sometimes”, it happens on 1 of my two PC’s as mentioned.