version.cmake improvements

- dynamically calculate NEO_DRIVER_VERSION for non-UNIX
- remove fixed NEO_DRIVER_VERSION from main cmake file

Change-Id: Ifab6182b1895086c1399f70112a4c9ad4cc66a0f
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk 2018-07-02 23:04:37 +02:00 committed by sys_ocldev
parent 64277ee849
commit cb44a28f8e
3 changed files with 14 additions and 6 deletions

View File

@ -409,10 +409,6 @@ option(HAVE_TBX_SERVER "Compile TBX server from TbxAccess library" OFF)
option(USE_CL_CACHE "Use OpenCL program binary cache" ON) option(USE_CL_CACHE "Use OpenCL program binary cache" ON)
set(CL_CACHE_LOCATION "cl_cache" CACHE STRING "OpenCL program binary cache location") set(CL_CACHE_LOCATION "cl_cache" CACHE STRING "OpenCL program binary cache location")
if(NOT NEO_DRIVER_VERSION)
set(NEO_DRIVER_VERSION 1.0)
endif()
# Put profiling enable flag into define # Put profiling enable flag into define
if(OCL_RUNTIME_PROFILING) if(OCL_RUNTIME_PROFILING)
add_definitions(-DOCL_RUNTIME_PROFILING=${OCL_RUNTIME_PROFILING}) add_definitions(-DOCL_RUNTIME_PROFILING=${OCL_RUNTIME_PROFILING})

View File

@ -17,7 +17,7 @@ components:
branch: infra branch: infra
clean_on_sync: true clean_on_sync: true
dest_dir: infra dest_dir: infra
revision: d41c5e24ce6b26cdf5d3ac0f7ddcbc899d15a3e5 revision: 7f97ae0f092f3729eca0485b31d782fc31c04ed0
type: git type: git
internal: internal:
branch: master branch: master

View File

@ -62,6 +62,18 @@ if(UNIX)
if(NOT DEFINED NEO_VERSION_BUILD) if(NOT DEFINED NEO_VERSION_BUILD)
set(NEO_VERSION_BUILD 0) set(NEO_VERSION_BUILD 0)
endif() endif()
else()
if(NOT DEFINED NEO_VERSION_MAJOR)
set(NEO_VERSION_MAJOR 1)
endif()
if(NOT DEFINED NEO_VERSION_MINOR)
set(NEO_VERSION_MINOR 0)
endif()
if(NOT DEFINED NEO_VERSION_BUILD)
set(NEO_VERSION_BUILD 0)
endif()
endif(UNIX)
set(NEO_DRIVER_VERSION "${NEO_VERSION_MAJOR}.${NEO_VERSION_MINOR}.${NEO_VERSION_BUILD}") set(NEO_DRIVER_VERSION "${NEO_VERSION_MAJOR}.${NEO_VERSION_MINOR}.${NEO_VERSION_BUILD}")
endif(UNIX)