-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished stupid merging stupid stupidities
- Loading branch information
Showing
2 changed files
with
8 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,22 @@ | ||
use strict; | ||
use warnings; | ||
use File::Spec; | ||
use Module::Build; | ||
<<<<<<< HEAD | ||
|
||
# Get nvcc's path | ||
use strict; | ||
use warnings; | ||
use ExtUtils::nvcc; | ||
|
||
======= | ||
>>>>>>> fix-mem-troubles | ||
use Module::Build; | ||
my $build = Module::Build->new( | ||
module_name => 'CUDA::Minimal', | ||
license => 'perl', | ||
build_requires => { | ||
'ExtUtils::CBuilder' => '0', | ||
'ExtUtils::nvcc' => '0.03', | ||
# 'ExtUtils::CBuilder' => '0', | ||
}, | ||
requires => { | ||
'perl' => '0', | ||
}, | ||
dist_author => 'David Mertens <dcmertens.perl@gmail.com>', | ||
include_dirs => ['.', get_cuda_dir('include')], | ||
extra_linker_flags => [ '-L' . get_cuda_dir('lib'), '-lcudart'], | ||
config => {ExtUtils::nvcc::MB}, | ||
include_dirs => '.', | ||
); | ||
<<<<<<< HEAD | ||
$build->create_build_script; | ||
my $base_cuda_path; | ||
sub get_cuda_dir { | ||
my $final_dir = shift; | ||
# Find the location of nvcc, and one directori up | ||
if (not defined $base_cuda_path) { | ||
my ($nvcc_dir) = grep { -e $_ } | ||
map { File::Spec->catfile($_,'nvcc') } | ||
File::Spec->path; | ||
die "Unable to find nvcc in your current path\n" | ||
unless defined $nvcc_dir; | ||
my ($volume, $directories) = File::Spec->splitpath($nvcc_dir); | ||
$directories = File::Spec->catdir($directories, '..'); | ||
$base_cuda_path = File::Spec->catpath($volume, $directories, ''); | ||
} | ||
return File::Spec->catdir($base_cuda_path, $final_dir); | ||
} | ||
======= | ||
$build->create_build_script; | ||
>>>>>>> fix-mem-troubles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters