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

Side by Side Diff: tools/clang/CMakeLists.txt

Issue 1634593006: Add chrome clang tests as custom targets instead of tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 cmake_minimum_required(VERSION 2.8.8) 1 cmake_minimum_required(VERSION 2.8.8)
2 project(ChromeExtras) 2 project(ChromeExtras)
3 enable_testing() 3 enable_testing()
4 4
5 list(APPEND CMAKE_MODULE_PATH "${LLVM_BUILD_DIR}/share/llvm/cmake") 5 list(APPEND CMAKE_MODULE_PATH "${LLVM_BUILD_DIR}/share/llvm/cmake")
6 6
7 # These tools are built using LLVM's build system, not Chromium's. 7 # These tools are built using LLVM's build system, not Chromium's.
8 # The build script generates a shim CMakeLists.txt in the LLVM source tree, 8 # The build script generates a shim CMakeLists.txt in the LLVM source tree,
9 # which simply forwards to this file. 9 # which simply forwards to this file.
10 10
(...skipping 10 matching lines...) Expand all
21 include_directories("${CMAKE_SOURCE_DIR}/include" 21 include_directories("${CMAKE_SOURCE_DIR}/include"
22 "${CMAKE_SOURCE_DIR}/tools/clang/include" 22 "${CMAKE_SOURCE_DIR}/tools/clang/include"
23 "${CMAKE_BINARY_DIR}/include" 23 "${CMAKE_BINARY_DIR}/include"
24 "${CMAKE_BINARY_DIR}/tools/clang/include") 24 "${CMAKE_BINARY_DIR}/tools/clang/include")
25 25
26 link_directories("${CMAKE_SOURCE_DIR}/lib" 26 link_directories("${CMAKE_SOURCE_DIR}/lib"
27 "${CMAKE_SOURCE_DIR}/tools/clang/lib" 27 "${CMAKE_SOURCE_DIR}/tools/clang/lib"
28 "${CMAKE_BINARY_DIR}/lib" 28 "${CMAKE_BINARY_DIR}/lib"
29 "${CMAKE_BINARY_DIR}/tools/clang/lib") 29 "${CMAKE_BINARY_DIR}/tools/clang/lib")
30 30
31 # Tests for all enabled tools can be run by building this target.
32 add_custom_target(cr-check-all COMMAND ${CMAKE_CTEST_COMMAND} -V)
33
31 # cr_add_test( 34 # cr_add_test(
32 # name 35 # name
33 # testprog 36 # testprog
34 # arguments... 37 # arguments...
35 # ) 38 # )
36 function(cr_add_test name testprog) 39 function(cr_add_test name testprog)
37 add_test(NAME ${name} COMMAND ${testprog} ${ARGN}) 40 add_custom_target(${name} COMMAND ${testprog} ${ARGN})
38 add_dependencies(cr-check-all ${name}) 41 add_dependencies(cr-check-all ${name})
39 endfunction(cr_add_test) 42 endfunction(cr_add_test)
40 43
41 # Tests for all enabled tools can be run by building this target.
42 add_custom_target(cr-check-all COMMAND ${CMAKE_CTEST_COMMAND} -V)
43
44 function(cr_install) 44 function(cr_install)
45 install(${ARGN} COMPONENT chrome-tools OPTIONAL) 45 install(${ARGN} COMPONENT chrome-tools OPTIONAL)
46 endfunction(cr_install) 46 endfunction(cr_install)
47 47
48 # Custom install target, so the chrome tools can be installed without installing 48 # Custom install target, so the chrome tools can be installed without installing
49 # all the other LLVM targets. 49 # all the other LLVM targets.
50 add_custom_target(cr-install COMMAND 50 add_custom_target(cr-install COMMAND
51 ${CMAKE_COMMAND} -D COMPONENT=chrome-tools -P cmake_install.cmake) 51 ${CMAKE_COMMAND} -D COMPONENT=chrome-tools -P cmake_install.cmake)
52 52
53 foreach(tool ${CHROMIUM_TOOLS}) 53 foreach(tool ${CHROMIUM_TOOLS})
54 add_subdirectory(${tool}) 54 add_subdirectory(${tool})
55 endforeach(tool) 55 endforeach(tool)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698