mirror of https://github.com/lammps/lammps.git
Fix GenerateOpenCLHeader CMake utilitiy to avoid uncompilable CL code
This commit is contained in:
parent
faa0da9976
commit
7fbd409f5b
|
@ -6,7 +6,7 @@ function(GenerateOpenCLHeader varname outfile files)
|
|||
foreach(IDX RANGE 2 ${ARG_END})
|
||||
list(GET ARGV ${IDX} filename)
|
||||
file(READ ${filename} content)
|
||||
string(REGEX REPLACE "\\s*//[^\n]*\n" "" content "${content}")
|
||||
string(REGEX REPLACE "\\s*//[^\n]*\n" "\n" content "${content}")
|
||||
string(REGEX REPLACE "\\\\" "\\\\\\\\" content "${content}")
|
||||
string(REGEX REPLACE "\"" "\\\\\"" content "${content}")
|
||||
string(REGEX REPLACE "([^\n]+)\n" "\"\\1\\\\n\"\n" content "${content}")
|
||||
|
|
Loading…
Reference in New Issue