Expose HIP_VERSION_* to HIP source and HIP applications

Change-Id: I6fb0d6711642c4fad2cd89b98707ee4b548b7243
This commit is contained in:
Maneesh Gupta
2016-09-22 12:27:07 +05:30
parent 751a2cfce5
commit a5e951e3d9
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -60,6 +60,7 @@ parse_config_file("$HIP_PATH/lib/.buildInfo", \%hipConfig);
#HIP_PLATFORM controls whether to use NVCC or HCC for compilation:
$HIP_PLATFORM= `$HIP_PATH/bin/hipconfig --platform` // "hcc";
$HIP_VERSION= `$HIP_PATH/bin/hipconfig --version`;
($HIP_VERSION_MAJOR, $HIP_VERSION_MINOR, $HIP_VERSION_PATCH) = split(/\./, $HIP_VERSION);
if ($verbose & 0x2) {
print ("HIP_PATH=$HIP_PATH\n");
@@ -158,7 +159,7 @@ if ($HIP_PLATFORM eq "hcc") {
}
# Add paths to common HIP includes:
$HIPCXXFLAGS .= " -I$HIP_PATH/include" ;
$HIPCXXFLAGS .= " -I$HIP_PATH/include -DHIP_VERSION_MAJOR=$HIP_VERSION_MAJOR -DHIP_VERSION_MINOR=$HIP_VERSION_MINOR -DHIP_VERSION_PATCH=$HIP_VERSION_PATCH" ;
my $compileOnly = 0;
my $needCXXFLAGS = 0; # need to add CXX flags to compile step