[llvm] 55f0b33 - [cmake] Put check from D110016 behind (default-on) flag
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 20 12:09:12 PDT 2021
Author: Nico Weber
Date: 2021-09-20T15:09:05-04:00
New Revision: 55f0b337087136554122f942fea951a357bc4a49
URL: https://github.com/llvm/llvm-project/commit/55f0b337087136554122f942fea951a357bc4a49
DIFF: https://github.com/llvm/llvm-project/commit/55f0b337087136554122f942fea951a357bc4a49.diff
LOG: [cmake] Put check from D110016 behind (default-on) flag
See discussion on https://reviews.llvm.org/D110016 for details.
Added:
Modified:
llvm/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 850728029ebe..cdf62cb54727 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -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})
More information about the llvm-commits
mailing list