cmake相关

cmake命令

list

In CMake, a "list" is a string of items separated by semi-colons. For example:
set(FOO "a")
list(APPEND FOO "b") # now FOO="a;b"
list(APPEND FOO "c") # now FOO="a;b;c"
In CMake, a string of space-seperated items is just a string, not a list. Use the string(APPEND)command to append to it. For example:
set(FOO "a")
string(APPEND FOO " b") # now FOO="a b"
string(APPEND FOO " c") # now FOO="a b c"
On old versions of CMake that lack the string(APPEND) command, you should fallback to the setcommand. For example:
set(FOO "a")
set(FOO "${FOO} b")
set(FOO "${FOO} c")
来源: https://stackoverflow.com/questions/16433391/cmake-list-append-for-compiler-flags-yields-bogus-results
(1) foreach(LETTER a b c) [...]
(2) foreach(LETTER a;b;c) [...]
(3) set(MYLIST "a;b;c")
    foreach(LETTER ${MYLIST}) [...]

对产生的make命令不清楚的,到build目录下面去make -n,windows上是mingw-make -n

或者make VERBOSE=1

原文地址:https://www.cnblogs.com/lizhensheng/p/11117234.html