Open junxnone opened 2 years ago
string(FIND <string> <substring> <out-var> [...])
string(REPLACE <match-string> <replace-string> <out-var> <input>...)
string(REGEX MATCH <match-regex> <out-var> <input>...)
string(REGEX MATCHALL <match-regex> <out-var> <input>...)
string(REGEX REPLACE <match-regex> <replace-expr> <out-var> <input>...)
string(TOLOWER <string> <out-var>)
string(TOUPPER <string> <out-var>)
string(LENGTH <string> <out-var>)
string(COMPARE <op> <string1> <string2> <out-var>)
Reading file(READ <filename> <out-var> [...]) file(STRINGS <filename> <out-var> [...]) file(<HASH> <filename> <out-var>) file(TIMESTAMP <filename> <out-var> [...]) file(GET_RUNTIME_DEPENDENCIES [...]) Writing file({WRITE | APPEND} <filename> <content>...) file({TOUCH | TOUCH_NOCREATE} [<file>...]) file(GENERATE OUTPUT <output-file> [...]) file(CONFIGURE OUTPUT <output-file> CONTENT <content> [...]) Filesystem file({GLOB | GLOB_RECURSE} <out-var> [...] [<globbing-expr>...]) file(MAKE_DIRECTORY [<dir>...]) file({REMOVE | REMOVE_RECURSE } [<files>...]) file(RENAME <oldname> <newname> [...]) file(COPY_FILE <oldname> <newname> [...]) file({COPY | INSTALL} <file>... DESTINATION <dir> [...]) file(SIZE <filename> <out-var>) file(READ_SYMLINK <linkname> <out-var>) file(CREATE_LINK <original> <linkname> [...]) file(CHMOD <files>... <directories>... PERMISSIONS <permissions>... [...]) file(CHMOD_RECURSE <files>... <directories>... PERMISSIONS <permissions>... [...]) Path Conversion file(REAL_PATH <path> <out-var> [BASE_DIRECTORY <dir>] [EXPAND_TILDE]) file(RELATIVE_PATH <out-var> <directory> <file>) file({TO_CMAKE_PATH | TO_NATIVE_PATH} <path> <out-var>) Transfer file(DOWNLOAD <url> [<file>] [...]) file(UPLOAD <file> <url> [...]) Locking file(LOCK <path> [...]) Archiving file(ARCHIVE_CREATE OUTPUT <archive> PATHS <paths>... [...]) file(ARCHIVE_EXTRACT INPUT <archive> [...])
命令行
Scripting Commands
string
常用 string 操作
string(FIND <string> <substring> <out-var> [...])
string(REPLACE <match-string> <replace-string> <out-var> <input>...)
string(REGEX MATCH <match-regex> <out-var> <input>...)
string(REGEX MATCHALL <match-regex> <out-var> <input>...)
string(REGEX REPLACE <match-regex> <replace-expr> <out-var> <input>...)
string(TOLOWER <string> <out-var>)
string(TOUPPER <string> <out-var>)
string(LENGTH <string> <out-var>)
string(COMPARE <op> <string1> <string2> <out-var>)
file
Project Commands
Ctest Commands
Reference