1
我有一个css文件(我想解析和适应Qt,但这不是问题)。比方说,这一个:为什么CMake FILE(READ)在我的文件中忽略逗号?
QLineEdit:hover:not(focus),
QWidget QPlainTextEdit:not(hover):not(focus) {
border-color: #5575b0;
}
我做了一个脚本的CMake通过not(...)
!...
更换:剧本的那部分工作正常。
问题是CMake在行尾删除逗号(;
)。当我这样做:
file(READ ${INPUT_FILE_PATH} CONTENT)
message(${CONTENT})
输出,不幸的是:
QLineEdit:hover:not(focus),
QWidget QPlainTextEdit:not(hover):not(focus) {
border-color: #5575b0 // <-- missing comma here !
}
因为任何一个想法,为什么出现这种情况?以及如何避免它?
只想添加两个引用和报价:0010107:文件(READ删除分号(HTTP:/ /public.kitware.com/Bug/print_bug_page.php?bug_id=10107)和[0002770:使用FILE(READ ...)读取文件时丢弃分号(http://www.cmake.org/Bug/print_bug_page .php?bug_id = 2770):“是的,CMake中的列表只是带有分号分隔符的字符串。” – Florian