Fixes file extension for loadable modules on OS X.
authorOscar Fuentes <ofv@wanadoo.es>
Wed, 22 Dec 2010 08:30:17 +0000 (08:30 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Wed, 22 Dec 2010 08:30:17 +0000 (08:30 +0000)
Patch by Wesley Peck!

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

cmake/modules/AddLLVM.cmake

index d03b3e04b0e9243c0846436bacda01a83f37df3d..fdf1df0c67d1e2aaeb9440604514601a32151c6c 100755 (executable)
@@ -36,7 +36,13 @@ ${name} ignored.")
     add_custom_target(${name})
   else()
     llvm_process_sources( ALL_FILES ${ARGN} )
-    add_library( ${name} MODULE ${ALL_FILES} )
+    if (MODULE)
+      set(libkind MODULE)
+    else()
+      set(libkind SHARED)
+    endif()
+
+    add_library( ${name} ${libkind} ${ALL_FILES} )
     set_target_properties( ${name} PROPERTIES PREFIX "" )
 
     if (APPLE)