Add Kokkos building to CMake config

This commit is contained in:
Tom Deakin 2016-05-12 12:30:06 +01:00
parent 3ebad06bd4
commit f6fca3ac06
2 changed files with 19 additions and 2 deletions

View File

@ -105,8 +105,15 @@ endif ()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Kokkos # Kokkos
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
if (BUILD_KOKKOS)
# TODO if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
add_custom_target(gpu-stream-kokkos COMMAND make -f KokkosMakefile)
else()
message("Skipping Kokkos (requires Linux)")
endif()
else()
message("Skipping Kokkos... (use -DBUILD_KOKKOS=1 to opt in)")
endif()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# SYCL # SYCL

10
KokkosMakefile Normal file
View File

@ -0,0 +1,10 @@
default: gpu-stream-kokkos
include /modules/modules/kokkos/Makefile.kokkos
gpu-stream-kokkos: main.o KOKKOSStream.o
$(CXX) $(KOKKOS_LDFLAGS) $^ $(KOKKOS_LIBS) -o $@ -DKOKKOS
%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
$(NVCC_WRAPPER) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) -c $< -DKOKKOS