Don't check VERSION_BUILD is defined

Check if it is true or not. The string() call would define this to an
empty string, which would pass. This would then leave a trailing -
in the version string, which dpkg would error on during package
installation.

Change-Id: Ifb5fc15f5dde506e96bff7881a5d3f22d983406e


[ROCm/ROCR-Runtime commit: 0016c6ce5b]
Tento commit je obsažen v:
Matt Arsenault
2019-05-22 14:41:54 -07:00
odevzdal Matthew Arsenault
rodič b754622b33
revize 1379fea626
2 změnil soubory, kde provedl 4 přidání a 3 odebrání
+3 -2
Zobrazit soubor
@@ -79,7 +79,8 @@ set ( BUILD_VERSION_MAJOR ${VERSION_MAJOR} )
set ( BUILD_VERSION_MINOR ${VERSION_MINOR} )
set ( BUILD_VERSION_PATCH ${VERSION_PATCH} )
set ( LIB_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" )
if ( DEFINED VERSION_BUILD )
if ( VERSION_BUILD )
set ( BUILD_VERSION_PATCH "${BUILD_VERSION_PATCH}-${VERSION_BUILD}" )
endif ()
set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" )
@@ -103,7 +104,7 @@ include_directories ( ${HSAKMT_INC_PATH} )
link_directories ( ${HSAKMT_LIB_PATH} )
## ROCr build internal versioning
if ( DEFINED VERSION_BUILD )
if ( VERSION_BUILD )
add_definitions ( -DROCR_BUILD_ID=${BUILD_VERSION_STRING} )
else ()
add_definitions ( -DROCR_BUILD_ID="${BUILD_VERSION_STRING}-unknown" )
+1 -1
Zobrazit soubor
@@ -73,7 +73,7 @@ function( parse_version VERSION_STRING )
set ( TEMP_VERSION_STRING "${TEMP_VERSION_STRING}.${PATCH}" )
endif ()
if ( DEFINED VERSION_BUILD )
if ( VERSION_BUILD )
set ( VERSION_BUILD "${VERSION_BUILD}" PARENT_SCOPE )
endif ()