aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-02-26 09:43:27 +0000
committerAlexey Samsonov <samsonov@google.com>2013-02-26 09:43:27 +0000
commit863fb3574468ef9fdc9f5ea3fa3d62671979ccf1 (patch)
treecac1cb655ac6ad79dedc7253d3c6d1ef962d47f3
parent85aee96c62a99069ea60cb47d5ae69150ca44746 (diff)
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176080 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14fe46fe6e..fc1fed4988 100644
--- a/CMakeLists.txt
+++ b/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()