1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/tools/opt-remarks/CMakeLists.txt
Francis Visoiu Mistrih 711367c6c9 [CMake] Expose opt-remark tooling through libOptRemarks.dylib
* Create an install target for it
* Add it under tools/opt-remarks
* Add an export file for the dylib
* Install the llvm-c/OptRemarks.h header
* Add an API to query its version

rdar://45458839

llvm-svn: 346127
2018-11-05 11:57:44 +00:00

23 lines
594 B
CMake

set(LLVM_LINK_COMPONENTS
OptRemarks
)
set(SOURCES
liboptremarks.cpp
)
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/OptRemarks.exports)
add_llvm_library(OptRemarks SHARED ${SOURCES})
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/OptRemarks.h
DESTINATION include/llvm-c
COMPONENT OptRemarks)
if (APPLE)
set(OPTREMARKS_VERSION ${LLVM_VERSION_MAJOR})
set_property(TARGET OptRemarks APPEND_STRING PROPERTY
LINK_FLAGS
" -compatibility_version 1 -current_version ${OPTREMARKS_VERSION}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
endif()