From 3028e96ea5b31f148c424f2c5334af6d5e07f9fb Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 29 Dec 2021 13:41:42 +0100 Subject: [PATCH] :construction: try to have CUDA example --- test/cuda_example/CMakeLists.txt | 12 ++++++++++++ test/cuda_example/json_cuda.cpp | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 test/cuda_example/CMakeLists.txt create mode 100644 test/cuda_example/json_cuda.cpp diff --git a/test/cuda_example/CMakeLists.txt b/test/cuda_example/CMakeLists.txt new file mode 100644 index 000000000..44cc84ae6 --- /dev/null +++ b/test/cuda_example/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.8) +project(json_cuda LANGUAGES CXX CUDA) + +add_executable(json_cuda json_cuda.cpp) +set_source_files_properties(json_cuda.cpp PROPERTIES LANGUAGE CUDA) +target_include_directories(json_cuda PRIVATE ../../include) +target_compile_features(json_cuda PUBLIC cuda_std_11) +set_target_properties(json_cuda PROPERTIES + CUDA_EXTENSIONS OFF + CUDA_STANDARD_REQUIRED ON + CUDA_SEPARABLE_COMPILATION ON # Just needed if we need separable compilation; this adds -dc +) diff --git a/test/cuda_example/json_cuda.cpp b/test/cuda_example/json_cuda.cpp new file mode 100644 index 000000000..7288c31b9 --- /dev/null +++ b/test/cuda_example/json_cuda.cpp @@ -0,0 +1,4 @@ +#include + +int main() +{}