llvm/tools/opt-remarks/CMakeLists.txt
Francis Visoiu Mistrih 040e4d75d3 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346127 91177308-0d34-0410-b5e6-96231b3b80d8
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()