diff --git a/hpvm/test/benchmarks/hpvm-cava/CMakeLists.txt b/hpvm/test/benchmarks/hpvm-cava/CMakeLists.txt index 57e3bd3f33c580c9244634608402009804dbc38e..d89a01a05669a0c49fecf1ccbd25029fce14143b 100644 --- a/hpvm/test/benchmarks/hpvm-cava/CMakeLists.txt +++ b/hpvm/test/benchmarks/hpvm-cava/CMakeLists.txt @@ -15,8 +15,10 @@ add_hpvm_benchmark( src/main.c "${util_bitcodes}" ) -set(all_flags_gpu ${compiler_flags} "-DDEVICE=GPU_TARGET" "--opencl" "-lpthread") -add_hpvm_benchmark( - "hpvm_cava_gpu" "hpvm-cava-gpu" "${all_flags_gpu}" "c" - src/main.c "${util_bitcodes}" -) +if(HPVM_USE_OPENCL) + set(all_flags_gpu ${compiler_flags} "-DDEVICE=GPU_TARGET" "--opencl" "-lpthread") + add_hpvm_benchmark( + "hpvm_cava_gpu" "hpvm-cava-gpu" "${all_flags_gpu}" "c" + src/main.c "${util_bitcodes}" + ) +endif() diff --git a/hpvm/test/benchmarks/pipeline/CMakeLists.txt b/hpvm/test/benchmarks/pipeline/CMakeLists.txt index 84cb2d85afb4929b2f26854844808dd2493da1e3..db2b8eeab1647f4ac72c05127877ecec1f949c90 100644 --- a/hpvm/test/benchmarks/pipeline/CMakeLists.txt +++ b/hpvm/test/benchmarks/pipeline/CMakeLists.txt @@ -7,7 +7,9 @@ if(${OpenCV_FOUND}) -lpthread ) add_hpvm_benchmark("pipeline_cpu" "pipeline-cpu" "${all_flags}" "c++" src/main.cc "") - add_hpvm_benchmark("pipeline_gpu" "pipeline-gpu" "${all_flags};--opencl" "c++" src/main.cc "") + if(HPVM_USE_OPENCL) + add_hpvm_benchmark("pipeline_gpu" "pipeline-gpu" "${all_flags};--opencl" "c++" src/main.cc "") + endif() else() message(WARNING "opencv-2 not found; not compiling HPVM benchmark 'pipeline'.") endif()