backport from master
This commit is contained in:
@@ -37,11 +37,10 @@
|
||||
|
||||
file(READ ${input_file} file_text)
|
||||
|
||||
if (${file_text} MATCHES ".+")
|
||||
if (NOT "${file_text}" STREQUAL "")
|
||||
|
||||
# Remember, four backslashes is escaped to one backslash in the string.
|
||||
string(REGEX REPLACE ";" "\\\\;" file_text ${file_text})
|
||||
string(REGEX REPLACE "\ncode" ";code" file_text ${file_text})
|
||||
string(REPLACE ";" "\\;" file_text ${file_text})
|
||||
string(REPLACE "\ncode" ";code" file_text ${file_text})
|
||||
|
||||
list(LENGTH file_text len)
|
||||
|
||||
@@ -57,7 +56,7 @@ if (${file_text} MATCHES ".+")
|
||||
|
||||
# Extract kernel names.
|
||||
if (${entry} MATCHES "[^g]name = ([^ ]+)")
|
||||
string(REGEX REPLACE ".* = ([^ ]+)" "\\1" entry ${entry})
|
||||
set(entry "${CMAKE_MATCH_1}")
|
||||
|
||||
# Check to see if the kernel name starts with "_"
|
||||
set(skip FALSE)
|
||||
@@ -76,19 +75,19 @@ if (${file_text} MATCHES ".+")
|
||||
|
||||
# Registers
|
||||
if (${entry} MATCHES "reg([ ]+)=([ ]+)([^ ]+)")
|
||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
||||
set(entry "${CMAKE_MATCH_3}")
|
||||
message("Registers: ${entry}")
|
||||
endif()
|
||||
|
||||
# Local memory
|
||||
if (${entry} MATCHES "lmem([ ]+)=([ ]+)([^ ]+)")
|
||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
||||
set(entry "${CMAKE_MATCH_3}")
|
||||
message("Local: ${entry}")
|
||||
endif()
|
||||
|
||||
# Shared memory
|
||||
if (${entry} MATCHES "smem([ ]+)=([ ]+)([^ ]+)")
|
||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
||||
set(entry "${CMAKE_MATCH_3}")
|
||||
message("Shared: ${entry}")
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user