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

Commit f517b9f

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
1 parent 32995b5 commit f517b9f

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
@@ -722,6 +722,7 @@ if( LLVM_INCLUDE_UTILS )
722722
add_subdirectory(utils/not)
723723
add_subdirectory(utils/llvm-lit)
724724
add_subdirectory(utils/yaml-bench)
725+
add_subdirectory(utils/unittest)
725726
else()
726727
if ( LLVM_INCLUDE_TESTS )
727728
message(FATAL_ERROR "Including tests when not building utils will not work.
@@ -734,10 +735,6 @@ if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
734735
add_subdirectory(utils/LLVMVisualizers)
735736
endif()
736737

737-
if(LLVM_INCLUDE_TESTS)
738-
add_subdirectory(utils/unittest)
739-
endif()
740-
741738
foreach( binding ${LLVM_BINDINGS_LIST} )
742739
if( EXISTS "${LLVM_MAIN_SRC_DIR}/bindings/${binding}/CMakeLists.txt" )
743740
add_subdirectory(bindings/${binding})

0 commit comments

Comments
 (0)