llvm-project/clang-tools-extra/clang-apply-replacements/CMakeLists.txt

21 lines
304 B
CMake
Raw Normal View History

set(LLVM_LINK_COMPONENTS
Support
)
add_clang_library(clangApplyReplacements
lib/Tooling/ApplyReplacements.cpp
LINK_LIBS
clangAST
clangBasic
clangRewrite
clangToolingCore
[clang-apply-replacements] Don't forget to link to clangToolingRefactor Fixes build: [1/3] Linking CXX shared library lib/libclangApplyReplacements.so.7svn FAILED: lib/libclangApplyReplacements.so.7svn <...> /usr/local/bin/ld.lld: error: undefined symbol: clang::tooling::AtomicChange::replace(clang::SourceManager const&, clang::SourceLocation, unsigned int, llvm::StringRef) >>> referenced by ApplyReplacements.cpp >>> tools/clang/tools/extra/clang-apply-replacements/CMakeFiles/clangApplyReplacements.dir/lib/Tooling/ApplyReplacements.cpp.o:(clang::replace::mergeAndDeduplicate(std::vector<clang::tooling::TranslationUnitReplacements, std::allocator<clang::tooling::TranslationUnitReplacements> > const&, std::vector<clang::tooling::TranslationUnitDiagnostics, std::allocator<clang::tooling::TranslationUnitDiagnostics> > const&, llvm::DenseMap<clang::FileEntry const*, std::vector<clang::tooling::AtomicChange, std::allocator<clang::tooling::AtomicChange> >, llvm::DenseMapInfo<clang::FileEntry const*>, llvm::detail::DenseMapPair<clang::FileEntry const*, std::vector<clang::tooling::AtomicChange, std::allocator<clang::tooling::AtomicChange> > > >&, clang::SourceManager&)) /usr/local/bin/ld.lld: error: undefined symbol: clang::tooling::applyAtomicChanges[abi:cxx11](llvm::StringRef, llvm::StringRef, llvm::ArrayRef<clang::tooling::AtomicChange>, clang::tooling::ApplyChangesSpec const&) >>> referenced by ApplyReplacements.cpp >>> tools/clang/tools/extra/clang-apply-replacements/CMakeFiles/clangApplyReplacements.dir/lib/Tooling/ApplyReplacements.cpp.o:(clang::replace::applyChanges[abi:cxx11](llvm::StringRef, std::vector<clang::tooling::AtomicChange, std::allocator<clang::tooling::AtomicChange> > const&, clang::tooling::ApplyChangesSpec const&, clang::DiagnosticsEngine&)) clang: error: linker command failed with exit code 1 (use -v to see invocation) Refs. D43764, rL329813 llvm-svn: 329892
2018-04-12 18:01:20 +08:00
clangToolingRefactor
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
include
)
add_subdirectory(tool)