CMake: Only include LLVM example executables in the build if requested by the user
authorDouglas Gregor <dgregor@apple.com>
Tue, 16 Jun 2009 22:25:45 +0000 (22:25 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 16 Jun 2009 22:25:45 +0000 (22:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73566 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index de3e159476230fcb260c008ad47ddb14e896a2e9..543ee7f8807984ccde65a3e9445980c6e9a865fd 100644 (file)
@@ -287,7 +287,10 @@ add_subdirectory(lib/Archive)
 add_subdirectory(projects)
 add_subdirectory(tools)
 
-add_subdirectory(examples)
+option(LLVM_EXAMPLES "Build LLVM example programs." OFF)
+if (LLVM_EXAMPLES)
+  add_subdirectory(examples)
+endif ()
 
 install(DIRECTORY include
   DESTINATION .