@@ -368,11 +368,14 @@ ExternalProject_Add( tplgen
368368 INSTALL_COMMAND ""
369369)
370370
371- ExternalProject_Add( bingen
372- URL "${CMAKE_SOURCE_DIR} /library/tools/bingen"
373- CMAKE_ARGS -DOPENCL_LIBRARIES=${OPENCL_LIBRARIES} -DOPENCL_INCLUDE_DIRS=${OPENCL_INCLUDE_DIRS}
374- INSTALL_COMMAND ""
375- )
371+ # if offline compilation is not chosen, bingen should not be built
372+ if (OCL_OFFLINE_BUILD_TAHITI_KERNEL OR OCL_OFFLINE_BUILD_HAWAII_KERNEL OR OCL_OFFLINE_BUILD_BONAIRE_KERNEL)
373+ ExternalProject_Add( bingen
374+ URL "${CMAKE_SOURCE_DIR} /library/tools/bingen"
375+ CMAKE_ARGS -DOPENCL_LIBRARIES=${OPENCL_LIBRARIES} -DOPENCL_INCLUDE_DIRS=${OPENCL_INCLUDE_DIRS}
376+ INSTALL_COMMAND ""
377+ )
378+ endif ()
376379
377380message (STATUS "OCL_VERSION = ${OCL_VERSION} " )
378381if ( OCL_VERSION STREQUAL "2.0" )
@@ -407,7 +410,10 @@ else()
407410endif ()
408411
409412#set( bingenBinaryDir "${CMAKE_BINARY_DIR}/library/tools/bingen/staging" )
410- ExternalProject_Get_Property( bingen binary_dir )
413+ # if offline compilation is not chosen, bingen should not be built
414+ if (OCL_OFFLINE_BUILD_TAHITI_KERNEL OR OCL_OFFLINE_BUILD_HAWAII_KERNEL OR OCL_OFFLINE_BUILD_BONAIRE_KERNEL)
415+ ExternalProject_Get_Property( bingen binary_dir )
416+
411417set ( bingenBinaryDir "" )
412418if ( CMAKE_COMPILER_IS_GNUCXX )
413419 set ( bingenBinaryDir "${binary_dir} /staging" )
@@ -438,6 +444,7 @@ add_custom_command(TARGET GEN_CLBIN
438444 )
439445add_dependencies ( GEN_CLBIN bingen )
440446endif ()
447+ endif ()#if(OCL_OFFLINE_BUILD_TAHITI_KERNEL OR OCL_OFFLINE_BUILD_HAWAII_KERNEL OR OCL_OFFLINE_BUILD_BONAIRE_KERNEL)
441448
442449ExternalProject_Get_Property( tplgen binary_dir )
443450
0 commit comments