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

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