title: configuring CMake to setup CUDA on Windows
body: <p>I am trying to use CMake for compiling CUDA based application on Windows (Visual Studio 2005). Here is an example stripped down CMake file: </p>
  
  <pre><code>cmake_minimum_required (VERSION 2.6)
  project (HELLO)
  
  #Support for CUDA Integration
  FIND_PACKAGE(CUDA)
  if(CUDA_FOUND)
      SET(CUDA_NVCC_FLAGS "-arch;sm_13")
  CUDA_ADD_EXECUTABLE(Hello hello.cu)
  else(CUDA_FOUND)
      message("CUDA is not installed on this system.")
  endif()
  </code></pre>
  
  <p>There are a few issues I wish to understand with this.</p>
  
  <p>When I open the solution file (Hello.sln), I don't see any custom build rule setup for the project (Right click on Project -> Custom build rules)</p>
  
  <p>I do see a "Hello_generated_hello.cu.obj" added to my project in Visual Studio. What is this file and why is it added to the project? </p>
  
  <p>By default CUDA Runtime API section doesn't come in Project properties.</p>
  
  <p>If I enable an appropriate custom build rule (NvCudaRuntimeApi.rules), I can now see CUDA runtime API section. If I now go to GPU subsection, I see the GPU architecture still set to be sm_10. </p>
  
  <p>Even if I use CUDA_INCLUDE_DIRECTORIES() Macro to add some directories for CUDA compilation, I won't see these settings in Project Properties -> CUDA Runtime API -> General -> Additional Include Directories.</p>
  
  <p>I wish to know if FindCUDA() package is very able to properly configure VS 2005 project for CUDA based compilation. May be I need to specify additional options to properly configure the project. I would certainly wish to know that. I wish to make sure that whatever options I have specified through CMakeLists file, I should be able to review them easily in my generated VS 2005 project. </p>
  
  <p>What is appropriate way to configure this? </p>