Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: tools/clang/plugins/CMakeLists.txt

Issue 583143002: Build clang tools using CMake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/empty_string/Makefile ('k') | tools/clang/rewrite_scoped_refptr/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/CMakeLists.txt
diff --git a/tools/clang/plugins/CMakeLists.txt b/tools/clang/plugins/CMakeLists.txt
index 6ef03d0e66fc442b85879a67e825cf0b6b689dbe..df30cdd0dbdc0ff27edfff680af8d022017c9898 100644
--- a/tools/clang/plugins/CMakeLists.txt
+++ b/tools/clang/plugins/CMakeLists.txt
@@ -1,42 +1,13 @@
-cmake_minimum_required(VERSION 2.8.8)
-project(FindBadConstructs)
-
-# This pugin is built using LLVM's build system, not Chromium's.
-# It expects LLVM_SRC_DIR and LLVM_BUILD_DIR to be set.
-# For example:
-#
-# cmake -GNinja \
-# -DLLVM_BUILD_DIR=$CHROMIUM_SRC_DIR/third_party/llvm-build/Release+Asserts \
-# -DLLVM_SRC_DIR=$CHROMIUM_SRC_DIR/third_party/llvm \
-# $CHROMIUM_SRC_DIR/tools/clang/plugins/
-# ninja
-
-
-list(APPEND CMAKE_MODULE_PATH "${LLVM_BUILD_DIR}/share/llvm/cmake")
-
-include(LLVMConfig)
-include(AddLLVM)
-include(HandleLLVMOptions)
-
-# Use rpath to find the bundled standard C++ library.
-set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
-if (APPLE)
- set(CMAKE_INSTALL_NAME_DIR "@rpath")
- set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
-else(UNIX)
- set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
-endif()
-
-set(LLVM_RUNTIME_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin")
-set(LLVM_LIBRARY_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib")
-
-include_directories("${LLVM_SRC_DIR}/include"
- "${LLVM_SRC_DIR}/tools/clang/include"
- "${LLVM_BUILD_DIR}/include"
- "${LLVM_BUILD_DIR}/tools/clang/include")
-
add_llvm_loadable_module(libFindBadConstructs
ChromeClassTester.cpp
FindBadConstructsAction.cpp
FindBadConstructsConsumer.cpp
)
+
+install(TARGETS libFindBadConstructs LIBRARY DESTINATION lib)
+
+cr_add_test(plugins_test
+ ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.sh
+ ${LLVM_BUILD_DIR}/bin/clang
+ $<TARGET_FILE:libFindBadConstructs>
+ )
« no previous file with comments | « tools/clang/empty_string/Makefile ('k') | tools/clang/rewrite_scoped_refptr/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698