diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-12 14:15:06 -0800 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-12 14:17:19 -0800 |
| commit | a247bd1f274e49ea83b2ad39c6ff062753e9e779 (patch) | |
| tree | 0ee8e03bc576603aa298af4c0b40a7cae665683e /lldb | |
| parent | 4ae74cc99fb9d9c1f47cc7c5cd4c515bd53e2a19 (diff) | |
| download | bcm5719-llvm-a247bd1f274e49ea83b2ad39c6ff062753e9e779.tar.gz bcm5719-llvm-a247bd1f274e49ea83b2ad39c6ff062753e9e779.zip | |
[LLDB] Fix/silence CMake developer warning for LLDB framework.
This fixes the following warning for developers:
Target 'liblldb' was changed to a FRAMEWORK sometime after install(). This
may result in the wrong install DESTINATION. Set the FRAMEWORK property
earlier.
The solution is to pass the FRAMEWORK flag to add_lldb_library and set
the target property before install(). For now liblldb is the only
customer.
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/cmake/modules/AddLLDB.cmake | 10 | ||||
| -rw-r--r-- | lldb/source/API/CMakeLists.txt | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake index 6f05be38490..e094092498a 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -35,7 +35,7 @@ function(add_lldb_library name) # only supported parameters to this macro are the optional # MODULE;SHARED;STATIC library type and source files cmake_parse_arguments(PARAM - "MODULE;SHARED;STATIC;OBJECT;PLUGIN" + "MODULE;SHARED;STATIC;OBJECT;PLUGIN;FRAMEWORK" "INSTALL_PREFIX;ENTITLEMENTS" "EXTRA_CXXFLAGS;DEPENDS;LINK_LIBS;LINK_COMPONENTS;CLANG_LIBS" ${ARGN}) @@ -99,6 +99,14 @@ function(add_lldb_library name) endif() endif() + # A target cannot be changed to a FRAMEWORK after calling install() because + # this may result in the wrong install DESTINATION. The FRAMEWORK property + # must be set earlier. + if(PARAM_FRAMEWORK) + message(WARNING "{name} is now a FRAMEWORK") + set_target_properties(liblldb PROPERTIES FRAMEWORK ON) + endif() + if(PARAM_SHARED) set(install_dest lib${LLVM_LIBDIR_SUFFIX}) if(PARAM_INSTALL_PREFIX) diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt index f06ed1fcdd0..488dae3cae3 100644 --- a/lldb/source/API/CMakeLists.txt +++ b/lldb/source/API/CMakeLists.txt @@ -13,7 +13,7 @@ if(LLDB_BUILD_FRAMEWORK) set(option_install_prefix INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_DIR}) endif() -add_lldb_library(liblldb SHARED +add_lldb_library(liblldb SHARED FRAMEWORK SBAddress.cpp SBAttachInfo.cpp SBBlock.cpp |

