Add Kokkos building to CMake config
This commit is contained in:
parent
3ebad06bd4
commit
f6fca3ac06
@ -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
10
KokkosMakefile
Normal 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
|
||||||
Loading…
Reference in New Issue
Block a user