[PATCH] D73300: [clang-tidy] Add library for clang-tidy main function
Dmitry Polukhin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 27 07:43:40 PST 2020
DmitryPolukhin marked an inline comment as done.
DmitryPolukhin added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/tool/CMakeLists.txt:22
+ clangToolingCore
+ )
+
----------------
thakis wrote:
> Normally we have a single cmake target per CMakeLists.txt. Maybe the library could be in clang-tidy/lib and clang-tidy/tool could use it? Then you wouldn't need the LLVM_OPTIONAL_SOURCES hack and it'd be all a bit nicer.
I'll prepare patch with files move if you think it worths doing. I see multiple targets in several CMakeLists.txt:
```
llvm-project> grep LLVM_OPTIONAL_SOURCES ./ -r
./clang-tools-extra/clang-tidy/tool/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES ClangTidyMain.cpp ClangTidyToolMain.cpp)
./clang-tools-extra/clangd/xpc/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES Conversion.cpp XPCTransport.cpp)
./clang/tools/clang-fuzzer/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES
./clang/tools/clang-fuzzer/CMakeLists.txt: set(LLVM_OPTIONAL_SOURCES ${LLVM_OPTIONAL_SOURCES} ${PROTO_SRCS})
./clang/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES proto_to_cxx.cpp proto_to_cxx_main.cpp
./clang/tools/clang-fuzzer/proto-to-llvm/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES loop_proto_to_llvm.cpp loop_proto_to_llvm_main.cpp)
./lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt: list(APPEND LLVM_OPTIONAL_SOURCES
./lldb/source/Symbol/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES LocateSymbolFileMacOSX.cpp)
./lldb/tools/debugserver/source/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES ${lldbDebugserverCommonSources})
./llvm/cmake/modules/AddLLVM.cmake: set(LLVM_OPTIONAL_SOURCES ${ARG_DUMMY_MAIN})
./llvm/cmake/modules/AddLLVM.cmake: set(LLVM_OPTIONAL_SOURCES ${ARG_DUMMY_MAIN})
./llvm/cmake/modules/LLVMProcessSources.cmake: list(FIND LLVM_OPTIONAL_SOURCES ${entry} idx)
./llvm/unittests/Passes/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES PluginsTest.cpp TestPlugin.cpp)
./llvm/unittests/Support/DynamicLibrary/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES ExportedFuncs.cpp PipSqueak.cpp)
./mlir/lib/EDSC/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES
./mlir/lib/Support/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES
./mlir/test/lib/TestDialect/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES
./mlir/test/mlir-cpu-runner/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES
./mlir/tools/mlir-cuda-runner/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES
./mlir/tools/mlir-opt/CMakeLists.txt:set(LLVM_OPTIONAL_SOURCES
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73300/new/
https://reviews.llvm.org/D73300
More information about the cfe-commits
mailing list