forked from OSchip/llvm-project
Cmake: allow using LLVM_EXTERNAL_PROJECTS with LLVM_ENABLE_PROJECTS
The current code iterates over the combination of LLVM_EXTERNAL_PROJECTS and LLVM_ENABLE_PROJECTS, but then disables projects that are only in the former. If a project is in LLVM_EXTERNAL_PROJECTS, it should be enabled. See also llvm-commits thread on r354060. Differential revision: https://reviews.llvm.org/D62289 llvm-svn: 361751
This commit is contained in:
parent
6e379e2b68
commit
0f40585d2d
|
@ -145,6 +145,9 @@ if (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL "")
|
|||
message(FATAL_ERROR "LLVM_ENABLE_PROJECTS requests ${proj} but directory not found: ${PROJ_DIR}")
|
||||
endif()
|
||||
set(LLVM_EXTERNAL_${upper_proj}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${proj}" CACHE STRING "")
|
||||
elseif ("${proj}" IN_LIST LLVM_EXTERNAL_PROJECTS)
|
||||
message(STATUS "${proj} project is enabled")
|
||||
set(SHOULD_ENABLE_PROJECT TRUE)
|
||||
else()
|
||||
message(STATUS "${proj} project is disabled")
|
||||
set(SHOULD_ENABLE_PROJECT FALSE)
|
||||
|
|
Loading…
Reference in New Issue