FindHIP: First version of re-implementation

Change-Id: I84332a0f7d89271bf9370dbcd19d893119e738f9


[ROCm/hip commit: b0621a4794]
This commit is contained in:
Maneesh Gupta
2016-09-02 15:07:33 +05:30
parent bb215fe616
commit df654fa623
6 changed files with 680 additions and 136 deletions
+9
View File
@@ -168,6 +168,8 @@ my $hasCU = 0; # options contain a cu-style file (HCC must force recogni
my $needHipHcc = ($HIP_PLATFORM eq 'hcc'); # set if we need to link hip_hcc.o from src tree. (some builds, ie cmake, provide their own)
my $printHipVersion = 0; # print HIP version
my $runCmd = 1;
my $buildDeps = 0;
my @options = ();
my @inputs = ();
@@ -240,6 +242,10 @@ foreach $arg (@ARGV)
$printHipVersion = 1;
$runCmd = 0;
}
if($arg eq '-M') {
$compileOnly = 1;
$buildDeps = 1;
}
if ($arg =~ m/^-/) {
# options start with -
@@ -278,6 +284,9 @@ if ($hasC and $HIP_PLATFORM eq 'nvcc') {
if ($hasCU and $HIP_PLATFORM eq 'hcc') {
$HIPCXXFLAGS .= " -x c++";
}
if ($buildDeps and $HIP_PLATFORM eq 'nvcc') {
$HIPCXXFLAGS .= " -M -D__CUDACC__";
}
if ($setStdLib eq 0 and $HIP_PLATFORM eq 'hcc')
{