mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 01:29:52 +00:00
[cmake] Put check from D110016 behind (default-on) flag
See discussion on https://reviews.llvm.org/D110016 for details.
This commit is contained in:
parent
a95ba81073
commit
55f0b33708
@ -71,11 +71,15 @@ set(LLVM_EXTRA_PROJECTS "flang")
|
||||
set(LLVM_KNOWN_PROJECTS "${LLVM_ALL_PROJECTS};${LLVM_EXTRA_PROJECTS}")
|
||||
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
|
||||
"Semicolon-separated list of projects to build (${LLVM_KNOWN_PROJECTS}), or \"all\".")
|
||||
foreach(proj ${LLVM_ENABLE_PROJECTS})
|
||||
if (NOT proj STREQUAL "all" AND NOT proj STREQUAL "llvm" AND NOT "${proj}" IN_LIST LLVM_KNOWN_PROJECTS)
|
||||
MESSAGE(FATAL_ERROR "${proj} isn't a known project: ${LLVM_KNOWN_PROJECTS}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
option(LLVM_CHECK_ENABLED_PROJECTS "Whether to check LLVM_ENABLE_PROJECTS" ON)
|
||||
if (LLVM_CHECK_ENABLED_PROJECTS)
|
||||
foreach(proj ${LLVM_ENABLE_PROJECTS})
|
||||
if (NOT proj STREQUAL "all" AND NOT proj STREQUAL "llvm" AND NOT "${proj}" IN_LIST LLVM_KNOWN_PROJECTS)
|
||||
MESSAGE(FATAL_ERROR "${proj} isn't a known project: ${LLVM_KNOWN_PROJECTS}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
|
||||
set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS})
|
||||
|
Loading…
Reference in New Issue
Block a user