[llvm] r198182 - [cmake] In add_llvm_loadable_module, don't clobber existing LINK_FLAGS on OS X.
Nico Weber
nicolasweber at gmx.de
Sun Dec 29 15:04:49 PST 2013
Author: nico
Date: Sun Dec 29 17:04:48 2013
New Revision: 198182
URL: http://llvm.org/viewvc/llvm-project?rev=198182&view=rev
Log:
[cmake] In add_llvm_loadable_module, don't clobber existing LINK_FLAGS on OS X.
Also add leading spaces to the LINK_FLAGS setters, since that's what the cmake
folks recommend: http://www.cmake.org/pipermail/cmake/2012-October/052399.html
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=198182&r1=198181&r2=198182&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Sun Dec 29 17:04:48 2013
@@ -26,7 +26,7 @@ function(add_llvm_symbol_exports target_
VERBATIM
COMMENT "Creating export file for ${target_name}")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
- LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+ LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
else()
set(native_export_file "${target_name}.def")
@@ -46,10 +46,10 @@ function(add_llvm_symbol_exports target_
COMMENT "Creating export file for ${target_name}")
if(CYGWIN OR MINGW)
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
- LINK_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+ LINK_FLAGS " ${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
else()
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
- LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+ LINK_FLAGS " /DEF:${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
endif()
endif()
@@ -147,8 +147,8 @@ ${name} ignored.")
if (APPLE)
# Darwin-specific linker flags for loadable modules.
- set_target_properties(${name} PROPERTIES
- LINK_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
+ set_property(TARGET ${name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
endif()
if( EXCLUDE_FROM_ALL )
More information about the llvm-commits
mailing list