From 396e355c940d1427ccd7be7435499074f56bab7e Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 20 Jul 2018 18:45:36 +0300 Subject: [PATCH] Clean up minor issues. --- mesonbuild/compilers/cuda.py | 10 ++++++---- test cases/cuda/1 simple/prog.cu | 10 ++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index f398bad81..a8cd7bce4 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -20,7 +20,6 @@ from .compilers import Compiler, cuda_buildtype_args class CudaCompiler(Compiler): def __init__(self, exelist, version, is_cross, exe_wrapper=None): - # If a child ObjCPP class has already set it, don't set it ourselves if not hasattr(self, 'language'): self.language = 'cuda' super().__init__(exelist, version) @@ -39,7 +38,7 @@ class CudaCompiler(Compiler): return 'Cuda' def get_no_stdinc_args(self): - return [''] + return [] def sanity_check(self, work_dir, environment): source_name = os.path.join(work_dir, 'sanitycheckcuda.cu') @@ -49,7 +48,10 @@ class CudaCompiler(Compiler): extra_flags += self.get_compile_only_args() code = ''' - #include +__global__ void kernel (void) { + +} + int main(int argc,char** argv){ return 0; } @@ -67,7 +69,7 @@ class CudaCompiler(Compiler): pe = subprocess.Popen(binary_name) pe.wait() if pe.returncode != 0: - raise EnvironmentException('Executables created by ObjC compiler %s are not runnable.' % self.name_string()) + raise EnvironmentException('Executables created by Cuda compiler %s are not runnable.' % self.name_string()) def get_compiler_check_args(self): return super().get_compiler_check_args() + [] diff --git a/test cases/cuda/1 simple/prog.cu b/test cases/cuda/1 simple/prog.cu index ed21152af..5f8f0c345 100644 --- a/test cases/cuda/1 simple/prog.cu +++ b/test cases/cuda/1 simple/prog.cu @@ -1,13 +1,11 @@ #include -#include __global__ void kernel (void){ - } -int main( void ) { - kernel<<<1,1>>>(); - printf( "Hello, World!\n" ); - return 0; +int main(int argc, char **argv) { + kernel<<<1,1>>>(); + printf("Hello, World!\n"); + return 0; }