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

Unified Diff: tools/clang/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 | « no previous file | tools/clang/blink_gc_plugin/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/CMakeLists.txt
diff --git a/tools/clang/blink_gc_plugin/CMakeLists.txt b/tools/clang/CMakeLists.txt
similarity index 56%
copy from tools/clang/blink_gc_plugin/CMakeLists.txt
copy to tools/clang/CMakeLists.txt
index 3296b404b376ff67e29b0d1ced1a8c1a3eb901a3..1b16704a689fb6769c02f54e42a82ec1b91ffff8 100644
--- a/tools/clang/blink_gc_plugin/CMakeLists.txt
+++ b/tools/clang/CMakeLists.txt
@@ -1,19 +1,21 @@
cmake_minimum_required(VERSION 2.8.8)
-project(BlinkGCPlugin)
+project(ChromeExtras)
+enable_testing()
-# This pugin is built using LLVM's build system, not Chromium's.
+list(APPEND CMAKE_MODULE_PATH "${LLVM_BUILD_DIR}/share/llvm/cmake")
+
+# These tools are 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/blink_gc_plugin/
+# -DCHROMIUM_TOOLS=blink_gc_plugin;plugin \
+# $CHROMIUM_SRC_DIR/tools/clang/
# ninja
-list(APPEND CMAKE_MODULE_PATH "${LLVM_BUILD_DIR}/share/llvm/cmake")
-
include(LLVMConfig)
include(AddLLVM)
include(HandleLLVMOptions)
@@ -35,12 +37,24 @@ include_directories("${LLVM_SRC_DIR}/include"
"${LLVM_BUILD_DIR}/include"
"${LLVM_BUILD_DIR}/tools/clang/include")
-# This line is read by update.sh and other scripts in tools/clang/scripts
-# Note: The spaces are significant.
-set(LIBRARYNAME BlinkGCPlugin_12)
-
-add_llvm_loadable_module("lib${LIBRARYNAME}"
- BlinkGCPlugin.cpp
- Edge.cpp
- RecordInfo.cpp
- )
+link_directories("${LLVM_SRC_DIR}/lib"
+ "${LLVM_SRC_DIR}/tools/clang/lib"
+ "${LLVM_BUILD_DIR}/lib"
+ "${LLVM_BUILD_DIR}/tools/clang/lib")
+
+# cr_add_test(
+# name
+# testprog
+# arguments...
+# )
+function(cr_add_test name testprog)
+ add_test(NAME ${name} COMMAND ${testprog} ${ARGN})
+ add_dependencies(check-all ${name})
+endfunction(cr_add_test)
+
+# Tests for all enabled tools can be run by building this target.
+add_custom_target(check-all COMMAND ${CMAKE_CTEST_COMMAND} -V)
+
+foreach(tool ${CHROMIUM_TOOLS})
+ add_subdirectory(${tool})
+endforeach(tool)
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698