Blame SOURCES/0001-CMake-Split-test-binary-exports-into-their-own-expor.patch

c8621d
From 9d496e978f59e153bb76e92229d5a524d92dee04 Mon Sep 17 00:00:00 2001
c8621d
From: Tom Stellard <tstellar@redhat.com>
c8621d
Date: Tue, 10 Sep 2019 13:33:48 -0700
c8621d
Subject: [PATCH] CMake: Split test binary exports into their own export file
c8621d
c8621d
---
c8621d
 llvm/cmake/modules/AddLLVM.cmake       | 7 ++++++-
c8621d
 llvm/cmake/modules/CMakeLists.txt      | 3 +++
c8621d
 llvm/cmake/modules/LLVMConfig.cmake.in | 1 +
c8621d
 3 files changed, 10 insertions(+), 1 deletion(-)
c8621d
c8621d
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
c8621d
index 200fc45..9eec7a7 100644
c8621d
--- a/llvm/cmake/modules/AddLLVM.cmake
c8621d
+++ b/llvm/cmake/modules/AddLLVM.cmake
c8621d
@@ -953,7 +953,12 @@ macro(add_llvm_utility name)
c8621d
       set(export_to_llvmexports)
c8621d
       if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
c8621d
           NOT LLVM_DISTRIBUTION_COMPONENTS)
c8621d
-        set(export_to_llvmexports EXPORT LLVMExports)
c8621d
+        if (${name} STREQUAL "not" OR ${name} STREQUAL "count" OR
c8621d
+            ${name} STREQUAL "yaml-bench" OR ${name} STREQUAL "lli-child-target")
c8621d
+          set(export_to_llvmexports EXPORT LLVMTestExports)
c8621d
+        else()
c8621d
+          set(export_to_llvmexports EXPORT LLVMExports)
c8621d
+        endif()
c8621d
         set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
c8621d
       endif()
c8621d
 
c8621d
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
c8621d
index dc982d2..c861f45 100644
c8621d
--- a/llvm/cmake/modules/CMakeLists.txt
c8621d
+++ b/llvm/cmake/modules/CMakeLists.txt
c8621d
@@ -106,6 +106,7 @@ set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
c8621d
 set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
c8621d
 set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
c8621d
 set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
c8621d
+set(LLVM_CONFIG_TEST_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMTestExports.cmake")
c8621d
 configure_file(
c8621d
   LLVMConfig.cmake.in
c8621d
   ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
c8621d
@@ -124,6 +125,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
c8621d
             COMPONENT cmake-exports)
c8621d
     install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
c8621d
             COMPONENT cmake-exports)
c8621d
+    install(EXPORT LLVMTestExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
c8621d
+            COMPONENT cmake-exports)
c8621d
   endif()
c8621d
 
c8621d
   install(FILES
c8621d
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
c8621d
index 6ef54a0..d81b09a 100644
c8621d
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
c8621d
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
c8621d
@@ -91,6 +91,7 @@ if(NOT TARGET LLVMSupport)
c8621d
   @llvm_config_include_buildtree_only_exports@
c8621d
 
c8621d
   include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
c8621d
+  include("@LLVM_CONFIG_TEST_EXPORTS_FILE@" OPTIONAL)
c8621d
 endif()
c8621d
 
c8621d
 # By creating intrinsics_gen here, subprojects that depend on LLVM's
c8621d
-- 
c8621d
1.8.3.1
c8621d