[PATCH] D36540: [CMake] Add install target for LLVMFuzzer
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 16:39:42 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310897: [CMake] Add install target for LLVMFuzzer (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D36540?vs=110451&id=111099#toc
Repository:
rL LLVM
https://reviews.llvm.org/D36540
Files:
llvm/trunk/lib/Fuzzer/CMakeLists.txt
Index: llvm/trunk/lib/Fuzzer/CMakeLists.txt
===================================================================
--- llvm/trunk/lib/Fuzzer/CMakeLists.txt
+++ llvm/trunk/lib/Fuzzer/CMakeLists.txt
@@ -63,6 +63,27 @@
$<TARGET_OBJECTS:LLVMFuzzerNoMainObjects>
)
target_link_libraries(LLVMFuzzer ${LLVM_PTHREAD_LIB})
+
+ if(LLVMFuzzer IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ NOT LLVM_DISTRIBUTION_COMPONENTS)
+ set(export_to_llvmexports EXPORT LLVMExports)
+ set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
+ endif()
+
+ install(TARGETS LLVMFuzzer
+ ${export_to_llvmexports}
+ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ COMPONENT LLVMFuzzer)
+
+ if (NOT CMAKE_CONFIGURATION_TYPES)
+ add_custom_target(install-LLVMFuzzer
+ DEPENDS LLVMFuzzer
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=LLVMFuzzer
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ endif()
+
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS LLVMFuzzer)
endif()
if (MSVC)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36540.111099.patch
Type: text/x-patch
Size: 1122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170814/2f663a09/attachment.bin>
More information about the llvm-commits
mailing list