From b1adf0890a1c19b2fd32a525c7c99e9db6da493f Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Wed, 8 Jan 2014 11:10:24 +0000 Subject: CMake: Provide LLVM_PLUGIN_EXT definition This is needed to support the addition of tests for clang loadable plugins. In clang, plugins are built as modules (bundles on OS X) rather than dynamic libraries (dylib) so the build system needs to inform lit of the actual file extension in use, typically '.so' on Unix and '.dll' on Windows. (LLVM itself should probably switch to this scheme to fix PR14903 once and for all.) No change in build output or functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198746 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/AddLLVM.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake/modules/AddLLVM.cmake') diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 83422fb18f..de00ab46ae 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -215,6 +215,10 @@ ${name} ignored.") LINK_FLAGS " -Wl,-flat_namespace -Wl,-undefined -Wl,suppress") endif() + if (MODULE) + set_property(TARGET ${name} PROPERTY SUFFIX ${LLVM_PLUGIN_EXT}) + endif () + if( EXCLUDE_FROM_ALL ) set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON) else() -- cgit v1.2.3