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

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

Issue 1135363003: Rewrite blink_gc_plugin test script in Python. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit Created 5 years, 7 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 | tools/clang/blink_gc_plugin/tests/.gitignore » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 set(LIBRARYNAME BlinkGCPlugin) 1 set(LIBRARYNAME BlinkGCPlugin)
2 2
3 set(plugin_sources 3 set(plugin_sources
4 BlinkGCPlugin.cpp 4 BlinkGCPlugin.cpp
5 Edge.cpp 5 Edge.cpp
6 RecordInfo.cpp) 6 RecordInfo.cpp)
7 7
8 if(WIN32) 8 if(WIN32)
9 # Clang doesn't support loadable modules on Windows. Unfortunately, building 9 # Clang doesn't support loadable modules on Windows. Unfortunately, building
10 # the plugin as a static library and linking clang against it doesn't work. 10 # the plugin as a static library and linking clang against it doesn't work.
11 # Since clang doesn't reference any symbols in our static library, the linker 11 # Since clang doesn't reference any symbols in our static library, the linker
12 # strips it out completely. 12 # strips it out completely.
13 # Instead, we rely on the fact that the SOURCES property of a target is no 13 # Instead, we rely on the fact that the SOURCES property of a target is no
14 # read-only after CMake 3.1 and use it to compile the plugin directly into 14 # read-only after CMake 3.1 and use it to compile the plugin directly into
15 # clang... 15 # clang...
16 cmake_minimum_required(VERSION 3.1) 16 cmake_minimum_required(VERSION 3.1)
17 # Paths must be absolute, since we're modifying a target in another directory. 17 # Paths must be absolute, since we're modifying a target in another directory.
18 set(absolute_sources "") 18 set(absolute_sources "")
19 foreach(source ${plugin_sources}) 19 foreach(source ${plugin_sources})
20 list(APPEND absolute_sources ${CMAKE_CURRENT_SOURCE_DIR}/${source}) 20 list(APPEND absolute_sources ${CMAKE_CURRENT_SOURCE_DIR}/${source})
21 endforeach() 21 endforeach()
22 set_property(TARGET clang APPEND PROPERTY SOURCES ${absolute_sources}) 22 set_property(TARGET clang APPEND PROPERTY SOURCES ${absolute_sources})
23 else() 23 else()
24 add_llvm_loadable_module("lib${LIBRARYNAME}" ${plugin_sources}) 24 add_llvm_loadable_module("lib${LIBRARYNAME}" ${plugin_sources})
25 add_dependencies("lib${LIBRARYNAME}" clang) 25 add_dependencies("lib${LIBRARYNAME}" clang)
26 26
27 cr_install(TARGETS "lib${LIBRARYNAME}" LIBRARY DESTINATION lib) 27 cr_install(TARGETS "lib${LIBRARYNAME}" LIBRARY DESTINATION lib)
28 28
29 cr_add_test(blink_gc_plugin_test 29 cr_add_test(blink_gc_plugin_test
30 ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.sh 30 python
31 ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.py
31 ${CMAKE_BINARY_DIR}/bin/clang 32 ${CMAKE_BINARY_DIR}/bin/clang
32 $<TARGET_FILE:lib${LIBRARYNAME}> 33 $<TARGET_FILE:lib${LIBRARYNAME}>
33 ) 34 )
34 endif() 35 endif()
OLDNEW
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/tests/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698