title: Thrust Static Assertion when using in cpp files
body: <p>I am trying to compile and run a simple Cuda/thrust program, it works when the extension is <code>.cu</code> but it fails when the extension of source is <code>.cpp</code>.
  I already applied the required changes for cpp file in cmake but I am getting </p>
  
  <blockquote>
    <p>error: static assertion failed: unimplemented for this system
    THRUST_STATIC_ASSERT_MSG</p>
  </blockquote>
  
  <pre><code>cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
  
  project(thrust_test LANGUAGES CXX CUDA)
  
  find_package(CUDA 10.0 REQUIRED)
  message(STATUS "CUDA ${CUDA_VERSION_STRING} at ${CUDA_TOOLKIT_ROOT_DIR}")
  set(CUDA_LINK_LIBRARIES_KEYWORD PUBLIC)
  
  include_directories(${CUDA_INCLUDE_DIRS})
  link_directories(${CUDA_LIBRARY_DIRS})
  
  set(CMAKE_CUDA_STANDARD 14)
  set(CMAKE_CUDA_STANDARD_REQUIRED ON)
  set(CUDA_SEPARABLE_COMPILATION ON)
  
  set_source_files_properties(
          main.cpp
          PROPERTIES
          CUDA_SOURCE_PROPERTY_FORMAT
          OBJ)
  
  add_executable(${PROJECT_NAME} main.cpp)
  
  target_link_libraries(${PROJECT_NAME} ${CUDA_LIBRARIES})
  </code></pre>
  
  <p>and the main.cpp:</p>
  
  <pre><code>__host__
  __device__
  int foo() {
  
      // generate random data serially
      thrust::host_vector&lt;int&gt; h_vec(100);
      std::generate(h_vec.begin(), h_vec.end(), rand);
  
      // transfer to device and compute sum
      thrust::device_vector&lt;int&gt; d_vec = h_vec;
      return thrust::reduce(d_vec.begin(), d_vec.end(), 0, thrust::plus&lt;int&gt;());
  }
  
  int main(void) {
      std::cout &lt;&lt; "Thrust v" &lt;&lt;  THRUST_MAJOR_VERSION &lt;&lt; "." &lt;&lt; THRUST_MINOR_VERSION &lt;&lt; std::endl;
      std::cout &lt;&lt; foo() &lt;&lt; std::endl;
      return 0;
  
  }
  </code></pre>