[PATCH] D61831: [cmake] Do not generate benchmark targets by default

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 11 19:15:40 PDT 2019


hintonda created this revision.
hintonda added a reviewer: kbobyrev.
Herald added a subscriber: mgorny.
Herald added a project: LLVM.

Since the benchmark subproject doesn't depend on llvm,
there's not reason to generate its targets by default, i.e., there are
no dependencies and changes to llvm can't break it.

This change sets the default value for LLVM_INCLUDE_BENCHMARKS =
LLVM_BUILD_BENCHMARKS so that the targets are only generated by
default when they are actually being built.

Users can still include the targets by passing
LLVM_INCLUDE_BENCHMARKS=ON from the command line.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61831

Files:
  llvm/CMakeLists.txt


Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -566,7 +566,8 @@
 
 option(LLVM_BUILD_BENCHMARKS "Add LLVM benchmark targets to the list of default
 targets. If OFF, benchmarks still could be built using Benchmarks target." OFF)
-option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON)
+option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built."
+	LLVM_BUILD_BENCHMARKS)
 
 option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
 option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61831.199161.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190512/8be60538/attachment.bin>


More information about the llvm-commits mailing list