Files
cuda/api/cuda_api_host.gpr
Tonu Naks d6d1b2eff8 Add instructions for using CUDA_ROOT
Rename cuda_host to CUDA_HOST in order to
comply with common environment variable naming
conventions.

Solves eng/toolchain/cuda#32
2023-11-16 13:39:45 +00:00

31 lines
909 B
Plaintext

project CUDA_API_Host is
type CUDA_Host_Option is ("x86_64-linux", "aarch64-linux");
CUDA_Host : CUDA_Host_Option := external ("CUDA_HOST", "x86_64-linux");
CUDA_Root := external ("CUDA_ROOT");
for Target use CUDA_Host;
for Source_Dirs use ("host/cuda_api", "host/cuda_raw_binding", "cuda_internal", "host_static");
for Object_Dir use "obj/host";
Compiler_Options := ("-gnatX0", "-gnatd_c");
Linker_Options := (
"-L" & CUDA_Root & "/targets/" & CUDA_Host & "/lib",
"-L" & CUDA_Root &"/targets/" & CUDA_Host & "/lib/stubs",
"-lcudadevrt",
"-lcudart_static",
"-lrt",
"-lpthread",
"-ldl",
"-Wl,--unresolved-symbols=ignore-all"
);
Binder_Options := ("-d_c=device");
package Compiler is
for Switches ("Ada") use Compiler_Options;
end Compiler;
end CUDA_API_Host;