@@ -368,11 +368,14 @@ ExternalProject_Add( tplgen
368
368
INSTALL_COMMAND ""
369
369
)
370
370
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 ()
376
379
377
380
message (STATUS "OCL_VERSION = ${OCL_VERSION} " )
378
381
if ( OCL_VERSION STREQUAL "2.0" )
@@ -407,7 +410,10 @@ else()
407
410
endif ()
408
411
409
412
#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
+
411
417
set ( bingenBinaryDir "" )
412
418
if ( CMAKE_COMPILER_IS_GNUCXX )
413
419
set ( bingenBinaryDir "${binary_dir} /staging" )
@@ -438,6 +444,7 @@ add_custom_command(TARGET GEN_CLBIN
438
444
)
439
445
add_dependencies ( GEN_CLBIN bingen )
440
446
endif ()
447
+ endif ()#if(OCL_OFFLINE_BUILD_TAHITI_KERNEL OR OCL_OFFLINE_BUILD_HAWAII_KERNEL OR OCL_OFFLINE_BUILD_BONAIRE_KERNEL)
441
448
442
449
ExternalProject_Get_Property ( tplgen binary_dir )
443
450
0 commit comments