From 46c0bc233bd7fda8eb4a9bf249bfc7bb45227ad2 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 26 Feb 2013 09:43:27 +0000 Subject: [PATCH] Define CMake option CLANG_INCLUDE_TESTS *before* traversing into tests/ subdirectory. Otherwise, while configuring the build tree for the first time, Clang unit tests could avoid being added to 'check-clang' command, and thus avoid being built and executed. llvm-svn: 176080 --- clang/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 14fe46fe6e1e..fc1fed4988c6 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -276,13 +276,13 @@ add_subdirectory(runtime) option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF) add_subdirectory(examples) -# TODO: docs. -add_subdirectory(test) - option(CLANG_INCLUDE_TESTS "Generate build targets for the Clang unit tests." ${LLVM_INCLUDE_TESTS}) +# TODO: docs. +add_subdirectory(test) + if( CLANG_INCLUDE_TESTS ) add_subdirectory(unittests) endif()