Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit fba2108

Browse files
committed
[cmake] Move the including of utils/unittests under LLVM_INCLUDE_UTILS instead of LLVM_INCLUDE_TESTS.
This does not change anything by default since LLVM_INCLUDE_UTILS is already set to TRUE by default. In addition, since LLVM_INCLUDE_TESTS => LLVM_INCLUDE_UTILS, the only way that this can cause changes is in the case where LLVM_INCLUDE_UTILS is set to TRUE, but LLVM_INCLUDE_TESTS is FALSE. In that case, building gtest is not a huge cost. The reason to do this is that without this change, one can not turn off LLVM_INCLUDE_TESTS in downstream projects that also use gtest for unittests. It also just in general makes more sense since LLVM_INCLUDE_UTILS gates FileCheck and other utilities that are along the lines of gtest. Additionally from talking with chandlerc, this was not done for any specific reason, so there is no reason not to do it and lots of benefit to doing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276342 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit f517b9f)
1 parent dec022e commit fba2108

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,17 +656,14 @@ if( LLVM_INCLUDE_UTILS )
656656
add_subdirectory(utils/not)
657657
add_subdirectory(utils/llvm-lit)
658658
add_subdirectory(utils/yaml-bench)
659+
add_subdirectory(utils/unittest)
659660
else()
660661
if ( LLVM_INCLUDE_TESTS )
661662
message(FATAL_ERROR "Including tests when not building utils will not work.
662663
Either set LLVM_INCLUDE_UTILS to On, or set LLVM_INCLDE_TESTS to Off.")
663664
endif()
664665
endif()
665666

666-
if(LLVM_INCLUDE_TESTS)
667-
add_subdirectory(utils/unittest)
668-
endif()
669-
670667
foreach( binding ${LLVM_BINDINGS_LIST} )
671668
if( EXISTS "${LLVM_MAIN_SRC_DIR}/bindings/${binding}/CMakeLists.txt" )
672669
add_subdirectory(bindings/${binding})

0 commit comments

Comments
 (0)