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