diff --git a/llvm/examples/IRTransforms/CMakeLists.txt b/llvm/examples/IRTransforms/CMakeLists.txt --- a/llvm/examples/IRTransforms/CMakeLists.txt +++ b/llvm/examples/IRTransforms/CMakeLists.txt @@ -4,6 +4,12 @@ Support ) +# Do not include examples in "all" target. Also excludes it from the install +# list. +if (NOT LLVM_BUILD_EXAMPLES) + set(EXCLUDE_FROM_ALL ON) +endif() + add_llvm_library(ExampleIRTransforms InitializePasses.cpp SimplifyCFG.cpp