From: Peter Collingbourne Date: Thu, 26 Jan 2012 03:33:40 +0000 (+0000) Subject: Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e26198c0980027f0975448709063b56f667ab506;p=clang Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 019168f5a9..25be7e11e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 317bc81637..7f4253af2e 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,2 +1,6 @@ +if(NOT CLANG_BUILD_EXAMPLES) + set(EXCLUDE_FROM_ALL ON) +endif() + add_subdirectory(clang-interpreter) add_subdirectory(PrintFunctionNames)