r197688 - [CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.
NAKAMURA Takumi
geek4civic at gmail.com
Thu Dec 19 08:05:44 PST 2013
Author: chapuni
Date: Thu Dec 19 10:05:44 2013
New Revision: 197688
URL: http://llvm.org/viewvc/llvm-project?rev=197688&view=rev
Log:
[CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/test/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=197688&r1=197687&r2=197688&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Dec 19 10:05:44 2013
@@ -390,8 +390,14 @@ option(CLANG_INCLUDE_TESTS
${LLVM_INCLUDE_TESTS})
if( CLANG_INCLUDE_TESTS )
+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
+ add_subdirectory(unittests)
+ list(APPEND CLANG_TEST_DEPS ClangUnitTests)
+ list(APPEND CLANG_TEST_PARAMS
+ clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
+ )
+ endif()
add_subdirectory(test)
- add_subdirectory(unittests)
endif()
option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."
Modified: cfe/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=197688&r1=197687&r2=197688&view=diff
==============================================================================
--- cfe/trunk/test/CMakeLists.txt (original)
+++ cfe/trunk/test/CMakeLists.txt Thu Dec 19 10:05:44 2013
@@ -38,13 +38,6 @@ set(CLANG_TEST_PARAMS
clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
)
-if(CLANG_INCLUDE_TESTS)
- list(APPEND CLANG_TEST_DEPS ClangUnitTests)
- list(APPEND CLANG_TEST_PARAMS
- clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
- )
-endif()
-
if( NOT CLANG_BUILT_STANDALONE )
list(APPEND CLANG_TEST_DEPS
llvm-config
More information about the cfe-commits
mailing list