From: Chris Bieneman Date: Tue, 21 Jul 2015 00:39:53 +0000 (+0000) Subject: [CMake] Fixing a problem with external projects that aren't getting enabled properly. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2794e0c7cb70b2c7e6e44e579bbc91971726d995;p=oota-llvm.git [CMake] Fixing a problem with external projects that aren't getting enabled properly. This should address PR 24194, and some builedbot failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242746 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index ebd17a0cf85..6c21a46b97d 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -694,6 +694,10 @@ macro(add_llvm_external_project name) set(add_llvm_external_dir ${name}) endif() canonicalize_tool_name(${name} nameUPPER) + if(NOT DEFINED LLVM_TOOL_${projectName}_BUILD) + option(LLVM_TOOL_${name}_BUILD + "Whether to build ${name} as part of LLVM" On) + endif() if (LLVM_TOOL_${nameUPPER}_BUILD) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}/CMakeLists.txt) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir} ${add_llvm_external_dir})