🚧 try to have CUDA example

This commit is contained in:
Niels Lohmann 2021-12-29 13:41:42 +01:00
parent 6d3115924c
commit 3028e96ea5
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 16 additions and 0 deletions

View File

@ -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
)

View File

@ -0,0 +1,4 @@
#include <nlohmann/json.hpp>
int main()
{}