[llvm] [CMake] Don't pass -DBUILD_EXAMPLES to the build (PR #102838)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 17:40:02 PDT 2024


https://github.com/s-barannikov created https://github.com/llvm/llvm-project/pull/102838

The only use in `opt.cpp` was removed in d291f1fd094538af705541045c0d9c3ceb85e71d.


>From 6f92731f069eb5e2d82c76e4e95c5881d3f99c7a Mon Sep 17 00:00:00 2001
From: Sergei Barannikov <barannikov88 at gmail.com>
Date: Mon, 12 Aug 2024 03:37:49 +0300
Subject: [PATCH] [CMake] Don't pass -DBUILD_EXAMPLES to the build

The only use was removed in d291f1fd094538af705541045c0d9c3ceb85e71d.
---
 llvm/CMakeLists.txt | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 51f99cb6962575..d681b1ccab6299 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -796,10 +796,6 @@ option(LLVM_BUILD_EXAMPLES
   "Build the LLVM example programs. If OFF, just generate build targets." OFF)
 option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON)
 
-if(LLVM_BUILD_EXAMPLES)
-  add_compile_definitions(BUILD_EXAMPLES)
-endif(LLVM_BUILD_EXAMPLES)
-
 option(LLVM_BUILD_TESTS
   "Build LLVM unit tests. If OFF, just generate build targets." OFF)
 option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)



More information about the llvm-commits mailing list