]> granicus.if.org Git - llvm/commitdiff
[CMake] Fixing errors in r361513
authorChris Bieneman <chris.bieneman@me.com>
Thu, 23 May 2019 18:51:52 +0000 (18:51 +0000)
committerChris Bieneman <chris.bieneman@me.com>
Thu, 23 May 2019 18:51:52 +0000 (18:51 +0000)
Summary:
I somehow messed this up. libcxx appends the subdirectories itself, so we don't need to add them here.

Also, r361513 broke the "projects" build of libcxx because it always included the extra targets.

Reviewers: lebedev.ri, mclow.lists

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361535 91177308-0d34-0410-b5e6-96231b3b80d8

runtimes/CMakeLists.txt

index b9436025f5cd12656b926958bd2ed48cc2805e27..9016efe600e79cc06da552f1b5987b9aa89925ef 100644 (file)
@@ -209,7 +209,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
 
 else() # if this is included from LLVM's CMake
   include(LLVMExternalProjectUtils)
-  if (LLVM_EXTERNAL_LIBCXX_SOURCE_DIR)
+  if (LLVM_EXTERNAL_LIBCXX_SOURCE_DIR AND "libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)
     set(LIBCXX_HEADER_DIR ${LLVM_INCLUDE_DIR}/c++/v1/)
     set(CXX_HEADER_TARGET runtime-libcxx-headers)
     add_subdirectory(${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}/include ${CXX_HEADER_TARGET})