In order to compile the samples in the SDK you need the following.

1. Visual Studio. Supported versions are listed in the release notes.

2. CUDA Toolkit. Supported versions are listed in the release notes.

3. CMake 3.0 minimum (http://www.cmake.org/cmake/resources/software.html).
I suggest the executable installer.


Instructions for building.

1. Start up cmake-gui from the Start Menu.

2. Select the C:\ProgramData\NVIDIA Corporation\OptiX SDK <version>\SDK directory
   from the installation for the source file location.

3. Create a build directory that isn't the same as the source directory.  For
   example, C:\ProgramData\NVIDIA Corporation\OptiX SDK <version>\SDK\build.
   If you don't have permissions to write into the this directory (writing into
   the "C:/Program Files" directory can be restricted in some cases), pick a different
   directory where you do have write permissions.  If you type in the directory
   (instead of using the "Browse Build..." button), CMake will ask you at the
   next step to create the directory for you if it doesn't already exist.

4. Press "Configure" button and select the version of Visual Studio you wish to
   use.  Note that the 64-bit compiles are separate from the 32-bit compiles.
   The difference between the bitnesses of the build will be marked with "Win64"
   for 64 bit builds (e.g. "Visual Studio 14 2015 Win64" for 64 bit builds and
   "Visual Studio 14 2013" for 32 bit builds).  Also note that OptiX only
   supports 64 bit builds, and CMake defaults to 32 bit configures, so you must
   change it.  Leave all other options on their default.  Press "OK".  This can
   take awhile while source level dependencies for CUDA files are computed.

5. Press "Configure" again.  Followed by "Generate".

6. Open the OptiX-Samples.sln solution file in the build directory you created.

7. Select "Build Solution" from the IDE.

8. Right click on one of the sample program targets in the solution explorer and
   select "Set as start up project".

9. Run the sample.  "q" or "Esc" will close the window.

Note that due to the way dependencies are automatically handled for CUDA
compilation in Visual Studio, if you build again Visual Studio will likely ask
you to reload your projects.  Please do so.  Subsequent compiles should not
result in reloading unless you change the files that are included by a CUDA
file.

Further instructions regarding the build system can be found in comments in the
SDK's CMakeLists.txt file.
