Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
add spack nvcc_wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jjwilke committed Apr 30, 2020
1 parent a43f315 commit d9dfbb4
Show file tree
Hide file tree
Showing 3 changed files with 505 additions and 2 deletions.
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.8 FATAL_ERROR)
PROJECT(KokkosNVCCWrapper CXX CUDA)
SET(KokkosNVCCWrapper_VERSION_MAJOR 2)
SET(KokkosNVCCWrapper_VERSION_MINOR 7)
SET(KokkosNVCCWrapper_VERSION_PATCH 4)

IF (CMAKE_CUDA_HOST_COMPILER)
SET(KOKKOS_CXX ${CMAKE_CUDA_HOST_COMPILER})
ELSE()
SET(KOKKOS_CXX ${CMAKE_CXX_COMPILER})
ENDIF()

CONFIGURE_FILE(nvcc_wrapper.in nvcc_wrapper @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/nvcc_wrapper
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)

13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# THIS REPOSITORY HAS BEEN DEPRECATED
# Kokkos NVCC Wrapper

This wraps an nvcc, allowing it to be treated as a real C++ compiler with all the usual flags.
Simple run `cmake` as usual to configure the compiler. The only two flags that need to be set are:
````
-DCMAKE_CXX_COMPILER=
-DCMAKE_CUDA_COMPILER=
````
so that the wrapper knows which underlying `nvcc` and which underlying `g++` to use.
This is configured as both a CXX and CUDA project with CMake, which means a valid
CUDA installation must be available.

Use `bin/nvcc_wrapper` from [kokkos/kokkos](https://github.com/kokkos/kokkos) instead
Loading

0 comments on commit d9dfbb4

Please sign in to comment.