r365902 - cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros
Tom Stellard via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 12 07:40:18 PDT 2019
Author: tstellar
Date: Fri Jul 12 07:40:18 2019
New Revision: 365902
URL: http://llvm.org/viewvc/llvm-project?rev=365902&view=rev
Log:
cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros
Summary:
This will simplify the macros by allowing us to remove the hard-coded
list of libraries that should be installed when
LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.
Reviewers: beanz, smeenai
Reviewed By: beanz
Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D64580
Modified:
cfe/trunk/cmake/modules/AddClang.cmake
cfe/trunk/tools/libclang/CMakeLists.txt
Modified: cfe/trunk/cmake/modules/AddClang.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/modules/AddClang.cmake?rev=365902&r1=365901&r2=365902&view=diff
==============================================================================
--- cfe/trunk/cmake/modules/AddClang.cmake (original)
+++ cfe/trunk/cmake/modules/AddClang.cmake Fri Jul 12 07:40:18 2019
@@ -44,7 +44,7 @@ endmacro()
macro(add_clang_library name)
cmake_parse_arguments(ARG
- "SHARED"
+ "SHARED;INSTALL_WITH_TOOLCHAIN"
""
"ADDITIONAL_HEADERS"
${ARGN})
@@ -97,7 +97,7 @@ macro(add_clang_library name)
if(TARGET ${name})
target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
- if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
set(export_to_clangtargets)
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
"clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=365902&r1=365901&r2=365902&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Fri Jul 12 07:40:18 2019
@@ -94,7 +94,7 @@ if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHE
remove_definitions("-D_XOPEN_SOURCE=700")
endif()
-add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC}
+add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} INSTALL_WITH_TOOLCHAIN
OUTPUT_NAME ${output_name}
${SOURCES}
DEPENDS clang-resource-headers
More information about the cfe-commits
mailing list