|
| 1 | +From 220a594878a89ce1f70ba980d8c87005604f1f3b Mon Sep 17 00:00:00 2001 |
| 2 | +From: Feng Zou < [email protected]> |
| 3 | +Date: Tue, 20 Oct 2020 18:36:17 +0800 |
| 4 | +Subject: [PATCH] Remove repo name in LLVM IR |
| 5 | + |
| 6 | +--- |
| 7 | + cmake/modules/GetSVN.cmake | 35 +++++++++++++++++++---------------- |
| 8 | + 1 file changed, 19 insertions(+), 16 deletions(-) |
| 9 | + |
| 10 | +diff --git a/cmake/modules/GetSVN.cmake b/cmake/modules/GetSVN.cmake |
| 11 | +index f729395f6e4..7bd19169b9a 100644 |
| 12 | +--- a/cmake/modules/GetSVN.cmake |
| 13 | ++++ b/cmake/modules/GetSVN.cmake |
| 14 | +@@ -32,9 +32,10 @@ macro(get_source_info_svn path revision repository) |
| 15 | + if (Project_WC_REVISION) |
| 16 | + set(${revision} ${Project_WC_REVISION} PARENT_SCOPE) |
| 17 | + endif() |
| 18 | +- if (Project_WC_URL) |
| 19 | +- set(${repository} ${Project_WC_URL} PARENT_SCOPE) |
| 20 | +- endif() |
| 21 | ++ # Do not show repo name in IR |
| 22 | ++ # if (Project_WC_URL) |
| 23 | ++ # set(${repository} ${Project_WC_URL} PARENT_SCOPE) |
| 24 | ++ # endif() |
| 25 | + endif() |
| 26 | + endmacro() |
| 27 | + |
| 28 | +@@ -50,9 +51,10 @@ macro(get_source_info_git_svn path revision repository) |
| 29 | + string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" |
| 30 | + "\\2" git_svn_rev "${git_output}") |
| 31 | + set(${revision} ${git_svn_rev} PARENT_SCOPE) |
| 32 | +- string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" |
| 33 | +- "\\2" git_url "${git_output}") |
| 34 | +- set(${repository} ${git_url} PARENT_SCOPE) |
| 35 | ++ # Do not show repo name in IR |
| 36 | ++ # string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" |
| 37 | ++ # "\\2" git_url "${git_output}") |
| 38 | ++ # set(${repository} ${git_url} PARENT_SCOPE) |
| 39 | + endif() |
| 40 | + endif() |
| 41 | + endmacro() |
| 42 | +@@ -68,16 +70,17 @@ macro(get_source_info_git path revision repository) |
| 43 | + if (git_result EQUAL 0) |
| 44 | + set(${revision} ${git_output} PARENT_SCOPE) |
| 45 | + endif() |
| 46 | +- execute_process(COMMAND ${git_executable} remote -v |
| 47 | +- WORKING_DIRECTORY ${path} |
| 48 | +- TIMEOUT 5 |
| 49 | +- RESULT_VARIABLE git_result |
| 50 | +- OUTPUT_VARIABLE git_output) |
| 51 | +- if (git_result EQUAL 0) |
| 52 | +- string(REGEX REPLACE "^(.*\n)?[^ \t]+[ \t]+([^ \t\n]+)[ \t]+\\(fetch\\).*" |
| 53 | +- "\\2" git_url "${git_output}") |
| 54 | +- set(${repository} "${git_url}" PARENT_SCOPE) |
| 55 | +- endif() |
| 56 | ++ # Do not show repo name in IR |
| 57 | ++ # execute_process(COMMAND ${git_executable} remote -v |
| 58 | ++ # WORKING_DIRECTORY ${path} |
| 59 | ++ # TIMEOUT 5 |
| 60 | ++ # RESULT_VARIABLE git_result |
| 61 | ++ # OUTPUT_VARIABLE git_output) |
| 62 | ++ # if (git_result EQUAL 0) |
| 63 | ++ # string(REGEX REPLACE "^(.*\n)?[^ \t]+[ \t]+([^ \t\n]+)[ \t]+\\(fetch\\).*" |
| 64 | ++ # "\\2" git_url "${git_output}") |
| 65 | ++ # set(${repository} "${git_url}" PARENT_SCOPE) |
| 66 | ++ # endif() |
| 67 | + endif() |
| 68 | + endmacro() |
| 69 | + |
| 70 | +-- |
| 71 | +2.18.1 |
| 72 | + |
0 commit comments