I have a template cpp file that will contain several placeholders. Excerpt:
// WARNING! this file is autogenerated, do not edit manually
QString appName()
{
return "APP_NAME_VALUE";
}
Cmake will read this file in, fill in the placeholders and write it back out to the shadow build directory for compilation
set(APP_NAME "real application name")
file(READ ${CMAKE_SOURCE_DIR}/templates/app-info.cpp APP_INFO)
string(REPLACE "APP_NAME_VALUE" ${APP_NAME} APP_INFO ${APP_INFO})
# other tag replacements
file(WRITE "${CMAKE_BINARY_DIR}/src/app-info.cpp" ${APP_INFO})
But every time I run cmake, it seems to strip the semi-colon from the file contents.
// WARNING! this file is autogenerated, do not edit manually
QString appName()
{
return "real application name"
}
Is this expected behaviour? What can I do to counter this?