Commit f428d187 authored by yao's avatar yao

discard comments in kernels.cpp

parent 7e495a1d
......@@ -18,6 +18,7 @@ foreach(cl ${cl_list})
string(REPLACE "\t" " " lines "${lines}")
string(REGEX REPLACE "/\\*([^*]/|\\*[^/]|[^*/])*\\*/" "" lines "${lines}") # multiline comments
string(REGEX REPLACE "/\\*([^\n])*\\*/" "" lines "${lines}") # single-line comments
string(REGEX REPLACE "[ ]*//[^\n]*\n" "\n" lines "${lines}") # single-line comments
string(REGEX REPLACE "\n[ ]*(\n[ ]*)*" "\n" lines "${lines}") # empty lines & leading whitespace
string(REGEX REPLACE "^\n" "" lines "${lines}") # leading new line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment