2016-12-13 09:37:33 +00:00
|
|
|
file (READ ${SOURCE_FILENAME} CONTENT)
|
|
|
|
string (REGEX REPLACE "using re2::RE2;" "" CONTENT "${CONTENT}")
|
2018-01-19 01:18:47 +00:00
|
|
|
string (REGEX REPLACE "using re2::LazyRE2;" "" CONTENT "${CONTENT}")
|
2016-12-13 09:37:33 +00:00
|
|
|
string (REGEX REPLACE "namespace re2" "namespace re2_st" CONTENT "${CONTENT}")
|
|
|
|
string (REGEX REPLACE "re2::" "re2_st::" CONTENT "${CONTENT}")
|
|
|
|
string (REGEX REPLACE "\"re2/" "\"re2_st/" CONTENT "${CONTENT}")
|
|
|
|
string (REGEX REPLACE "(.\\*?_H)" "\\1_ST" CONTENT "${CONTENT}")
|
2018-02-12 02:41:50 +00:00
|
|
|
string (REGEX REPLACE "#define MUTEX_IS_PTHREAD_RWLOCK" "#undef MUTEX_IS_PTHREAD_RWLOCK" CONTENT "${CONTENT}")
|
2018-02-12 03:05:14 +00:00
|
|
|
string (REGEX REPLACE "typedef std::mutex MutexType;" "struct MutexType { void lock() {} void unlock() {} };" CONTENT "${CONTENT}")
|
2016-12-13 09:37:33 +00:00
|
|
|
file (WRITE ${TARGET_FILENAME} "${CONTENT}")
|