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

Commit d9dfbb4

Browse files
author
jjwilke
committed
add spack nvcc_wrapper
1 parent a43f315 commit d9dfbb4

File tree

3 files changed

+505
-2
lines changed

3 files changed

+505
-2
lines changed

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CMAKE_MINIMUM_REQUIRED(VERSION 3.8 FATAL_ERROR)
2+
PROJECT(KokkosNVCCWrapper CXX CUDA)
3+
SET(KokkosNVCCWrapper_VERSION_MAJOR 2)
4+
SET(KokkosNVCCWrapper_VERSION_MINOR 7)
5+
SET(KokkosNVCCWrapper_VERSION_PATCH 4)
6+
7+
IF (CMAKE_CUDA_HOST_COMPILER)
8+
SET(KOKKOS_CXX ${CMAKE_CUDA_HOST_COMPILER})
9+
ELSE()
10+
SET(KOKKOS_CXX ${CMAKE_CXX_COMPILER})
11+
ENDIF()
12+
13+
CONFIGURE_FILE(nvcc_wrapper.in nvcc_wrapper @ONLY)
14+
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/nvcc_wrapper
15+
DESTINATION bin
16+
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)
17+

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
# THIS REPOSITORY HAS BEEN DEPRECATED
1+
# Kokkos NVCC Wrapper
2+
3+
This wraps an nvcc, allowing it to be treated as a real C++ compiler with all the usual flags.
4+
Simple run `cmake` as usual to configure the compiler. The only two flags that need to be set are:
5+
````
6+
-DCMAKE_CXX_COMPILER=
7+
-DCMAKE_CUDA_COMPILER=
8+
````
9+
so that the wrapper knows which underlying `nvcc` and which underlying `g++` to use.
10+
This is configured as both a CXX and CUDA project with CMake, which means a valid
11+
CUDA installation must be available.
212

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

0 commit comments

Comments
 (0)