From 61c9b97d7b81cc2c013b423bf1763a92b14fcae3 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 26 Mar 2019 03:48:25 +0000 Subject: [PATCH] [clangd][xpc][cmake] Respect explicit value of CLANGD_BUILD_XPC We shouldn't prevent user from disabling XPC framework build on Darwin. However, by keeping it on by default our CI systems also test it by default on macOS. Based on user request: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061778.html Differential Revision: https://reviews.llvm.org/D59808 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@356974 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66ebeaeeaa..514b17fb3c 100644 --- a/tools/extra/CMakeLists.txt +++ b/tools/extra/CMakeLists.txt @@ -1,6 +1,13 @@ -option(CLANGD_BUILD_XPC "Build XPC Support For Clangd." OFF) -if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CLANGD_BUILD_XPC ON CACHE BOOL "" FORCE) +if (NOT DEFINED CLANGD_BUILD_XPC) + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(CLANGD_BUILD_XPC_DEFAULT ON) + else () + set(CLANGD_BUILD_XPC_DEFAULT OFF) + endif () + + set(CLANGD_BUILD_XPC ${CLANGD_BUILD_XPC_DEFAULT} CACHE BOOL "Build XPC Support For Clangd." FORCE) + + unset(CLANGD_BUILD_XPC_DEFAULT) endif () add_subdirectory(clang-apply-replacements)