aboutsummaryrefslogtreecommitdiff
path: root/llvm/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/cmake/modules/AddLLVM.cmake')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 54a54db..e046e37 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -932,7 +932,7 @@ endfunction()
macro(add_llvm_library name)
cmake_parse_arguments(ARG
- "SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN"
+ "SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN;NO_EXPORT"
""
""
${ARGN})
@@ -967,7 +967,11 @@ macro(add_llvm_library name)
set(umbrella)
endif()
- get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+ if(ARG_NO_EXPORT)
+ set(export_to_llvmexports)
+ else()
+ get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+ endif()
install(TARGETS ${name}
${export_to_llvmexports}
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
@@ -980,7 +984,9 @@ macro(add_llvm_library name)
COMPONENT ${name})
endif()
endif()
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ if(NOT ARG_NO_EXPORT)
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endif()
endif()
get_subproject_title(subproject_title)