]> granicus.if.org Git - clang/commitdiff
Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 26 Jan 2012 03:33:40 +0000 (03:33 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 26 Jan 2012 03:33:40 +0000 (03:33 +0000)
by default, rather than whether they may be built at all.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149037 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
examples/CMakeLists.txt

index 019168f5a915587697dd1d5b3e71a57459c9bae4..25be7e11e8cd11ad82c4dad1436ad7c95f636b1b 100644 (file)
@@ -246,10 +246,8 @@ mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
 
 add_subdirectory(utils/TableGen)
 
-option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF)
-if(CLANG_BUILD_EXAMPLES)
-  add_subdirectory(examples)
-endif ()
+option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF)
+add_subdirectory(examples)
 
 add_subdirectory(include)
 add_subdirectory(lib)
index 317bc81637d8cf6d94c4e316cb3ece3d117a9b10..7f4253af2eb270bfe0f2fbbfe74e3e316b4bdb87 100644 (file)
@@ -1,2 +1,6 @@
+if(NOT CLANG_BUILD_EXAMPLES)
+  set(EXCLUDE_FROM_ALL ON)
+endif()
+
 add_subdirectory(clang-interpreter)
 add_subdirectory(PrintFunctionNames)