Upstream version 3.4.0
-----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJWS1RUAAoJEP4ixv2DE11FcR0P/1BMjNTf4XG54N502iHW81aH uysA+aTEYEiahEd03/mzyyHpTy0CTMM1xZpiNaX+w8B0kK1R464h+NcDdATMAt/D lOcBKU2ioql27n1evl3YkknFmtAXsRnyybC/W8sU8qCxx75H7bxRmqtLqpbCd5tX UPNk7fnp7sNvpo4zVHveA5OPOv21YHkyI48DaYWOIAzWeIUWJupO+trofdtN5agI cSVsvdhW4jzrPP4OdhfL1ssgMDc7T8Er+E8qVbuleUE1EfiuUtmSQ8/nxMH1TIL4 rDuXTwsopIQuD4MUb3OyAmnhkNACm6NOjF/rcMZTftig2fan3Jz3NA5E48nyYuSS RcUXYTAdUUuDnRtK1bmsirnpthcyLJsUXU9vpKajcBiAWFgiVrf+laCzO02CCVWF NwX8gJecdwY5R5HMDklPvzfwoiMyqMFLZIMNYebnYen0+2vXuYKvDqBcSVnEsI7s Nqq9XBN2jV+8cgz9O33SXra5K2V46FWs16xNxZi5MNQODW0qmJKp+UAKpMwqS4qN eJVyft3kr8MVsz3IVdzRtSsFNCk8vnzCr0IueW5x1PLqeE/ssXfNAjPe3rZBuHwD tkYt3GMOxKyjhpYq2Tu2AXILxTXjS1HeCy9hWayfJUIXDwL8r9W+lYZL49O38wgX +2OPJtIQnMSiZLLz6Ozc =voL7 -----END PGP SIGNATURE----- Merge tag 'upstream/3.4.0' into experimental Upstream version 3.4.0 # gpg: Signature made Di 17 Nov 2015 17:22:44 CET # gpg: using RSA key 0xFE22C6FD83135D45 # gpg: Good signature from "Felix Geyer <felix@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx-pkg@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx@kubuntu.org>" [ultimate] # gpg: aka "Felix Geyer <debfx@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx@ubuntu.com>" [ultimate] # gpg: aka "Felix Geyer <felix.geyer@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <fgeyer@debian.org>" [ultimate] # Primary key fingerprint: 164C 7051 2F79 2947 6764 AB56 FE22 C6FD 8313 5D45
This commit is contained in:
commit
333d155101
@ -16,7 +16,7 @@
|
|||||||
" Version: $Revision$
|
" Version: $Revision$
|
||||||
"
|
"
|
||||||
" Licence: The CMake license applies to this file. See
|
" Licence: The CMake license applies to this file. See
|
||||||
" http://www.cmake.org/licensing
|
" https://cmake.org/licensing
|
||||||
" This implies that distribution with Vim is allowed
|
" This implies that distribution with Vim is allowed
|
||||||
|
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
|
@ -43,7 +43,14 @@ set the path with these commands:
|
|||||||
(setenv \"PATH\" (concat (getenv \"PATH\") \":/usr/local/cmake/bin\"))"
|
(setenv \"PATH\" (concat (getenv \"PATH\") \":/usr/local/cmake/bin\"))"
|
||||||
:type 'file
|
:type 'file
|
||||||
:group 'cmake)
|
:group 'cmake)
|
||||||
;;
|
|
||||||
|
;; Keywords
|
||||||
|
(defconst cmake-keywords-block-open '("IF" "MACRO" "FOREACH" "ELSE" "ELSEIF" "WHILE" "FUNCTION"))
|
||||||
|
(defconst cmake-keywords-block-close '("ENDIF" "ENDFOREACH" "ENDMACRO" "ELSE" "ELSEIF" "ENDWHILE" "ENDFUNCTION"))
|
||||||
|
(defconst cmake-keywords
|
||||||
|
(let ((kwds (append cmake-keywords-block-open cmake-keywords-block-close nil)))
|
||||||
|
(delete-dups kwds)))
|
||||||
|
|
||||||
;; Regular expressions used by line indentation function.
|
;; Regular expressions used by line indentation function.
|
||||||
;;
|
;;
|
||||||
(defconst cmake-regex-blank "^[ \t]*$")
|
(defconst cmake-regex-blank "^[ \t]*$")
|
||||||
@ -51,40 +58,39 @@ set the path with these commands:
|
|||||||
(defconst cmake-regex-paren-left "(")
|
(defconst cmake-regex-paren-left "(")
|
||||||
(defconst cmake-regex-paren-right ")")
|
(defconst cmake-regex-paren-right ")")
|
||||||
(defconst cmake-regex-argument-quoted
|
(defconst cmake-regex-argument-quoted
|
||||||
"\"\\([^\"\\\\]\\|\\\\\\(.\\|\n\\)\\)*\"")
|
(rx ?\" (* (or (not (any ?\" ?\\)) (and ?\\ anything))) ?\"))
|
||||||
(defconst cmake-regex-argument-unquoted
|
(defconst cmake-regex-argument-unquoted
|
||||||
"\\([^ \t\r\n()#\"\\\\]\\|\\\\.\\)\\([^ \t\r\n()#\\\\]\\|\\\\.\\)*")
|
(rx (or (not (any space "()#\"\\\n")) (and ?\\ nonl))
|
||||||
(defconst cmake-regex-token (concat "\\(" cmake-regex-comment
|
(* (or (not (any space "()#\\\n")) (and ?\\ nonl)))))
|
||||||
"\\|" cmake-regex-paren-left
|
(defconst cmake-regex-token
|
||||||
"\\|" cmake-regex-paren-right
|
(rx-to-string `(group (or (regexp ,cmake-regex-comment)
|
||||||
"\\|" cmake-regex-argument-unquoted
|
?( ?)
|
||||||
"\\|" cmake-regex-argument-quoted
|
(regexp ,cmake-regex-argument-unquoted)
|
||||||
"\\)"))
|
(regexp ,cmake-regex-argument-quoted)))))
|
||||||
(defconst cmake-regex-indented (concat "^\\("
|
(defconst cmake-regex-indented
|
||||||
cmake-regex-token
|
(rx-to-string `(and bol (* (group (or (regexp ,cmake-regex-token) (any space ?\n)))))))
|
||||||
"\\|" "[ \t\r\n]"
|
|
||||||
"\\)*"))
|
|
||||||
(defconst cmake-regex-block-open
|
(defconst cmake-regex-block-open
|
||||||
"^\\(if\\|macro\\|foreach\\|else\\|elseif\\|while\\|function\\)$")
|
(rx-to-string `(and symbol-start (or ,@(append cmake-keywords-block-open
|
||||||
|
(mapcar 'downcase cmake-keywords-block-open))) symbol-end)))
|
||||||
(defconst cmake-regex-block-close
|
(defconst cmake-regex-block-close
|
||||||
"^[ \t]*\\(endif\\|endforeach\\|endmacro\\|else\\|elseif\\|endwhile\\|endfunction\\)[ \t]*(")
|
(rx-to-string `(and symbol-start (or ,@(append cmake-keywords-block-close
|
||||||
|
(mapcar 'downcase cmake-keywords-block-close))) symbol-end)))
|
||||||
|
(defconst cmake-regex-close
|
||||||
|
(rx-to-string `(and bol (* space) (regexp ,cmake-regex-block-close)
|
||||||
|
(* space) (regexp ,cmake-regex-paren-left))))
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
;;
|
;; Line indentation helper functions
|
||||||
;; Helper functions for line indentation function.
|
|
||||||
;;
|
|
||||||
(defun cmake-line-starts-inside-string ()
|
(defun cmake-line-starts-inside-string ()
|
||||||
"Determine whether the beginning of the current line is in a string."
|
"Determine whether the beginning of the current line is in a string."
|
||||||
(if (save-excursion
|
(save-excursion
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(let ((parse-end (point)))
|
(let ((parse-end (point)))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(nth 3 (parse-partial-sexp (point) parse-end))
|
(nth 3 (parse-partial-sexp (point) parse-end))
|
||||||
)
|
)
|
||||||
)
|
|
||||||
t
|
|
||||||
nil
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -111,57 +117,40 @@ set the path with these commands:
|
|||||||
;; Line indentation function.
|
;; Line indentation function.
|
||||||
;;
|
;;
|
||||||
(defun cmake-indent ()
|
(defun cmake-indent ()
|
||||||
"Indent current line as CMAKE code."
|
"Indent current line as CMake code."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (cmake-line-starts-inside-string)
|
(unless (cmake-line-starts-inside-string)
|
||||||
()
|
|
||||||
(if (bobp)
|
(if (bobp)
|
||||||
(cmake-indent-line-to 0)
|
(cmake-indent-line-to 0)
|
||||||
(let (cur-indent)
|
(let (cur-indent)
|
||||||
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
|
|
||||||
(let ((point-start (point))
|
(let ((point-start (point))
|
||||||
(case-fold-search t) ;; case-insensitive
|
(case-fold-search t) ;; case-insensitive
|
||||||
token)
|
token)
|
||||||
|
|
||||||
; Search back for the last indented line.
|
; Search back for the last indented line.
|
||||||
(cmake-find-last-indented-line)
|
(cmake-find-last-indented-line)
|
||||||
|
|
||||||
; Start with the indentation on this line.
|
; Start with the indentation on this line.
|
||||||
(setq cur-indent (current-indentation))
|
(setq cur-indent (current-indentation))
|
||||||
|
|
||||||
; Search forward counting tokens that adjust indentation.
|
; Search forward counting tokens that adjust indentation.
|
||||||
(while (re-search-forward cmake-regex-token point-start t)
|
(while (re-search-forward cmake-regex-token point-start t)
|
||||||
(setq token (match-string 0))
|
(setq token (match-string 0))
|
||||||
(if (string-match (concat "^" cmake-regex-paren-left "$") token)
|
(when (or (string-match (concat "^" cmake-regex-paren-left "$") token)
|
||||||
(setq cur-indent (+ cur-indent cmake-tab-width))
|
(and (string-match cmake-regex-block-open token)
|
||||||
)
|
(looking-at (concat "[ \t]*" cmake-regex-paren-left))))
|
||||||
(if (string-match (concat "^" cmake-regex-paren-right "$") token)
|
(setq cur-indent (+ cur-indent cmake-tab-width)))
|
||||||
(setq cur-indent (- cur-indent cmake-tab-width))
|
(when (string-match (concat "^" cmake-regex-paren-right "$") token)
|
||||||
)
|
(setq cur-indent (- cur-indent cmake-tab-width)))
|
||||||
(if (and
|
|
||||||
(string-match cmake-regex-block-open token)
|
|
||||||
(looking-at (concat "[ \t]*" cmake-regex-paren-left))
|
|
||||||
)
|
|
||||||
(setq cur-indent (+ cur-indent cmake-tab-width))
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(goto-char point-start)
|
(goto-char point-start)
|
||||||
|
;; If next token closes the block, decrease indentation
|
||||||
; If this is the end of a block, decrease indentation.
|
(when (looking-at cmake-regex-close)
|
||||||
(if (looking-at cmake-regex-block-close)
|
(setq cur-indent (- cur-indent cmake-tab-width))
|
||||||
(setq cur-indent (- cur-indent cmake-tab-width))
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
; Indent this line by the amount selected.
|
; Indent this line by the amount selected.
|
||||||
(if (< cur-indent 0)
|
(cmake-indent-line-to (max cur-indent 0))
|
||||||
(cmake-indent-line-to 0)
|
|
||||||
(cmake-indent-line-to cur-indent)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -183,17 +172,19 @@ the indentation. Otherwise it retains the same position on the line"
|
|||||||
;;
|
;;
|
||||||
;; Helper functions for buffer
|
;; Helper functions for buffer
|
||||||
;;
|
;;
|
||||||
(defun unscreamify-cmake-buffer ()
|
(defun cmake-unscreamify-buffer ()
|
||||||
"Convert all CMake commands to lowercase in buffer."
|
"Convert all CMake commands to lowercase in buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(goto-char (point-min))
|
(save-excursion
|
||||||
(while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
|
(goto-char (point-min))
|
||||||
(replace-match
|
(while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
|
||||||
(concat
|
(replace-match
|
||||||
(match-string 1)
|
(concat
|
||||||
(downcase (match-string 2))
|
(match-string 1)
|
||||||
(match-string 3))
|
(downcase (match-string 2))
|
||||||
t))
|
(match-string 3))
|
||||||
|
t))
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@ -202,18 +193,32 @@ the indentation. Otherwise it retains the same position on the line"
|
|||||||
;; Keyword highlighting regex-to-face map.
|
;; Keyword highlighting regex-to-face map.
|
||||||
;;
|
;;
|
||||||
(defconst cmake-font-lock-keywords
|
(defconst cmake-font-lock-keywords
|
||||||
(list '("^[ \t]*\\([[:word:]_]+\\)[ \t]*(" 1 font-lock-function-name-face))
|
`((,(rx-to-string `(and symbol-start
|
||||||
"Highlighting expressions for CMAKE mode."
|
(or ,@cmake-keywords
|
||||||
)
|
,@(mapcar #'downcase cmake-keywords))
|
||||||
|
symbol-end))
|
||||||
|
. font-lock-keyword-face)
|
||||||
|
(,(rx symbol-start (group (+ (or word (syntax symbol)))) (* blank) ?\()
|
||||||
|
1 font-lock-function-name-face)
|
||||||
|
(,(rx "${" (group (+(any alnum "-_+/."))) "}")
|
||||||
|
1 font-lock-variable-name-face t)
|
||||||
|
)
|
||||||
|
"Highlighting expressions for CMake mode.")
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
;;
|
;; Syntax table for this mode.
|
||||||
;; Syntax table for this mode. Initialize to nil so that it is
|
(defvar cmake-mode-syntax-table nil
|
||||||
;; regenerated when the cmake-mode function is called.
|
"Syntax table for CMake mode.")
|
||||||
;;
|
(or cmake-mode-syntax-table
|
||||||
(defvar cmake-mode-syntax-table nil "Syntax table for cmake-mode.")
|
(setq cmake-mode-syntax-table
|
||||||
(setq cmake-mode-syntax-table nil)
|
(let ((table (make-syntax-table)))
|
||||||
|
(modify-syntax-entry ?\( "()" table)
|
||||||
|
(modify-syntax-entry ?\) ")(" table)
|
||||||
|
(modify-syntax-entry ?# "<" table)
|
||||||
|
(modify-syntax-entry ?\n ">" table)
|
||||||
|
(modify-syntax-entry ?$ "'" table)
|
||||||
|
table)))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; User hook entry point.
|
;; User hook entry point.
|
||||||
@ -227,39 +232,23 @@ the indentation. Otherwise it retains the same position on the line"
|
|||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
;;
|
;; For compatibility with Emacs < 24
|
||||||
;; CMake mode startup function.
|
(defalias 'cmake--parent-mode
|
||||||
|
(if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
|
||||||
|
|
||||||
|
;;------------------------------------------------------------------------------
|
||||||
|
;; Mode definition.
|
||||||
;;
|
;;
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun cmake-mode ()
|
(define-derived-mode cmake-mode cmake--parent-mode "CMake"
|
||||||
"Major mode for editing CMake listfiles."
|
"Major mode for editing CMake source files."
|
||||||
(interactive)
|
|
||||||
(kill-all-local-variables)
|
|
||||||
(setq major-mode 'cmake-mode)
|
|
||||||
(setq mode-name "CMAKE")
|
|
||||||
|
|
||||||
; Create the syntax table
|
|
||||||
(setq cmake-mode-syntax-table (make-syntax-table))
|
|
||||||
(set-syntax-table cmake-mode-syntax-table)
|
|
||||||
(modify-syntax-entry ?\( "()" cmake-mode-syntax-table)
|
|
||||||
(modify-syntax-entry ?\) ")(" cmake-mode-syntax-table)
|
|
||||||
(modify-syntax-entry ?# "<" cmake-mode-syntax-table)
|
|
||||||
(modify-syntax-entry ?\n ">" cmake-mode-syntax-table)
|
|
||||||
|
|
||||||
; Setup font-lock mode.
|
; Setup font-lock mode.
|
||||||
(make-local-variable 'font-lock-defaults)
|
(set (make-local-variable 'font-lock-defaults) '(cmake-font-lock-keywords))
|
||||||
(setq font-lock-defaults '(cmake-font-lock-keywords))
|
|
||||||
|
|
||||||
; Setup indentation function.
|
; Setup indentation function.
|
||||||
(make-local-variable 'indent-line-function)
|
(set (make-local-variable 'indent-line-function) 'cmake-indent)
|
||||||
(setq indent-line-function 'cmake-indent)
|
|
||||||
|
|
||||||
; Setup comment syntax.
|
; Setup comment syntax.
|
||||||
(make-local-variable 'comment-start)
|
(set (make-local-variable 'comment-start) "#"))
|
||||||
(setq comment-start "#")
|
|
||||||
|
|
||||||
; Run user hooks.
|
|
||||||
(run-hooks 'cmake-mode-hook))
|
|
||||||
|
|
||||||
; Help mode starts here
|
; Help mode starts here
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
" Version: $Revision$
|
" Version: $Revision$
|
||||||
"
|
"
|
||||||
" Licence: The CMake license applies to this file. See
|
" Licence: The CMake license applies to this file. See
|
||||||
" http://www.cmake.org/licensing
|
" https://cmake.org/licensing
|
||||||
" This implies that distribution with Vim is allowed
|
" This implies that distribution with Vim is allowed
|
||||||
|
|
||||||
" For version 5.x: Clear all syntax items
|
" For version 5.x: Clear all syntax items
|
||||||
|
@ -22,7 +22,9 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
|||||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
|
if(CMake_INSTALL_DEPENDENCIES)
|
||||||
|
include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
|
||||||
@ -65,6 +67,61 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Components
|
||||||
|
if(CMake_INSTALL_COMPONENTS)
|
||||||
|
set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack)
|
||||||
|
if(APPLE)
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmakexbuild)
|
||||||
|
endif()
|
||||||
|
if(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME)
|
||||||
|
set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME
|
||||||
|
${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})
|
||||||
|
else()
|
||||||
|
set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME Unspecified)
|
||||||
|
endif()
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL ${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME})
|
||||||
|
string(TOUPPER "${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME}"
|
||||||
|
_CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME)
|
||||||
|
if(BUILD_CursesDialog)
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL ccmake)
|
||||||
|
endif()
|
||||||
|
if(BUILD_QtDialog)
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-gui)
|
||||||
|
set(_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES "set(CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES
|
||||||
|
\"LGPLv2.1\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt\")")
|
||||||
|
endif()
|
||||||
|
if(SPHINX_MAN)
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-man)
|
||||||
|
endif()
|
||||||
|
if(SPHINX_HTML)
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-html)
|
||||||
|
endif()
|
||||||
|
if(SPHINX_SINGLEHTML)
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-singlehtml)
|
||||||
|
endif()
|
||||||
|
if(SPHINX_QTHELP)
|
||||||
|
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp)
|
||||||
|
endif()
|
||||||
|
set(_CPACK_IFW_COMPONENTS_CONFIGURATION "
|
||||||
|
# Components
|
||||||
|
set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\")
|
||||||
|
set(CPACK_COMPONENTS_GROUPING IGNORE)
|
||||||
|
")
|
||||||
|
else()
|
||||||
|
if(BUILD_QtDialog AND CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
|
||||||
|
set(_CPACK_IFW_ADDITIONAL_LICENSES
|
||||||
|
"\"LGPLv2.1\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt\"")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Components scripts configuration
|
||||||
|
foreach(_script
|
||||||
|
CMake
|
||||||
|
CMake.Documentation.SphinxHTML)
|
||||||
|
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in"
|
||||||
|
"${CMake_BINARY_DIR}/${_script}.qs" @ONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES Windows)
|
if(${CMAKE_SYSTEM_NAME} MATCHES Windows)
|
||||||
set(_CPACK_IFW_PACKAGE_ICON
|
set(_CPACK_IFW_PACKAGE_ICON
|
||||||
"set(CPACK_IFW_PACKAGE_ICON \"${CMake_SOURCE_DIR}/Source/QtDialog/CMakeSetup.ico\")")
|
"set(CPACK_IFW_PACKAGE_ICON \"${CMake_SOURCE_DIR}/Source/QtDialog/CMakeSetup.ico\")")
|
||||||
@ -78,9 +135,13 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
|||||||
"${CMake_BINARY_DIR}/installscript.qs" @ONLY
|
"${CMake_BINARY_DIR}/installscript.qs" @ONLY
|
||||||
)
|
)
|
||||||
install(FILES "${CMake_SOURCE_DIR}/Source/QtIFW/cmake.org.html"
|
install(FILES "${CMake_SOURCE_DIR}/Source/QtIFW/cmake.org.html"
|
||||||
DESTINATION "."
|
DESTINATION "${CMAKE_DOC_DIR}"
|
||||||
)
|
)
|
||||||
set(_CPACK_IFW_PACKAGE_SCRIPT "set(CPACK_IFW_COMPONENT_GROUP_CMAKE_SCRIPT \"${CMake_BINARY_DIR}/installscript.qs\")")
|
if(CMake_INSTALL_COMPONENTS)
|
||||||
|
set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/CMake.qs")
|
||||||
|
else()
|
||||||
|
set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/installscript.qs")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
||||||
|
@ -14,14 +14,14 @@ if(CPACK_GENERATOR MATCHES "NSIS")
|
|||||||
# tell cpack to create links to the doc files
|
# tell cpack to create links to the doc files
|
||||||
set(CPACK_NSIS_MENU_LINKS
|
set(CPACK_NSIS_MENU_LINKS
|
||||||
"@CMAKE_DOC_DIR@/html/index.html" "CMake Documentation"
|
"@CMAKE_DOC_DIR@/html/index.html" "CMake Documentation"
|
||||||
"http://www.cmake.org" "CMake Web Site"
|
"https://cmake.org" "CMake Web Site"
|
||||||
)
|
)
|
||||||
# Use the icon from cmake-gui for add-remove programs
|
# Use the icon from cmake-gui for add-remove programs
|
||||||
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\cmake-gui.exe")
|
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\cmake-gui.exe")
|
||||||
|
|
||||||
set(CPACK_NSIS_PACKAGE_NAME "@CPACK_NSIS_PACKAGE_NAME@")
|
set(CPACK_NSIS_PACKAGE_NAME "@CPACK_NSIS_PACKAGE_NAME@")
|
||||||
set(CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, a cross-platform, open-source build system")
|
set(CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, a cross-platform, open-source build system")
|
||||||
set(CPACK_NSIS_HELP_LINK "http://www.cmake.org")
|
set(CPACK_NSIS_HELP_LINK "https://cmake.org")
|
||||||
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
|
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
|
||||||
set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
|
set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
|
||||||
set(CPACK_NSIS_MODIFY_PATH ON)
|
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||||
@ -32,29 +32,141 @@ endif()
|
|||||||
include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)
|
include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)
|
||||||
|
|
||||||
if(CPACK_GENERATOR MATCHES "IFW")
|
if(CPACK_GENERATOR MATCHES "IFW")
|
||||||
|
|
||||||
# Installer configuration
|
# Installer configuration
|
||||||
set(CPACK_IFW_PACKAGE_TITLE "CMake Build Tool")
|
set(CPACK_IFW_PACKAGE_TITLE "CMake Build Tool")
|
||||||
set(CPACK_IFW_PRODUCT_URL "http://www.cmake.org")
|
set(CPACK_IFW_PRODUCT_URL "https://cmake.org")
|
||||||
@_CPACK_IFW_PACKAGE_ICON@
|
@_CPACK_IFW_PACKAGE_ICON@
|
||||||
set(CPACK_IFW_PACKAGE_WINDOW_ICON
|
set(CPACK_IFW_PACKAGE_WINDOW_ICON
|
||||||
"@CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup128.png")
|
"@CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup128.png")
|
||||||
set(CPACK_IFW_PACKAGE_CONTROL_SCRIPT
|
set(CPACK_IFW_PACKAGE_CONTROL_SCRIPT
|
||||||
"@CMake_SOURCE_DIR@/Source/QtIFW/controlscript.qs")
|
"@CMake_SOURCE_DIR@/Source/QtIFW/controlscript.qs")
|
||||||
|
|
||||||
# Uninstaller configuration
|
# Uninstaller configuration
|
||||||
set(CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME "cmake-maintenance")
|
set(CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME "cmake-maintenance")
|
||||||
|
@_CPACK_IFW_COMPONENTS_CONFIGURATION@
|
||||||
|
# Unspecified
|
||||||
|
set(CPACK_IFW_COMPONENT_@_CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME@_VERSION
|
||||||
|
"@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
# Package configuration group
|
# Package configuration group
|
||||||
set(CPACK_IFW_PACKAGE_GROUP CMake)
|
set(CPACK_IFW_PACKAGE_GROUP CMake)
|
||||||
|
|
||||||
# Group configuration
|
# Group configuration
|
||||||
|
|
||||||
|
# CMake
|
||||||
set(CPACK_COMPONENT_GROUP_CMAKE_DISPLAY_NAME
|
set(CPACK_COMPONENT_GROUP_CMAKE_DISPLAY_NAME
|
||||||
"@CPACK_PACKAGE_NAME@")
|
"@CPACK_PACKAGE_NAME@")
|
||||||
set(CPACK_COMPONENT_GROUP_CMAKE_DESCRIPTION
|
set(CPACK_COMPONENT_GROUP_CMAKE_DESCRIPTION
|
||||||
"@CPACK_PACKAGE_DESCRIPTION_SUMMARY@")
|
"@CPACK_PACKAGE_DESCRIPTION_SUMMARY@")
|
||||||
# IFW group configuration
|
|
||||||
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_VERSION
|
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_VERSION
|
||||||
"@_CPACK_IFW_PACKAGE_VERSION@")
|
"@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_LICENSES
|
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_LICENSES
|
||||||
"@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@")
|
"@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@"
|
||||||
@_CPACK_IFW_PACKAGE_SCRIPT@
|
@_CPACK_IFW_ADDITIONAL_LICENSES@)
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_SCRIPT "@_CPACK_IFW_PACKAGE_SCRIPT@")
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_PRIORITY 100)
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
set(CPACK_COMPONENT_GROUP_TOOLS_DISPLAY_NAME "Command-Line Tools")
|
||||||
|
set(CPACK_COMPONENT_GROUP_TOOLS_DESCRIPTION
|
||||||
|
"Command-Line Tools: cmake, ctest and cpack")
|
||||||
|
set(CPACK_COMPONENT_GROUP_TOOLS_PARENT_GROUP CMake)
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_TOOLS_PRIORITY 90)
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_TOOLS_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_CMAKE_DISPLAY_NAME "cmake")
|
||||||
|
set(CPACK_COMPONENT_CMAKE_DESCRIPTION
|
||||||
|
"The \"cmake\" executable is the CMake command-line interface")
|
||||||
|
set(CPACK_COMPONENT_CMAKE_REQUIRED TRUE)
|
||||||
|
set(CPACK_COMPONENT_CMAKE_GROUP Tools)
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKE_NAME "CMake")
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKE_PRIORITY 89)
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKE_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_CTEST_DISPLAY_NAME "ctest")
|
||||||
|
set(CPACK_COMPONENT_CTEST_DESCRIPTION
|
||||||
|
"The \"ctest\" executable is the CMake test driver program")
|
||||||
|
set(CPACK_COMPONENT_CTEST_REQUIRED TRUE)
|
||||||
|
set(CPACK_COMPONENT_CTEST_GROUP Tools)
|
||||||
|
set(CPACK_IFW_COMPONENT_CTEST_NAME "CTest")
|
||||||
|
set(CPACK_IFW_COMPONENT_CTEST_PRIORITY 88)
|
||||||
|
set(CPACK_IFW_COMPONENT_CTEST_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_CPACK_DISPLAY_NAME "cpack")
|
||||||
|
set(CPACK_COMPONENT_CPACK_DESCRIPTION
|
||||||
|
"The \"cpack\" executable is the CMake packaging program")
|
||||||
|
set(CPACK_COMPONENT_CPACK_REQUIRED TRUE)
|
||||||
|
set(CPACK_COMPONENT_CPACK_GROUP Tools)
|
||||||
|
set(CPACK_IFW_COMPONENT_CPACK_NAME "CPack")
|
||||||
|
set(CPACK_IFW_COMPONENT_CPACK_PRIORITY 87)
|
||||||
|
set(CPACK_IFW_COMPONENT_CPACK_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_CMAKEXBUILD_DISPLAY_NAME "cmakexbuild")
|
||||||
|
set(CPACK_COMPONENT_CMAKEXBUILD_DESCRIPTION
|
||||||
|
"The \"cmakexbuild\" executable is a wrapper program for \"xcodebuild\"")
|
||||||
|
set(CPACK_COMPONENT_CMAKEXBUILD_REQUIRED TRUE)
|
||||||
|
set(CPACK_COMPONENT_CMAKEXBUILD_GROUP Tools)
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_NAME "CMakeXBuild")
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_PRIORITY 86)
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
# Dialogs
|
||||||
|
set(CPACK_COMPONENT_GROUP_DIALOGS_DISPLAY_NAME "Interactive Dialogs")
|
||||||
|
set(CPACK_COMPONENT_GROUP_DIALOGS_DESCRIPTION
|
||||||
|
"Interactive Dialogs with Console and GUI interfaces")
|
||||||
|
set(CPACK_COMPONENT_GROUP_DIALOGS_PARENT_GROUP CMake)
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_DIALOGS_PRIORITY 80)
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_DIALOGS_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_CMAKE-GUI_DISPLAY_NAME "cmake-gui")
|
||||||
|
set(CPACK_COMPONENT_CMAKE-GUI_GROUP Dialogs)
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKE-GUI_NAME "QtGUI")
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKE-GUI_SCRIPT
|
||||||
|
"@CMake_SOURCE_DIR@/Source/QtIFW/CMake.Dialogs.QtGUI.qs")
|
||||||
|
set(CPACK_IFW_COMPONENT_CMAKE-GUI_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
@_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES@
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_CCMAKE_DISPLAY_NAME "ccmake")
|
||||||
|
set(CPACK_COMPONENT_CCMAKE_GROUP Dialogs)
|
||||||
|
set(CPACK_IFW_COMPONENT_CCMAKE_NAME "CursesGUI")
|
||||||
|
set(CPACK_IFW_COMPONENT_CCMAKE_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
set(CPACK_COMPONENT_GROUP_DOCUMENTATION_DISPLAY_NAME "Documentation")
|
||||||
|
set(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
|
||||||
|
"CMake Documentation in different formats (html, man, qch)")
|
||||||
|
set(CPACK_COMPONENT_GROUP_DOCUMENTATION_PARENT_GROUP CMake)
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_DOCUMENTATION_PRIORITY 60)
|
||||||
|
set(CPACK_IFW_COMPONENT_GROUP_DOCUMENTATION_VERSION
|
||||||
|
"@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_SPHINX-MAN_DISPLAY_NAME "man")
|
||||||
|
set(CPACK_COMPONENT_SPHINX-MAN_GROUP Documentation)
|
||||||
|
set(CPACK_COMPONENT_SPHINX-MAN_DISABLED TRUE)
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-MAN_NAME "SphinxMan")
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-MAN_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_SPHINX-HTML_DISPLAY_NAME "HTML")
|
||||||
|
set(CPACK_COMPONENT_SPHINX-HTML_GROUP Documentation)
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-HTML_NAME "SphinxHTML")
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-HTML_SCRIPT
|
||||||
|
"@CMake_BINARY_DIR@/CMake.Documentation.SphinxHTML.qs")
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-HTML_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_SPHINX-SINGLEHTML_DISPLAY_NAME "Single HTML")
|
||||||
|
set(CPACK_COMPONENT_SPHINX-SINGLEHTML_GROUP Documentation)
|
||||||
|
set(CPACK_COMPONENT_SPHINX-SINGLEHTML_DISABLED TRUE)
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-SINGLEHTML_NAME "SphinxSingleHTML")
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-SINGLEHTML_VERSION
|
||||||
|
"@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_SPHINX-QTHELP_DISPLAY_NAME "Qt Compressed Help")
|
||||||
|
set(CPACK_COMPONENT_SPHINX-QTHELP_GROUP Documentation)
|
||||||
|
set(CPACK_COMPONENT_SPHINX-QTHELP_DISABLED TRUE)
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_NAME "SphinxQtHelp")
|
||||||
|
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CPACK_GENERATOR MATCHES "CygwinSource")
|
if(CPACK_GENERATOR MATCHES "CygwinSource")
|
||||||
@ -92,7 +204,7 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX")
|
|||||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${patch}")
|
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${patch}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "http://www.cmake.org")
|
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "https://cmake.org")
|
||||||
|
|
||||||
set(CPACK_WIX_PROPERTY_ARPCONTACT "@CPACK_PACKAGE_CONTACT@")
|
set(CPACK_WIX_PROPERTY_ARPCONTACT "@CPACK_PACKAGE_CONTACT@")
|
||||||
|
|
||||||
|
@ -13,6 +13,9 @@ cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
|
|||||||
if(POLICY CMP0025)
|
if(POLICY CMP0025)
|
||||||
cmake_policy(SET CMP0025 NEW)
|
cmake_policy(SET CMP0025 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
if(POLICY CMP0053)
|
||||||
|
cmake_policy(SET CMP0053 NEW)
|
||||||
|
endif()
|
||||||
project(CMake)
|
project(CMake)
|
||||||
|
|
||||||
if(CMAKE_BOOTSTRAP)
|
if(CMAKE_BOOTSTRAP)
|
||||||
@ -38,7 +41,12 @@ endif()
|
|||||||
|
|
||||||
# Use most-recent available language dialects with GNU and Clang
|
# Use most-recent available language dialects with GNU and Clang
|
||||||
if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD)
|
if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD)
|
||||||
set(CMAKE_C_STANDARD 11)
|
include(${CMake_SOURCE_DIR}/Source/Checks/cm_c11_thread_local.cmake)
|
||||||
|
if(NOT CMake_C11_THREAD_LOCAL_BROKEN)
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
else()
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
|
if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
|
||||||
include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake)
|
include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake)
|
||||||
@ -59,6 +67,22 @@ if(CMAKE_ENCODING_UTF8)
|
|||||||
set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
|
set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# option to use COMPONENT with install command
|
||||||
|
option(CMake_INSTALL_COMPONENTS "Using components when installing" OFF)
|
||||||
|
mark_as_advanced(CMake_INSTALL_COMPONENTS)
|
||||||
|
macro(CMake_OPTIONAL_COMPONENT NAME)
|
||||||
|
if(CMake_INSTALL_COMPONENTS)
|
||||||
|
set(COMPONENT COMPONENT ${NAME})
|
||||||
|
else()
|
||||||
|
set(COMPONENT)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# option to disable installing 3rd-party dependencies
|
||||||
|
option(CMake_INSTALL_DEPENDENCIES
|
||||||
|
"Whether to install 3rd-party runtime dependencies" OFF)
|
||||||
|
mark_as_advanced(CMake_INSTALL_DEPENDENCIES)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# a macro to deal with system libraries, implemented as a macro
|
# a macro to deal with system libraries, implemented as a macro
|
||||||
# simply to improve readability of the main script
|
# simply to improve readability of the main script
|
||||||
@ -128,17 +152,6 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
|
|||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
|
||||||
set(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
|
|
||||||
if(WIN32 AND NOT UNIX AND NOT MINGW)
|
|
||||||
set(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# a macro to determine the generator and ctest executable to use
|
# a macro to determine the generator and ctest executable to use
|
||||||
# for testing. Simply to improve readability of the main script.
|
# for testing. Simply to improve readability of the main script.
|
||||||
|
@ -14,7 +14,7 @@ Please subscribe and post to the `CMake Developers List`_ to offer
|
|||||||
contributions. Regular and productive contributors may be invited
|
contributions. Regular and productive contributors may be invited
|
||||||
to gain direct push access.
|
to gain direct push access.
|
||||||
|
|
||||||
.. _`CMake Developers List`: http://www.cmake.org/mailman/listinfo/cmake-developers
|
.. _`CMake Developers List`: https://cmake.org/mailman/listinfo/cmake-developers
|
||||||
|
|
||||||
Patches
|
Patches
|
||||||
=======
|
=======
|
||||||
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
We do not require any formal copyright assignment or contributor license
|
We do not require any formal copyright assignment or contributor license
|
||||||
agreement. Any contributions intentionally sent upstream are presumed
|
agreement. Any contributions intentionally sent upstream are presumed
|
||||||
to be offerred under terms of the OSI-approved BSD 3-clause License.
|
to be offered under terms of the OSI-approved BSD 3-clause License.
|
||||||
See `Copyright.txt`_ for details.
|
See `Copyright.txt`_ for details.
|
||||||
|
|
||||||
.. _`Copyright.txt`: Copyright.txt
|
.. _`Copyright.txt`: Copyright.txt
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
set(CTEST_CUSTOM_ERROR_MATCH
|
list(APPEND CTEST_CUSTOM_ERROR_MATCH
|
||||||
${CTEST_CUSTOM_ERROR_MATCH}
|
|
||||||
"ERROR:")
|
"ERROR:")
|
||||||
|
|
||||||
set(CTEST_CUSTOM_WARNING_EXCEPTION
|
list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||||
${CTEST_CUSTOM_WARNING_EXCEPTION}
|
|
||||||
"xtree.[0-9]+. : warning C4702: unreachable code"
|
"xtree.[0-9]+. : warning C4702: unreachable code"
|
||||||
"warning LNK4221"
|
"warning LNK4221"
|
||||||
"warning LNK4204" # Occurs by race condition with objects in small libs
|
"warning LNK4204" # Occurs by race condition with objects in small libs
|
||||||
@ -32,6 +30,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
|
|||||||
"remark: .*LOOP WAS VECTORIZED"
|
"remark: .*LOOP WAS VECTORIZED"
|
||||||
"warning .980: wrong number of actual arguments to intrinsic function .std::basic_"
|
"warning .980: wrong number of actual arguments to intrinsic function .std::basic_"
|
||||||
"LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF"
|
"LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF"
|
||||||
|
"LINK : warning LNK4089: all references to.*CRYPT32.dll.*discarded by /OPT:REF"
|
||||||
"LINK : warning LNK4089: all references to.*PSAPI.DLL.*discarded by /OPT:REF"
|
"LINK : warning LNK4089: all references to.*PSAPI.DLL.*discarded by /OPT:REF"
|
||||||
"LINK : warning LNK4089: all references to.*RPCRT4.dll.*discarded by /OPT:REF"
|
"LINK : warning LNK4089: all references to.*RPCRT4.dll.*discarded by /OPT:REF"
|
||||||
"LINK : warning LNK4089: all references to.*SHELL32.dll.*discarded by /OPT:REF"
|
"LINK : warning LNK4089: all references to.*SHELL32.dll.*discarded by /OPT:REF"
|
||||||
@ -83,22 +82,18 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
|
if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
|
||||||
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
|
list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
|
||||||
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
|
|
||||||
"XCode"
|
"XCode"
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
|
if(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
|
||||||
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
|
list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
|
||||||
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
|
|
||||||
"Kdevelop"
|
"Kdevelop"
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
|
list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
|
||||||
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
|
|
||||||
|
|
||||||
# Exclude kwsys files from coverage results. They are reported
|
# Exclude kwsys files from coverage results. They are reported
|
||||||
# (with better coverage results) on kwsys dashboards...
|
# (with better coverage results) on kwsys dashboards...
|
||||||
"/Source/(cm|kw)sys/"
|
"/Source/(cm|kw)sys/"
|
||||||
@ -109,3 +104,7 @@ set(CTEST_CUSTOM_COVERAGE_EXCLUDE
|
|||||||
# Exclude Qt source files from coverage results:
|
# Exclude Qt source files from coverage results:
|
||||||
"[A-Za-z]./[Qq]t/qt-.+-opensource-src"
|
"[A-Za-z]./[Qq]t/qt-.+-opensource-src"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE
|
||||||
|
kwsys.testProcess-10 # See Source/kwsys/CTestCustom.cmake.in
|
||||||
|
)
|
||||||
|
@ -33,36 +33,47 @@ and the search will not be repeated unless the variable is cleared.
|
|||||||
If nothing is found, the result will be
|
If nothing is found, the result will be
|
||||||
``<VAR>-NOTFOUND``, and the search will be attempted again the
|
``<VAR>-NOTFOUND``, and the search will be attempted again the
|
||||||
next time |FIND_XXX| is invoked with the same variable.
|
next time |FIND_XXX| is invoked with the same variable.
|
||||||
The name of the |SEARCH_XXX| that
|
|
||||||
is searched for is specified by the names listed
|
|
||||||
after the NAMES argument. Additional search locations
|
|
||||||
can be specified after the PATHS argument. If ENV var is
|
|
||||||
found in the HINTS or PATHS section the environment variable var
|
|
||||||
will be read and converted from a system environment variable to
|
|
||||||
a cmake style list of paths. For example ENV PATH would be a way
|
|
||||||
to list the system path variable. The argument
|
|
||||||
after DOC will be used for the documentation string in
|
|
||||||
the cache.
|
|
||||||
PATH_SUFFIXES specifies additional subdirectories to check below
|
|
||||||
each search path.
|
|
||||||
|
|
||||||
If NO_DEFAULT_PATH is specified, then no additional paths are
|
Options include:
|
||||||
|
|
||||||
|
``NAMES``
|
||||||
|
Specify one or more possible names for the |SEARCH_XXX|.
|
||||||
|
|
||||||
|
When using this to specify names with and without a version
|
||||||
|
suffix, we recommend specifying the unversioned name first
|
||||||
|
so that locally-built packages can be found before those
|
||||||
|
provided by distributions.
|
||||||
|
|
||||||
|
``HINTS``, ``PATHS``
|
||||||
|
Specify directories to search in addition to the default locations.
|
||||||
|
The ``ENV var`` sub-option reads paths from a system environment
|
||||||
|
variable.
|
||||||
|
|
||||||
|
``PATH_SUFFIXES``
|
||||||
|
Specify additional subdirectories to check below each directory
|
||||||
|
location otherwise considered.
|
||||||
|
|
||||||
|
``DOC``
|
||||||
|
Specify the documentation string for the ``<VAR>`` cache entry.
|
||||||
|
|
||||||
|
If ``NO_DEFAULT_PATH`` is specified, then no additional paths are
|
||||||
added to the search.
|
added to the search.
|
||||||
If NO_DEFAULT_PATH is not specified, the search process is as follows:
|
If ``NO_DEFAULT_PATH`` is not specified, the search process is as follows:
|
||||||
|
|
||||||
.. |CMAKE_PREFIX_PATH_XXX_SUBDIR| replace::
|
.. |CMAKE_PREFIX_PATH_XXX_SUBDIR| replace::
|
||||||
<prefix>/|XXX_SUBDIR| for each <prefix> in CMAKE_PREFIX_PATH
|
|prefix_XXX_SUBDIR| for each ``<prefix>`` in :variable:`CMAKE_PREFIX_PATH`
|
||||||
|
|
||||||
.. |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR| replace::
|
.. |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR| replace::
|
||||||
<prefix>/|XXX_SUBDIR| for each <prefix>/[s]bin in PATH, and
|
|prefix_XXX_SUBDIR| for each ``<prefix>/[s]bin`` in ``PATH``, and
|
||||||
<entry>/|XXX_SUBDIR| for other entries in PATH
|
|entry_XXX_SUBDIR| for other entries in ``PATH``
|
||||||
|
|
||||||
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR| replace::
|
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR| replace::
|
||||||
<prefix>/|XXX_SUBDIR| for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH
|
|prefix_XXX_SUBDIR| for each ``<prefix>`` in
|
||||||
|
:variable:`CMAKE_SYSTEM_PREFIX_PATH`
|
||||||
|
|
||||||
1. Search paths specified in cmake-specific cache variables.
|
1. Search paths specified in cmake-specific cache variables.
|
||||||
These are intended to be used on the command line with a -DVAR=value.
|
These are intended to be used on the command line with a ``-DVAR=value``.
|
||||||
This can be skipped if NO_CMAKE_PATH is passed.
|
This can be skipped if ``NO_CMAKE_PATH`` is passed.
|
||||||
|
|
||||||
* |CMAKE_PREFIX_PATH_XXX|
|
* |CMAKE_PREFIX_PATH_XXX|
|
||||||
* |CMAKE_XXX_PATH|
|
* |CMAKE_XXX_PATH|
|
||||||
@ -70,24 +81,24 @@ If NO_DEFAULT_PATH is not specified, the search process is as follows:
|
|||||||
|
|
||||||
2. Search paths specified in cmake-specific environment variables.
|
2. Search paths specified in cmake-specific environment variables.
|
||||||
These are intended to be set in the user's shell configuration.
|
These are intended to be set in the user's shell configuration.
|
||||||
This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
|
This can be skipped if ``NO_CMAKE_ENVIRONMENT_PATH`` is passed.
|
||||||
|
|
||||||
* |CMAKE_PREFIX_PATH_XXX|
|
* |CMAKE_PREFIX_PATH_XXX|
|
||||||
* |CMAKE_XXX_PATH|
|
* |CMAKE_XXX_PATH|
|
||||||
* |CMAKE_XXX_MAC_PATH|
|
* |CMAKE_XXX_MAC_PATH|
|
||||||
|
|
||||||
3. Search the paths specified by the HINTS option.
|
3. Search the paths specified by the ``HINTS`` option.
|
||||||
These should be paths computed by system introspection, such as a
|
These should be paths computed by system introspection, such as a
|
||||||
hint provided by the location of another item already found.
|
hint provided by the location of another item already found.
|
||||||
Hard-coded guesses should be specified with the PATHS option.
|
Hard-coded guesses should be specified with the ``PATHS`` option.
|
||||||
|
|
||||||
4. Search the standard system environment variables.
|
4. Search the standard system environment variables.
|
||||||
This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
|
This can be skipped if ``NO_SYSTEM_ENVIRONMENT_PATH`` is an argument.
|
||||||
|
|
||||||
* |SYSTEM_ENVIRONMENT_PATH_XXX|
|
* |SYSTEM_ENVIRONMENT_PATH_XXX|
|
||||||
|
|
||||||
5. Search cmake variables defined in the Platform files
|
5. Search cmake variables defined in the Platform files
|
||||||
for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH
|
for the current system. This can be skipped if ``NO_CMAKE_SYSTEM_PATH``
|
||||||
is passed.
|
is passed.
|
||||||
|
|
||||||
* |CMAKE_SYSTEM_PREFIX_PATH_XXX|
|
* |CMAKE_SYSTEM_PREFIX_PATH_XXX|
|
||||||
@ -100,6 +111,9 @@ If NO_DEFAULT_PATH is not specified, the search process is as follows:
|
|||||||
|
|
||||||
.. |FIND_ARGS_XXX| replace:: <VAR> NAMES name
|
.. |FIND_ARGS_XXX| replace:: <VAR> NAMES name
|
||||||
|
|
||||||
.. include:: FIND_XXX_MAC.txt
|
On OS X the :variable:`CMAKE_FIND_FRAMEWORK` and
|
||||||
|
:variable:`CMAKE_FIND_APPBUNDLE` variables determine the order of
|
||||||
|
preference between Apple-style and unix-style package components.
|
||||||
|
|
||||||
.. include:: FIND_XXX_ROOT.txt
|
.. include:: FIND_XXX_ROOT.txt
|
||||||
.. include:: FIND_XXX_ORDER.txt
|
.. include:: FIND_XXX_ORDER.txt
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
On Darwin or systems supporting OS X Frameworks, the cmake variable
|
|
||||||
CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
|
|
||||||
|
|
||||||
* FIRST: Try to find frameworks before standard libraries or headers.
|
|
||||||
This is the default on Darwin.
|
|
||||||
|
|
||||||
* LAST: Try to find frameworks after standard libraries or headers.
|
|
||||||
|
|
||||||
* ONLY: Only try to find frameworks.
|
|
||||||
|
|
||||||
* NEVER: Never try to find frameworks.
|
|
||||||
|
|
||||||
On Darwin or systems supporting OS X Application Bundles, the cmake
|
|
||||||
variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the
|
|
||||||
following:
|
|
||||||
|
|
||||||
* FIRST: Try to find application bundles before standard programs.
|
|
||||||
This is the default on Darwin.
|
|
||||||
|
|
||||||
* LAST: Try to find application bundles after standard programs.
|
|
||||||
|
|
||||||
* ONLY: Only try to find application bundles.
|
|
||||||
|
|
||||||
* NEVER: Never try to find application bundles.
|
|
@ -16,8 +16,14 @@ search there too. By default at first the directories listed in
|
|||||||
directory is searched, and then the non-rooted directories will be
|
directory is searched, and then the non-rooted directories will be
|
||||||
searched. The default behavior can be adjusted by setting
|
searched. The default behavior can be adjusted by setting
|
||||||
|CMAKE_FIND_ROOT_PATH_MODE_XXX|. This behavior can be manually
|
|CMAKE_FIND_ROOT_PATH_MODE_XXX|. This behavior can be manually
|
||||||
overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH
|
overridden on a per-call basis using options:
|
||||||
the search order will be as described above. If
|
|
||||||
NO_CMAKE_FIND_ROOT_PATH is used then :variable:`CMAKE_FIND_ROOT_PATH` will not be
|
``CMAKE_FIND_ROOT_PATH_BOTH``
|
||||||
used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted
|
Search in the order described above.
|
||||||
directories and directories below :variable:`CMAKE_STAGING_PREFIX` will be searched.
|
|
||||||
|
``NO_CMAKE_FIND_ROOT_PATH``
|
||||||
|
Do not use the :variable:`CMAKE_FIND_ROOT_PATH` variable.
|
||||||
|
|
||||||
|
``ONLY_CMAKE_FIND_ROOT_PATH``
|
||||||
|
Search only the re-rooted directories and directories below
|
||||||
|
:variable:`CMAKE_STAGING_PREFIX`.
|
||||||
|
@ -14,7 +14,7 @@ files listed in the command invocation. The ``<name>`` corresponds to the
|
|||||||
logical target name and must be globally unique within a project. The
|
logical target name and must be globally unique within a project. The
|
||||||
actual file name of the executable built is constructed based on
|
actual file name of the executable built is constructed based on
|
||||||
conventions of the native platform (such as ``<name>.exe`` or just
|
conventions of the native platform (such as ``<name>.exe`` or just
|
||||||
``<name>``.
|
``<name>``).
|
||||||
|
|
||||||
By default the executable file will be created in the build tree
|
By default the executable file will be created in the build tree
|
||||||
directory corresponding to the source tree directory in which the
|
directory corresponding to the source tree directory in which the
|
||||||
|
@ -33,6 +33,14 @@ type is ``STATIC`` or ``SHARED`` based on whether the current value of the
|
|||||||
variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and
|
variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and
|
||||||
``MODULE`` libraries the :prop_tgt:`POSITION_INDEPENDENT_CODE` target
|
``MODULE`` libraries the :prop_tgt:`POSITION_INDEPENDENT_CODE` target
|
||||||
property is set to ``ON`` automatically.
|
property is set to ``ON`` automatically.
|
||||||
|
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
|
||||||
|
target property to create an OS X Framework.
|
||||||
|
|
||||||
|
If a library does not export any symbols, it must not be declared as a
|
||||||
|
``SHARED`` library. For example, a Windows resource DLL or a managed C++/CLI
|
||||||
|
DLL that exports no unmanaged symbols would need to be a ``MODULE`` library.
|
||||||
|
This is because CMake expects a ``SHARED`` library to always have an
|
||||||
|
associated import library on Windows.
|
||||||
|
|
||||||
By default the library file will be created in the build tree directory
|
By default the library file will be created in the build tree directory
|
||||||
corresponding to the source tree directory in which the command was
|
corresponding to the source tree directory in which the command was
|
||||||
|
@ -12,23 +12,23 @@ Add a subdirectory to the build. The source_dir specifies the
|
|||||||
directory in which the source CMakeLists.txt and code files are
|
directory in which the source CMakeLists.txt and code files are
|
||||||
located. If it is a relative path it will be evaluated with respect
|
located. If it is a relative path it will be evaluated with respect
|
||||||
to the current directory (the typical usage), but it may also be an
|
to the current directory (the typical usage), but it may also be an
|
||||||
absolute path. The binary_dir specifies the directory in which to
|
absolute path. The ``binary_dir`` specifies the directory in which to
|
||||||
place the output files. If it is a relative path it will be evaluated
|
place the output files. If it is a relative path it will be evaluated
|
||||||
with respect to the current output directory, but it may also be an
|
with respect to the current output directory, but it may also be an
|
||||||
absolute path. If binary_dir is not specified, the value of
|
absolute path. If ``binary_dir`` is not specified, the value of
|
||||||
source_dir, before expanding any relative path, will be used (the
|
``source_dir``, before expanding any relative path, will be used (the
|
||||||
typical usage). The CMakeLists.txt file in the specified source
|
typical usage). The CMakeLists.txt file in the specified source
|
||||||
directory will be processed immediately by CMake before processing in
|
directory will be processed immediately by CMake before processing in
|
||||||
the current input file continues beyond this command.
|
the current input file continues beyond this command.
|
||||||
|
|
||||||
If the EXCLUDE_FROM_ALL argument is provided then targets in the
|
If the ``EXCLUDE_FROM_ALL`` argument is provided then targets in the
|
||||||
subdirectory will not be included in the ALL target of the parent
|
subdirectory will not be included in the ``ALL`` target of the parent
|
||||||
directory by default, and will be excluded from IDE project files.
|
directory by default, and will be excluded from IDE project files.
|
||||||
Users must explicitly build targets in the subdirectory. This is
|
Users must explicitly build targets in the subdirectory. This is
|
||||||
meant for use when the subdirectory contains a separate part of the
|
meant for use when the subdirectory contains a separate part of the
|
||||||
project that is useful but not necessary, such as a set of examples.
|
project that is useful but not necessary, such as a set of examples.
|
||||||
Typically the subdirectory should contain its own project() command
|
Typically the subdirectory should contain its own :command:`project`
|
||||||
invocation so that a full build system will be generated in the
|
command invocation so that a full build system will be generated in the
|
||||||
subdirectory (such as a VS IDE solution file). Note that inter-target
|
subdirectory (such as a VS IDE solution file). Note that inter-target
|
||||||
dependencies supercede this exclusion. If a target built by the
|
dependencies supercede this exclusion. If a target built by the
|
||||||
parent project depends on a target in the subdirectory, the dependee
|
parent project depends on a target in the subdirectory, the dependee
|
||||||
|
@ -28,6 +28,13 @@ quotes, or other characters special in CMake syntax. The options are:
|
|||||||
directory set to the build directory corresponding to the
|
directory set to the build directory corresponding to the
|
||||||
current source directory.
|
current source directory.
|
||||||
|
|
||||||
|
The given test command is expected to exit with code ``0`` to pass and
|
||||||
|
non-zero to fail, or vice-versa if the :prop_test:`WILL_FAIL` test
|
||||||
|
property is set. Any output written to stdout or stderr will be
|
||||||
|
captured by :manual:`ctest(1)` but does not affect the pass/fail status
|
||||||
|
unless the :prop_test:`PASS_REGULAR_EXPRESSION` or
|
||||||
|
:prop_test:`FAIL_REGULAR_EXPRESSION` test property is used.
|
||||||
|
|
||||||
The ``COMMAND`` and ``WORKING_DIRECTORY`` options may use "generator
|
The ``COMMAND`` and ``WORKING_DIRECTORY`` options may use "generator
|
||||||
expressions" with the syntax ``$<...>``. See the
|
expressions" with the syntax ``$<...>``. See the
|
||||||
:manual:`cmake-generator-expressions(7)` manual for available expressions.
|
:manual:`cmake-generator-expressions(7)` manual for available expressions.
|
||||||
|
@ -8,7 +8,7 @@ Find all source files in a directory.
|
|||||||
aux_source_directory(<dir> <variable>)
|
aux_source_directory(<dir> <variable>)
|
||||||
|
|
||||||
Collects the names of all the source files in the specified directory
|
Collects the names of all the source files in the specified directory
|
||||||
and stores the list in the <variable> provided. This command is
|
and stores the list in the ``<variable>`` provided. This command is
|
||||||
intended to be used by projects that use explicit template
|
intended to be used by projects that use explicit template
|
||||||
instantiation. Template instantiation files can be stored in a
|
instantiation. Template instantiation files can be stored in a
|
||||||
"Templates" subdirectory and collected automatically using this
|
"Templates" subdirectory and collected automatically using this
|
||||||
|
@ -3,7 +3,7 @@ build_name
|
|||||||
|
|
||||||
Disallowed. See CMake Policy :policy:`CMP0036`.
|
Disallowed. See CMake Policy :policy:`CMP0036`.
|
||||||
|
|
||||||
Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.
|
Use ``${CMAKE_SYSTEM}`` and ``${CMAKE_CXX_COMPILER}`` instead.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@ -11,4 +11,5 @@ Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.
|
|||||||
|
|
||||||
Sets the specified variable to a string representing the platform and
|
Sets the specified variable to a string representing the platform and
|
||||||
compiler settings. These values are now available through the
|
compiler settings. These values are now available through the
|
||||||
CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables.
|
:variable:`CMAKE_SYSTEM` and
|
||||||
|
:variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>` variables.
|
||||||
|
@ -8,10 +8,10 @@ Query host system specific information.
|
|||||||
cmake_host_system_information(RESULT <variable> QUERY <key> ...)
|
cmake_host_system_information(RESULT <variable> QUERY <key> ...)
|
||||||
|
|
||||||
Queries system information of the host system on which cmake runs.
|
Queries system information of the host system on which cmake runs.
|
||||||
One or more <key> can be provided to select the information to be
|
One or more ``<key>`` can be provided to select the information to be
|
||||||
queried. The list of queried values is stored in <variable>.
|
queried. The list of queried values is stored in ``<variable>``.
|
||||||
|
|
||||||
<key> can be one of the following values:
|
``<key>`` can be one of the following values:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ When version 2.4 or lower is given the command implicitly invokes
|
|||||||
|
|
||||||
which enables compatibility features for CMake 2.4 and lower.
|
which enables compatibility features for CMake 2.4 and lower.
|
||||||
|
|
||||||
The FATAL_ERROR option is accepted but ignored by CMake 2.6 and
|
The ``FATAL_ERROR`` option is accepted but ignored by CMake 2.6 and
|
||||||
higher. It should be specified so CMake versions 2.4 and lower fail
|
higher. It should be specified so CMake versions 2.4 and lower fail
|
||||||
with an error instead of just a warning.
|
with an error instead of just a warning.
|
||||||
|
|
||||||
|
@ -14,17 +14,17 @@ A test driver is a program that links together many small tests into a
|
|||||||
single executable. This is useful when building static executables
|
single executable. This is useful when building static executables
|
||||||
with large libraries to shrink the total required size. The list of
|
with large libraries to shrink the total required size. The list of
|
||||||
source files needed to build the test driver will be in
|
source files needed to build the test driver will be in
|
||||||
sourceListName. DriverName is the name of the test driver program.
|
``sourceListName``. ``driverName`` is the name of the test driver program.
|
||||||
The rest of the arguments consist of a list of test source files, can
|
The rest of the arguments consist of a list of test source files, can
|
||||||
be semicolon separated. Each test source file should have a function
|
be semicolon separated. Each test source file should have a function
|
||||||
in it that is the same name as the file with no extension (foo.cxx
|
in it that is the same name as the file with no extension (foo.cxx
|
||||||
should have int foo(int, char*[]);) DriverName will be able to call
|
should have int foo(int, char*[]);) ``driverName`` will be able to call
|
||||||
each of the tests by name on the command line. If EXTRA_INCLUDE is
|
each of the tests by name on the command line. If ``EXTRA_INCLUDE`` is
|
||||||
specified, then the next argument is included into the generated file.
|
specified, then the next argument is included into the generated file.
|
||||||
If FUNCTION is specified, then the next argument is taken as a
|
If ``FUNCTION`` is specified, then the next argument is taken as a
|
||||||
function name that is passed a pointer to ac and av. This can be used
|
function name that is passed a pointer to ac and av. This can be used
|
||||||
to add extra command line processing to each test. The cmake variable
|
to add extra command line processing to each test. The
|
||||||
CMAKE_TESTDRIVER_BEFORE_TESTMAIN can be set to have code that will be
|
``CMAKE_TESTDRIVER_BEFORE_TESTMAIN`` cmake variable can be set to
|
||||||
placed directly before calling the test main function.
|
have code that will be placed directly before calling the test main function.
|
||||||
CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be
|
``CMAKE_TESTDRIVER_AFTER_TESTMAIN`` can be set to have code that
|
||||||
placed directly after the call to the test main function.
|
will be placed directly after the call to the test main function.
|
||||||
|
@ -14,6 +14,7 @@ Perform the :ref:`CTest MemCheck Step` as a :ref:`Dashboard Client`.
|
|||||||
[EXCLUDE_LABEL <label-exclude-regex>]
|
[EXCLUDE_LABEL <label-exclude-regex>]
|
||||||
[INCLUDE_LABEL <label-include-regex>]
|
[INCLUDE_LABEL <label-include-regex>]
|
||||||
[PARALLEL_LEVEL <level>]
|
[PARALLEL_LEVEL <level>]
|
||||||
|
[TEST_LOAD <threshold>]
|
||||||
[SCHEDULE_RANDOM <ON|OFF>]
|
[SCHEDULE_RANDOM <ON|OFF>]
|
||||||
[STOP_TIME <time-of-day>]
|
[STOP_TIME <time-of-day>]
|
||||||
[RETURN_VALUE <result-var>]
|
[RETURN_VALUE <result-var>]
|
||||||
|
@ -9,3 +9,6 @@ read CTestCustom files.
|
|||||||
|
|
||||||
Read all the CTestCustom.ctest or CTestCustom.cmake files from the
|
Read all the CTestCustom.ctest or CTestCustom.cmake files from the
|
||||||
given directory.
|
given directory.
|
||||||
|
|
||||||
|
By default, invoking :manual:`ctest(1)` without a script will read custom
|
||||||
|
files from the binary directory.
|
||||||
|
@ -10,6 +10,6 @@ runs a ctest -S script
|
|||||||
|
|
||||||
Runs a script or scripts much like if it was run from ctest -S. If no
|
Runs a script or scripts much like if it was run from ctest -S. If no
|
||||||
argument is provided then the current script is run using the current
|
argument is provided then the current script is run using the current
|
||||||
settings of the variables. If NEW_PROCESS is specified then each
|
settings of the variables. If ``NEW_PROCESS`` is specified then each
|
||||||
script will be run in a separate process.If RETURN_VALUE is specified
|
script will be run in a separate process.If ``RETURN_VALUE`` is specified
|
||||||
the return value of the last script run will be put into var.
|
the return value of the last script run will be put into ``var``.
|
||||||
|
@ -14,7 +14,7 @@ after the binary directory is initialized. If the 'source' and
|
|||||||
If the track is
|
If the track is
|
||||||
specified, the submissions will go to the specified track. If APPEND
|
specified, the submissions will go to the specified track. If APPEND
|
||||||
is used, the existing TAG is used rather than creating a new one based
|
is used, the existing TAG is used rather than creating a new one based
|
||||||
on the current time stamp. If QUIET is used, CTest will suppress any
|
on the current time stamp. If ``QUIET`` is used, CTest will suppress any
|
||||||
non-error messages that it otherwise would have printed to the console.
|
non-error messages that it otherwise would have printed to the console.
|
||||||
|
|
||||||
If the :variable:`CTEST_CHECKOUT_COMMAND` variable
|
If the :variable:`CTEST_CHECKOUT_COMMAND` variable
|
||||||
|
@ -14,6 +14,7 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
|
|||||||
[EXCLUDE_LABEL <label-exclude-regex>]
|
[EXCLUDE_LABEL <label-exclude-regex>]
|
||||||
[INCLUDE_LABEL <label-include-regex>]
|
[INCLUDE_LABEL <label-include-regex>]
|
||||||
[PARALLEL_LEVEL <level>]
|
[PARALLEL_LEVEL <level>]
|
||||||
|
[TEST_LOAD <threshold>]
|
||||||
[SCHEDULE_RANDOM <ON|OFF>]
|
[SCHEDULE_RANDOM <ON|OFF>]
|
||||||
[STOP_TIME <time-of-day>]
|
[STOP_TIME <time-of-day>]
|
||||||
[RETURN_VALUE <result-var>]
|
[RETURN_VALUE <result-var>]
|
||||||
@ -41,7 +42,7 @@ The options are:
|
|||||||
Specify the end of a range of test numbers.
|
Specify the end of a range of test numbers.
|
||||||
|
|
||||||
``STRIDE <stride-number>``
|
``STRIDE <stride-number>``
|
||||||
Specify the stride by which to step acorss a range of test numbers.
|
Specify the stride by which to step across a range of test numbers.
|
||||||
|
|
||||||
``EXCLUDE <exclude-regex>``
|
``EXCLUDE <exclude-regex>``
|
||||||
Specify a regular expression matching test names to exclude.
|
Specify a regular expression matching test names to exclude.
|
||||||
@ -61,6 +62,13 @@ The options are:
|
|||||||
Specify a positive number representing the number of tests to
|
Specify a positive number representing the number of tests to
|
||||||
be run in parallel.
|
be run in parallel.
|
||||||
|
|
||||||
|
``TEST_LOAD <threshold>``
|
||||||
|
While running tests in parallel, try not to start tests when they
|
||||||
|
may cause the CPU load to pass above a given threshold. If not
|
||||||
|
specified the :variable:`CTEST_TEST_LOAD` variable will be checked,
|
||||||
|
and then the ``--test-load`` command-line argument to :manual:`ctest(1)`.
|
||||||
|
See also the ``TestLoad`` setting in the :ref:`CTest Test Step`.
|
||||||
|
|
||||||
``SCHEDULE_RANDOM <ON|OFF>``
|
``SCHEDULE_RANDOM <ON|OFF>``
|
||||||
Launch tests in a random order. This may be useful for detecting
|
Launch tests in a random order. This may be useful for detecting
|
||||||
implicit test dependencies.
|
implicit test dependencies.
|
||||||
@ -77,3 +85,6 @@ The options are:
|
|||||||
been printed to the console. Output from the underlying test command is not
|
been printed to the console. Output from the underlying test command is not
|
||||||
affected. Summary info detailing the percentage of passing tests is also
|
affected. Summary info detailing the percentage of passing tests is also
|
||||||
unaffected by the ``QUIET`` option.
|
unaffected by the ``QUIET`` option.
|
||||||
|
|
||||||
|
See also the :variable:`CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE`
|
||||||
|
and :variable:`CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE` variables.
|
||||||
|
@ -11,11 +11,11 @@ Define and document custom properties.
|
|||||||
BRIEF_DOCS <brief-doc> [docs...]
|
BRIEF_DOCS <brief-doc> [docs...]
|
||||||
FULL_DOCS <full-doc> [docs...])
|
FULL_DOCS <full-doc> [docs...])
|
||||||
|
|
||||||
Define one property in a scope for use with the set_property and
|
Define one property in a scope for use with the :command:`set_property` and
|
||||||
get_property commands. This is primarily useful to associate
|
:command:`get_property` commands. This is primarily useful to associate
|
||||||
documentation with property names that may be retrieved with the
|
documentation with property names that may be retrieved with the
|
||||||
get_property command. The first argument determines the kind of scope
|
:command:`get_property` command. The first argument determines the kind of
|
||||||
in which the property should be used. It must be one of the
|
scope in which the property should be used. It must be one of the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
::
|
::
|
||||||
@ -28,18 +28,18 @@ following:
|
|||||||
VARIABLE = documents a CMake language variable
|
VARIABLE = documents a CMake language variable
|
||||||
CACHED_VARIABLE = documents a CMake cache variable
|
CACHED_VARIABLE = documents a CMake cache variable
|
||||||
|
|
||||||
Note that unlike set_property and get_property no actual scope needs
|
Note that unlike :command:`set_property` and :command:`get_property` no
|
||||||
to be given; only the kind of scope is important.
|
actual scope needs to be given; only the kind of scope is important.
|
||||||
|
|
||||||
The required PROPERTY option is immediately followed by the name of
|
The required ``PROPERTY`` option is immediately followed by the name of
|
||||||
the property being defined.
|
the property being defined.
|
||||||
|
|
||||||
If the INHERITED option then the get_property command will chain up to
|
If the ``INHERITED`` option then the :command:`get_property` command will
|
||||||
the next higher scope when the requested property is not set in the
|
chain up to the next higher scope when the requested property is not set
|
||||||
scope given to the command. DIRECTORY scope chains to GLOBAL.
|
in the scope given to the command. ``DIRECTORY`` scope chains to
|
||||||
TARGET, SOURCE, and TEST chain to DIRECTORY.
|
``GLOBAL``. ``TARGET``, ``SOURCE``, and ``TEST`` chain to ``DIRECTORY``.
|
||||||
|
|
||||||
The BRIEF_DOCS and FULL_DOCS options are followed by strings to be
|
The ``BRIEF_DOCS`` and ``FULL_DOCS`` options are followed by strings to be
|
||||||
associated with the property as its brief and full documentation.
|
associated with the property as its brief and full documentation.
|
||||||
Corresponding options to the get_property command will retrieve the
|
Corresponding options to the :command:`get_property` command will retrieve
|
||||||
documentation.
|
the documentation.
|
||||||
|
@ -7,4 +7,4 @@ Starts the else portion of an if block.
|
|||||||
|
|
||||||
else(expression)
|
else(expression)
|
||||||
|
|
||||||
See the if command.
|
See the :command:`if` command.
|
||||||
|
@ -7,4 +7,4 @@ Starts the elseif portion of an if block.
|
|||||||
|
|
||||||
elseif(expression)
|
elseif(expression)
|
||||||
|
|
||||||
See the if command.
|
See the :command:`if` command.
|
||||||
|
@ -18,5 +18,5 @@ targets using the named language directly for compiling sources or
|
|||||||
indirectly through link dependencies. It is simplest to enable all
|
indirectly through link dependencies. It is simplest to enable all
|
||||||
needed languages in the top-level directory of a project.
|
needed languages in the top-level directory of a project.
|
||||||
|
|
||||||
The OPTIONAL keyword is a placeholder for future implementation and
|
The ``OPTIONAL`` keyword is a placeholder for future implementation and
|
||||||
does not currently work.
|
does not currently work.
|
||||||
|
@ -7,7 +7,7 @@ Enable testing for current directory and below.
|
|||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
Enables testing for this directory and below. See also the add_test
|
Enables testing for this directory and below. See also the
|
||||||
command. Note that ctest expects to find a test file in the build
|
:command:`add_test` command. Note that ctest expects to find a test file
|
||||||
directory root. Therefore, this command should be in the source
|
in the build directory root. Therefore, this command should be in the
|
||||||
directory root.
|
source directory root.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
endforeach
|
endforeach
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Ends a list of commands in a FOREACH block.
|
Ends a list of commands in a foreach block.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
endforeach(expression)
|
endforeach(expression)
|
||||||
|
|
||||||
See the FOREACH command.
|
See the :command:`foreach` command.
|
||||||
|
@ -7,4 +7,4 @@ Ends a list of commands in a function block.
|
|||||||
|
|
||||||
endfunction(expression)
|
endfunction(expression)
|
||||||
|
|
||||||
See the function command.
|
See the :command:`function` command.
|
||||||
|
@ -7,4 +7,4 @@ Ends a list of commands in an if block.
|
|||||||
|
|
||||||
endif(expression)
|
endif(expression)
|
||||||
|
|
||||||
See the if command.
|
See the :command:`if` command.
|
||||||
|
@ -7,4 +7,4 @@ Ends a list of commands in a macro block.
|
|||||||
|
|
||||||
endmacro(expression)
|
endmacro(expression)
|
||||||
|
|
||||||
See the macro command.
|
See the :command:`macro` command.
|
||||||
|
@ -7,4 +7,4 @@ Ends a list of commands in a while block.
|
|||||||
|
|
||||||
endwhile(expression)
|
endwhile(expression)
|
||||||
|
|
||||||
See the while command.
|
See the :command:`while` command.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
exec_program
|
exec_program
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Deprecated. Use the execute_process() command instead.
|
Deprecated. Use the :command:`execute_process` command instead.
|
||||||
|
|
||||||
Run an executable program during the processing of the CMakeList.txt
|
Run an executable program during the processing of the CMakeList.txt
|
||||||
file.
|
file.
|
||||||
@ -15,10 +15,10 @@ file.
|
|||||||
|
|
||||||
The executable is run in the optionally specified directory. The
|
The executable is run in the optionally specified directory. The
|
||||||
executable can include arguments if it is double quoted, but it is
|
executable can include arguments if it is double quoted, but it is
|
||||||
better to use the optional ARGS argument to specify arguments to the
|
better to use the optional ``ARGS`` argument to specify arguments to the
|
||||||
program. This is because cmake will then be able to escape spaces in
|
program. This is because cmake will then be able to escape spaces in
|
||||||
the executable path. An optional argument OUTPUT_VARIABLE specifies a
|
the executable path. An optional argument ``OUTPUT_VARIABLE`` specifies a
|
||||||
variable in which to store the output. To capture the return value of
|
variable in which to store the output. To capture the return value of
|
||||||
the execution, provide a RETURN_VALUE. If OUTPUT_VARIABLE is
|
the execution, provide a ``RETURN_VALUE``. If ``OUTPUT_VARIABLE`` is
|
||||||
specified, then no output will go to the stdout/stderr of the console
|
specified, then no output will go to the stdout/stderr of the console
|
||||||
running cmake.
|
running cmake.
|
||||||
|
@ -26,7 +26,7 @@ A single standard error pipe is used for all processes.
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
COMMAND
|
``COMMAND``
|
||||||
A child process command line.
|
A child process command line.
|
||||||
|
|
||||||
CMake executes the child process using operating system APIs directly.
|
CMake executes the child process using operating system APIs directly.
|
||||||
@ -36,31 +36,31 @@ COMMAND
|
|||||||
(Use the ``INPUT_*``, ``OUTPUT_*``, and ``ERROR_*`` options to
|
(Use the ``INPUT_*``, ``OUTPUT_*``, and ``ERROR_*`` options to
|
||||||
redirect stdin, stdout, and stderr.)
|
redirect stdin, stdout, and stderr.)
|
||||||
|
|
||||||
WORKING_DIRECTORY
|
``WORKING_DIRECTORY``
|
||||||
The named directory will be set as the current working directory of
|
The named directory will be set as the current working directory of
|
||||||
the child processes.
|
the child processes.
|
||||||
|
|
||||||
TIMEOUT
|
``TIMEOUT``
|
||||||
The child processes will be terminated if they do not finish in the
|
The child processes will be terminated if they do not finish in the
|
||||||
specified number of seconds (fractions are allowed).
|
specified number of seconds (fractions are allowed).
|
||||||
|
|
||||||
RESULT_VARIABLE
|
``RESULT_VARIABLE``
|
||||||
The variable will be set to contain the result of running the processes.
|
The variable will be set to contain the result of running the processes.
|
||||||
This will be an integer return code from the last child or a string
|
This will be an integer return code from the last child or a string
|
||||||
describing an error condition.
|
describing an error condition.
|
||||||
|
|
||||||
OUTPUT_VARIABLE, ERROR_VARIABLE
|
``OUTPUT_VARIABLE``, ``ERROR_VARIABLE``
|
||||||
The variable named will be set with the contents of the standard output
|
The variable named will be set with the contents of the standard output
|
||||||
and standard error pipes, respectively. If the same variable is named
|
and standard error pipes, respectively. If the same variable is named
|
||||||
for both pipes their output will be merged in the order produced.
|
for both pipes their output will be merged in the order produced.
|
||||||
|
|
||||||
INPUT_FILE, OUTPUT_FILE, ERROR_FILE
|
``INPUT_FILE, OUTPUT_FILE``, ``ERROR_FILE``
|
||||||
The file named will be attached to the standard input of the first
|
The file named will be attached to the standard input of the first
|
||||||
process, standard output of the last process, or standard error of
|
process, standard output of the last process, or standard error of
|
||||||
all processes, respectively. If the same file is named for both
|
all processes, respectively. If the same file is named for both
|
||||||
output and error then it will be used for both.
|
output and error then it will be used for both.
|
||||||
|
|
||||||
OUTPUT_QUIET, ERROR_QUIET
|
``OUTPUT_QUIET``, ``ERROR_QUIET``
|
||||||
The standard output or standard error results will be quietly ignored.
|
The standard output or standard error results will be quietly ignored.
|
||||||
|
|
||||||
If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the
|
If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the
|
||||||
|
@ -7,20 +7,20 @@ Export targets from the build tree for use by outside projects.
|
|||||||
|
|
||||||
export(EXPORT <export-name> [NAMESPACE <namespace>] [FILE <filename>])
|
export(EXPORT <export-name> [NAMESPACE <namespace>] [FILE <filename>])
|
||||||
|
|
||||||
Create a file <filename> that may be included by outside projects to
|
Create a file ``<filename>`` that may be included by outside projects to
|
||||||
import targets from the current project's build tree. This is useful
|
import targets from the current project's build tree. This is useful
|
||||||
during cross-compiling to build utility executables that can run on
|
during cross-compiling to build utility executables that can run on
|
||||||
the host platform in one project and then import them into another
|
the host platform in one project and then import them into another
|
||||||
project being compiled for the target platform. If the NAMESPACE
|
project being compiled for the target platform. If the ``NAMESPACE``
|
||||||
option is given the <namespace> string will be prepended to all target
|
option is given the ``<namespace>`` string will be prepended to all target
|
||||||
names written to the file.
|
names written to the file.
|
||||||
|
|
||||||
Target installations are associated with the export <export-name>
|
Target installations are associated with the export ``<export-name>``
|
||||||
using the ``EXPORT`` option of the :command:`install(TARGETS)` command.
|
using the ``EXPORT`` option of the :command:`install(TARGETS)` command.
|
||||||
|
|
||||||
The file created by this command is specific to the build tree and
|
The file created by this command is specific to the build tree and
|
||||||
should never be installed. See the install(EXPORT) command to export
|
should never be installed. See the :command:`install(EXPORT)` command to
|
||||||
targets from an installation tree.
|
export targets from an installation tree.
|
||||||
|
|
||||||
The properties set on the generated IMPORTED targets will have the
|
The properties set on the generated IMPORTED targets will have the
|
||||||
same values as the final values of the input TARGETS.
|
same values as the final values of the input TARGETS.
|
||||||
@ -45,12 +45,12 @@ unspecified.
|
|||||||
export(PACKAGE <name>)
|
export(PACKAGE <name>)
|
||||||
|
|
||||||
Store the current build directory in the CMake user package registry
|
Store the current build directory in the CMake user package registry
|
||||||
for package <name>. The find_package command may consider the
|
for package ``<name>``. The find_package command may consider the
|
||||||
directory while searching for package <name>. This helps dependent
|
directory while searching for package ``<name>``. This helps dependent
|
||||||
projects find and use a package from the current project's build tree
|
projects find and use a package from the current project's build tree
|
||||||
without help from the user. Note that the entry in the package
|
without help from the user. Note that the entry in the package
|
||||||
registry that this command creates works only in conjunction with a
|
registry that this command creates works only in conjunction with a
|
||||||
package configuration file (<name>Config.cmake) that works with the
|
package configuration file (``<name>Config.cmake``) that works with the
|
||||||
build tree. In some cases, for example for packaging and for system
|
build tree. In some cases, for example for packaging and for system
|
||||||
wide installations, it is not desirable to write the user package
|
wide installations, it is not desirable to write the user package
|
||||||
registry. If the :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable
|
registry. If the :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable
|
||||||
|
@ -7,22 +7,22 @@ Use :command:`install(EXPORT)` or :command:`export` command.
|
|||||||
|
|
||||||
This command generates an old-style library dependencies file.
|
This command generates an old-style library dependencies file.
|
||||||
Projects requiring CMake 2.6 or later should not use the command. Use
|
Projects requiring CMake 2.6 or later should not use the command. Use
|
||||||
instead the install(EXPORT) command to help export targets from an
|
instead the :command:`install(EXPORT)` command to help export targets from an
|
||||||
installation tree and the export() command to export targets from a
|
installation tree and the :command:`export` command to export targets from a
|
||||||
build tree.
|
build tree.
|
||||||
|
|
||||||
The old-style library dependencies file does not take into account
|
The old-style library dependencies file does not take into account
|
||||||
per-configuration names of libraries or the LINK_INTERFACE_LIBRARIES
|
per-configuration names of libraries or the
|
||||||
target property.
|
:prop_tgt:`LINK_INTERFACE_LIBRARIES` target property.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
export_library_dependencies(<file> [APPEND])
|
export_library_dependencies(<file> [APPEND])
|
||||||
|
|
||||||
Create a file named <file> that can be included into a CMake listfile
|
Create a file named ``<file>`` that can be included into a CMake listfile
|
||||||
with the INCLUDE command. The file will contain a number of SET
|
with the INCLUDE command. The file will contain a number of SET
|
||||||
commands that will set all the variables needed for library dependency
|
commands that will set all the variables needed for library dependency
|
||||||
information. This should be the last command in the top level
|
information. This should be the last command in the top level
|
||||||
CMakeLists.txt file of the project. If the APPEND option is
|
CMakeLists.txt file of the project. If the ``APPEND`` option is
|
||||||
specified, the SET commands will be appended to the given file instead
|
specified, the SET commands will be appended to the given file instead
|
||||||
of replacing it.
|
of replacing it.
|
||||||
|
@ -103,7 +103,8 @@ Generate a list of files that match the ``<globbing-expressions>`` and
|
|||||||
store it into the ``<variable>``. Globbing expressions are similar to
|
store it into the ``<variable>``. Globbing expressions are similar to
|
||||||
regular expressions, but much simpler. If ``RELATIVE`` flag is
|
regular expressions, but much simpler. If ``RELATIVE`` flag is
|
||||||
specified, the results will be returned as relative paths to the given
|
specified, the results will be returned as relative paths to the given
|
||||||
path.
|
path. No specific order of results is defined. If order is important then
|
||||||
|
sort the list explicitly (e.g. using the :command:`list(SORT)` command).
|
||||||
|
|
||||||
By default ``GLOB`` lists directories - directories are omited in result if
|
By default ``GLOB`` lists directories - directories are omited in result if
|
||||||
``LIST_DIRECTORIES`` is set to false.
|
``LIST_DIRECTORIES`` is set to false.
|
||||||
|
@ -5,24 +5,27 @@ find_file
|
|||||||
.. |NAMES| replace:: NAMES name1 [name2 ...]
|
.. |NAMES| replace:: NAMES name1 [name2 ...]
|
||||||
.. |SEARCH_XXX| replace:: full path to a file
|
.. |SEARCH_XXX| replace:: full path to a file
|
||||||
.. |SEARCH_XXX_DESC| replace:: full path to named file
|
.. |SEARCH_XXX_DESC| replace:: full path to named file
|
||||||
.. |XXX_SUBDIR| replace:: include
|
.. |prefix_XXX_SUBDIR| replace:: ``<prefix>/include``
|
||||||
|
.. |entry_XXX_SUBDIR| replace:: ``<entry>/include``
|
||||||
|
|
||||||
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
||||||
<prefix>/include/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
|
||||||
|CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
is set, and |CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_XXX_PATH| replace:: CMAKE_INCLUDE_PATH
|
.. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_INCLUDE_PATH`
|
||||||
.. |CMAKE_XXX_MAC_PATH| replace:: CMAKE_FRAMEWORK_PATH
|
.. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_FRAMEWORK_PATH`
|
||||||
|
|
||||||
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: Directories in INCLUDE,
|
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: Directories in ``INCLUDE``,
|
||||||
<prefix>/include/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
|
||||||
|SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|,
|
is set, and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|, and the
|
||||||
and the directories in PATH itself.
|
directories in ``PATH`` itself.
|
||||||
|
|
||||||
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
||||||
<prefix>/include/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
|
||||||
|CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
is set, and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_SYSTEM_XXX_PATH| replace:: CMAKE_SYSTEM_INCLUDE_PATH
|
.. |CMAKE_SYSTEM_XXX_PATH| replace::
|
||||||
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace:: CMAKE_SYSTEM_FRAMEWORK_PATH
|
:variable:`CMAKE_SYSTEM_INCLUDE_PATH`
|
||||||
|
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
|
||||||
|
:variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
|
||||||
|
|
||||||
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
||||||
:variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
|
:variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
|
||||||
|
@ -5,33 +5,36 @@ find_library
|
|||||||
.. |NAMES| replace:: NAMES name1 [name2 ...] [NAMES_PER_DIR]
|
.. |NAMES| replace:: NAMES name1 [name2 ...] [NAMES_PER_DIR]
|
||||||
.. |SEARCH_XXX| replace:: library
|
.. |SEARCH_XXX| replace:: library
|
||||||
.. |SEARCH_XXX_DESC| replace:: library
|
.. |SEARCH_XXX_DESC| replace:: library
|
||||||
.. |XXX_SUBDIR| replace:: lib
|
.. |prefix_XXX_SUBDIR| replace:: ``<prefix>/lib``
|
||||||
|
.. |entry_XXX_SUBDIR| replace:: ``<entry>/lib``
|
||||||
|
|
||||||
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
||||||
<prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
|
||||||
|CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
and |CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_XXX_PATH| replace:: CMAKE_LIBRARY_PATH
|
.. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_LIBRARY_PATH`
|
||||||
.. |CMAKE_XXX_MAC_PATH| replace:: CMAKE_FRAMEWORK_PATH
|
.. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_FRAMEWORK_PATH`
|
||||||
|
|
||||||
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: Directories in LIB,
|
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: Directories in ``LIB``,
|
||||||
<prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
|
||||||
|SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|,
|
and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|,
|
||||||
and the directories in PATH itself.
|
and the directories in ``PATH`` itself.
|
||||||
|
|
||||||
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
||||||
<prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
|
||||||
|CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_SYSTEM_XXX_PATH| replace:: CMAKE_SYSTEM_LIBRARY_PATH
|
.. |CMAKE_SYSTEM_XXX_PATH| replace::
|
||||||
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace:: CMAKE_SYSTEM_FRAMEWORK_PATH
|
:variable:`CMAKE_SYSTEM_LIBRARY_PATH`
|
||||||
|
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
|
||||||
|
:variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
|
||||||
|
|
||||||
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
||||||
:variable:`CMAKE_FIND_ROOT_PATH_MODE_LIBRARY`
|
:variable:`CMAKE_FIND_ROOT_PATH_MODE_LIBRARY`
|
||||||
|
|
||||||
.. include:: FIND_XXX.txt
|
.. include:: FIND_XXX.txt
|
||||||
|
|
||||||
When more than one value is given to the NAMES option this command by
|
When more than one value is given to the ``NAMES`` option this command by
|
||||||
default will consider one name at a time and search every directory
|
default will consider one name at a time and search every directory
|
||||||
for it. The NAMES_PER_DIR option tells this command to consider one
|
for it. The ``NAMES_PER_DIR`` option tells this command to consider one
|
||||||
directory at a time and search for all names in it.
|
directory at a time and search for all names in it.
|
||||||
|
|
||||||
Each library name given to the ``NAMES`` option is first considered
|
Each library name given to the ``NAMES`` option is first considered
|
||||||
@ -40,14 +43,14 @@ prefixes (e.g. ``lib``) and suffixes (e.g. ``.so``). Therefore one
|
|||||||
may specify library file names such as ``libfoo.a`` directly.
|
may specify library file names such as ``libfoo.a`` directly.
|
||||||
This can be used to locate static libraries on UNIX-like systems.
|
This can be used to locate static libraries on UNIX-like systems.
|
||||||
|
|
||||||
If the library found is a framework, then VAR will be set to the full
|
If the library found is a framework, then ``<VAR>`` will be set to the full
|
||||||
path to the framework <fullPath>/A.framework. When a full path to a
|
path to the framework ``<fullPath>/A.framework``. When a full path to a
|
||||||
framework is used as a library, CMake will use a -framework A, and a
|
framework is used as a library, CMake will use a ``-framework A``, and a
|
||||||
-F<fullPath> to link the framework to the target.
|
``-F<fullPath>`` to link the framework to the target.
|
||||||
|
|
||||||
If the global property FIND_LIBRARY_USE_LIB64_PATHS is set all search
|
If the :prop_gbl:`FIND_LIBRARY_USE_LIB64_PATHS` global property is set
|
||||||
paths will be tested as normal, with "64/" appended, and with all
|
all search paths will be tested as normal, with ``64/`` appended, and
|
||||||
matches of "lib/" replaced with "lib64/". This property is
|
with all matches of ``lib/`` replaced with ``lib64/``. This property is
|
||||||
automatically set for the platforms that are known to need it if at
|
automatically set for the platforms that are known to need it if at
|
||||||
least one of the languages supported by the PROJECT command is
|
least one of the languages supported by the :command:`project` command
|
||||||
enabled.
|
is enabled.
|
||||||
|
@ -228,9 +228,9 @@ installation directory. Those marked with (U) are intended for
|
|||||||
installations on UNIX platforms where the prefix is shared by multiple
|
installations on UNIX platforms where the prefix is shared by multiple
|
||||||
packages. This is merely a convention, so all (W) and (U) directories
|
packages. This is merely a convention, so all (W) and (U) directories
|
||||||
are still searched on all platforms. Directories marked with (A) are
|
are still searched on all platforms. Directories marked with (A) are
|
||||||
intended for installations on Apple platforms. The cmake variables
|
intended for installations on Apple platforms. The
|
||||||
``CMAKE_FIND_FRAMEWORK`` and ``CMAKE_FIND_APPBUNDLE``
|
:variable:`CMAKE_FIND_FRAMEWORK` and :variable:`CMAKE_FIND_APPBUNDLE`
|
||||||
determine the order of preference as specified below.
|
variables determine the order of preference.
|
||||||
|
|
||||||
The set of installation prefixes is constructed using the following
|
The set of installation prefixes is constructed using the following
|
||||||
steps. If ``NO_DEFAULT_PATH`` is specified all ``NO_*`` options are
|
steps. If ``NO_DEFAULT_PATH`` is specified all ``NO_*`` options are
|
||||||
@ -295,7 +295,6 @@ enabled.
|
|||||||
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
||||||
:variable:`CMAKE_FIND_ROOT_PATH_MODE_PACKAGE`
|
:variable:`CMAKE_FIND_ROOT_PATH_MODE_PACKAGE`
|
||||||
|
|
||||||
.. include:: FIND_XXX_MAC.txt
|
|
||||||
.. include:: FIND_XXX_ROOT.txt
|
.. include:: FIND_XXX_ROOT.txt
|
||||||
.. include:: FIND_XXX_ORDER.txt
|
.. include:: FIND_XXX_ORDER.txt
|
||||||
|
|
||||||
|
@ -5,31 +5,34 @@ find_path
|
|||||||
.. |NAMES| replace:: NAMES name1 [name2 ...]
|
.. |NAMES| replace:: NAMES name1 [name2 ...]
|
||||||
.. |SEARCH_XXX| replace:: file in a directory
|
.. |SEARCH_XXX| replace:: file in a directory
|
||||||
.. |SEARCH_XXX_DESC| replace:: directory containing the named file
|
.. |SEARCH_XXX_DESC| replace:: directory containing the named file
|
||||||
.. |XXX_SUBDIR| replace:: include
|
.. |prefix_XXX_SUBDIR| replace:: ``<prefix>/include``
|
||||||
|
.. |entry_XXX_SUBDIR| replace:: ``<entry>/include``
|
||||||
|
|
||||||
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
||||||
<prefix>/include/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
|
||||||
|CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
is set, and |CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_XXX_PATH| replace:: CMAKE_INCLUDE_PATH
|
.. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_INCLUDE_PATH`
|
||||||
.. |CMAKE_XXX_MAC_PATH| replace:: CMAKE_FRAMEWORK_PATH
|
.. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_FRAMEWORK_PATH`
|
||||||
|
|
||||||
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: Directories in INCLUDE,
|
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: Directories in ``INCLUDE``,
|
||||||
<prefix>/include/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
|
||||||
|SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|,
|
is set, and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|, and the
|
||||||
and the directories in PATH itself.
|
directories in ``PATH`` itself.
|
||||||
|
|
||||||
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
||||||
<prefix>/include/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and
|
``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
|
||||||
|CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
is set, and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_SYSTEM_XXX_PATH| replace:: CMAKE_SYSTEM_INCLUDE_PATH
|
.. |CMAKE_SYSTEM_XXX_PATH| replace::
|
||||||
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace:: CMAKE_SYSTEM_FRAMEWORK_PATH
|
:variable:`CMAKE_SYSTEM_INCLUDE_PATH`
|
||||||
|
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
|
||||||
|
:variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
|
||||||
|
|
||||||
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
||||||
:variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
|
:variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
|
||||||
|
|
||||||
.. include:: FIND_XXX.txt
|
.. include:: FIND_XXX.txt
|
||||||
|
|
||||||
When searching for frameworks, if the file is specified as A/b.h, then
|
When searching for frameworks, if the file is specified as ``A/b.h``, then
|
||||||
the framework search will look for A.framework/Headers/b.h. If that
|
the framework search will look for ``A.framework/Headers/b.h``. If that
|
||||||
is found the path will be set to the path to the framework. CMake
|
is found the path will be set to the path to the framework. CMake
|
||||||
will convert this to the correct -F option to include the file.
|
will convert this to the correct ``-F`` option to include the file.
|
||||||
|
@ -2,24 +2,32 @@ find_program
|
|||||||
------------
|
------------
|
||||||
|
|
||||||
.. |FIND_XXX| replace:: find_program
|
.. |FIND_XXX| replace:: find_program
|
||||||
.. |NAMES| replace:: NAMES name1 [name2 ...]
|
.. |NAMES| replace:: NAMES name1 [name2 ...] [NAMES_PER_DIR]
|
||||||
.. |SEARCH_XXX| replace:: program
|
.. |SEARCH_XXX| replace:: program
|
||||||
.. |SEARCH_XXX_DESC| replace:: program
|
.. |SEARCH_XXX_DESC| replace:: program
|
||||||
.. |XXX_SUBDIR| replace:: [s]bin
|
.. |prefix_XXX_SUBDIR| replace:: ``<prefix>/[s]bin``
|
||||||
|
.. |entry_XXX_SUBDIR| replace:: ``<entry>/[s]bin``
|
||||||
|
|
||||||
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_PREFIX_PATH_XXX| replace::
|
||||||
|CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
|CMAKE_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_XXX_PATH| replace:: CMAKE_PROGRAM_PATH
|
.. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_PROGRAM_PATH`
|
||||||
.. |CMAKE_XXX_MAC_PATH| replace:: CMAKE_APPBUNDLE_PATH
|
.. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_APPBUNDLE_PATH`
|
||||||
|
|
||||||
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: PATH
|
.. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: ``PATH``
|
||||||
|
|
||||||
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
|
||||||
|CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
|CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
|
||||||
.. |CMAKE_SYSTEM_XXX_PATH| replace:: CMAKE_SYSTEM_PROGRAM_PATH
|
.. |CMAKE_SYSTEM_XXX_PATH| replace::
|
||||||
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace:: CMAKE_SYSTEM_APPBUNDLE_PATH
|
:variable:`CMAKE_SYSTEM_PROGRAM_PATH`
|
||||||
|
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
|
||||||
|
:variable:`CMAKE_SYSTEM_APPBUNDLE_PATH`
|
||||||
|
|
||||||
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
|
||||||
:variable:`CMAKE_FIND_ROOT_PATH_MODE_PROGRAM`
|
:variable:`CMAKE_FIND_ROOT_PATH_MODE_PROGRAM`
|
||||||
|
|
||||||
.. include:: FIND_XXX.txt
|
.. include:: FIND_XXX.txt
|
||||||
|
|
||||||
|
When more than one value is given to the ``NAMES`` option this command by
|
||||||
|
default will consider one name at a time and search every directory
|
||||||
|
for it. The ``NAMES_PER_DIR`` option tells this command to consider one
|
||||||
|
directory at a time and search for all names in it.
|
||||||
|
@ -10,5 +10,5 @@ Create FLTK user interfaces Wrappers.
|
|||||||
|
|
||||||
Produce .h and .cxx files for all the .fl and .fld files listed. The
|
Produce .h and .cxx files for all the .fl and .fld files listed. The
|
||||||
resulting .h and .cxx files will be added to a variable named
|
resulting .h and .cxx files will be added to a variable named
|
||||||
resultingLibraryName_FLTK_UI_SRCS which should be added to your
|
``resultingLibraryName_FLTK_UI_SRCS`` which should be added to your
|
||||||
library.
|
library.
|
||||||
|
@ -15,7 +15,7 @@ All commands between foreach and the matching endforeach are recorded
|
|||||||
without being invoked. Once the endforeach is evaluated, the recorded
|
without being invoked. Once the endforeach is evaluated, the recorded
|
||||||
list of commands is invoked once for each argument listed in the
|
list of commands is invoked once for each argument listed in the
|
||||||
original foreach command. Before each iteration of the loop
|
original foreach command. Before each iteration of the loop
|
||||||
"${loop_var}" will be set as a variable with the current value in the
|
``${loop_var}`` will be set as a variable with the current value in the
|
||||||
list.
|
list.
|
||||||
|
|
||||||
::
|
::
|
||||||
@ -40,8 +40,8 @@ three types of this iteration:
|
|||||||
foreach(loop_var IN [LISTS [list1 [...]]]
|
foreach(loop_var IN [LISTS [list1 [...]]]
|
||||||
[ITEMS [item1 [...]]])
|
[ITEMS [item1 [...]]])
|
||||||
|
|
||||||
Iterates over a precise list of items. The LISTS option names
|
Iterates over a precise list of items. The ``LISTS`` option names
|
||||||
list-valued variables to be traversed, including empty elements (an
|
list-valued variables to be traversed, including empty elements (an
|
||||||
empty string is a zero-length list). (Note macro
|
empty string is a zero-length list). (Note macro
|
||||||
arguments are not variables.) The ITEMS option ends argument
|
arguments are not variables.) The ``ITEMS`` option ends argument
|
||||||
parsing and includes all arguments following it in the iteration.
|
parsing and includes all arguments following it in the iteration.
|
||||||
|
@ -8,8 +8,8 @@ Get a property of the CMake instance.
|
|||||||
get_cmake_property(VAR property)
|
get_cmake_property(VAR property)
|
||||||
|
|
||||||
Get a property from the CMake instance. The value of the property is
|
Get a property from the CMake instance. The value of the property is
|
||||||
stored in the variable VAR. If the property is not found, VAR will be
|
stored in the variable ``VAR``. If the property is not found, ``VAR``
|
||||||
set to "NOTFOUND". Some supported properties include: VARIABLES,
|
will be set to "NOTFOUND". See the :manual:`cmake-properties(7)` manual
|
||||||
CACHE_VARIABLES, COMMANDS, MACROS, and COMPONENTS.
|
for available properties.
|
||||||
|
|
||||||
See also the more general get_property() command.
|
See also the more general :command:`get_property` command.
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
get_directory_property
|
get_directory_property
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Get a property of DIRECTORY scope.
|
Get a property of ``DIRECTORY`` scope.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>)
|
get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>)
|
||||||
|
|
||||||
Store a property of directory scope in the named variable. If the
|
Store a property of directory scope in the named variable. If the
|
||||||
property is not defined the empty-string is returned. The DIRECTORY
|
property is not defined the empty-string is returned. The ``DIRECTORY``
|
||||||
argument specifies another directory from which to retrieve the
|
argument specifies another directory from which to retrieve the
|
||||||
property value. The specified directory must have already been
|
property value. The specified directory must have already been
|
||||||
traversed by CMake.
|
traversed by CMake.
|
||||||
@ -21,4 +21,4 @@ traversed by CMake.
|
|||||||
Get a variable definition from a directory. This form is useful to
|
Get a variable definition from a directory. This form is useful to
|
||||||
get a variable definition from another directory.
|
get a variable definition from another directory.
|
||||||
|
|
||||||
See also the more general get_property() command.
|
See also the more general :command:`get_property` command.
|
||||||
|
@ -3,11 +3,13 @@ get_filename_component
|
|||||||
|
|
||||||
Get a specific component of a full filename.
|
Get a specific component of a full filename.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
get_filename_component(<VAR> <FileName> <COMP> [CACHE])
|
get_filename_component(<VAR> <FileName> <COMP> [CACHE])
|
||||||
|
|
||||||
Set <VAR> to a component of <FileName>, where <COMP> is one of:
|
Set ``<VAR>`` to a component of ``<FileName>``, where ``<COMP>`` is one of:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@ -15,23 +17,48 @@ Set <VAR> to a component of <FileName>, where <COMP> is one of:
|
|||||||
NAME = File name without directory
|
NAME = File name without directory
|
||||||
EXT = File name longest extension (.b.c from d/a.b.c)
|
EXT = File name longest extension (.b.c from d/a.b.c)
|
||||||
NAME_WE = File name without directory or longest extension
|
NAME_WE = File name without directory or longest extension
|
||||||
ABSOLUTE = Full path to file
|
|
||||||
REALPATH = Full path to existing file with symlinks resolved
|
|
||||||
PATH = Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
|
PATH = Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
|
||||||
|
|
||||||
Paths are returned with forward slashes and have no trailing slahes.
|
Paths are returned with forward slashes and have no trailing slashes.
|
||||||
The longest file extension is always considered. If the optional
|
The longest file extension is always considered. If the optional
|
||||||
CACHE argument is specified, the result variable is added to the
|
``CACHE`` argument is specified, the result variable is added to the
|
||||||
cache.
|
cache.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
get_filename_component(<VAR> FileName
|
get_filename_component(<VAR> <FileName>
|
||||||
|
<COMP> [BASE_DIR <BASE_DIR>]
|
||||||
|
[CACHE])
|
||||||
|
|
||||||
|
Set ``<VAR>`` to the absolute path of ``<FileName>``, where ``<COMP>`` is one
|
||||||
|
of:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
ABSOLUTE = Full path to file
|
||||||
|
REALPATH = Full path to existing file with symlinks resolved
|
||||||
|
|
||||||
|
If the provided ``<FileName>`` is a relative path, it is evaluated relative
|
||||||
|
to the given base directory ``<BASE_DIR>``. If no base directory is
|
||||||
|
provided, the default base directory will be
|
||||||
|
:variable:`CMAKE_CURRENT_SOURCE_DIR`.
|
||||||
|
|
||||||
|
Paths are returned with forward slashes and have no trailing slahes. If the
|
||||||
|
optional ``CACHE`` argument is specified, the result variable is added to the
|
||||||
|
cache.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
get_filename_component(<VAR> <FileName>
|
||||||
PROGRAM [PROGRAM_ARGS <ARG_VAR>]
|
PROGRAM [PROGRAM_ARGS <ARG_VAR>]
|
||||||
[CACHE])
|
[CACHE])
|
||||||
|
|
||||||
The program in FileName will be found in the system search path or
|
The program in ``<FileName>`` will be found in the system search path or
|
||||||
left as a full path. If PROGRAM_ARGS is present with PROGRAM, then
|
left as a full path. If ``PROGRAM_ARGS`` is present with ``PROGRAM``, then
|
||||||
any command-line arguments present in the FileName string are split
|
any command-line arguments present in the ``<FileName>`` string are split
|
||||||
from the program name and stored in <ARG_VAR>. This is used to
|
from the program name and stored in ``<ARG_VAR>``. This is used to
|
||||||
separate a program name from its arguments in a command line string.
|
separate a program name from its arguments in a command line string.
|
||||||
|
@ -8,9 +8,9 @@ Get a property for a source file.
|
|||||||
get_source_file_property(VAR file property)
|
get_source_file_property(VAR file property)
|
||||||
|
|
||||||
Get a property from a source file. The value of the property is
|
Get a property from a source file. The value of the property is
|
||||||
stored in the variable VAR. If the property is not found, VAR will be
|
stored in the variable ``VAR``. If the property is not found, ``VAR``
|
||||||
set to "NOTFOUND". Use set_source_files_properties to set property
|
will be set to "NOTFOUND". Use :command:`set_source_files_properties`
|
||||||
values. Source file properties usually control how the file is built.
|
to set property values. Source file properties usually control how the
|
||||||
One property that is always there is LOCATION
|
file is built. One property that is always there is :prop_sf:`LOCATION`
|
||||||
|
|
||||||
See also the more general get_property() command.
|
See also the more general :command:`get_property` command.
|
||||||
|
@ -8,11 +8,11 @@ Get a property from a target.
|
|||||||
get_target_property(VAR target property)
|
get_target_property(VAR target property)
|
||||||
|
|
||||||
Get a property from a target. The value of the property is stored in
|
Get a property from a target. The value of the property is stored in
|
||||||
the variable VAR. If the property is not found, VAR will be set to
|
the variable ``VAR``. If the property is not found, ``VAR`` will be set to
|
||||||
"NOTFOUND". Use set_target_properties to set property values.
|
"NOTFOUND". Use :command:`set_target_properties` to set property values.
|
||||||
Properties are usually used to control how a target is built, but some
|
Properties are usually used to control how a target is built, but some
|
||||||
query the target instead. This command can get properties for any
|
query the target instead. This command can get properties for any
|
||||||
target so far created. The targets do not need to be in the current
|
target so far created. The targets do not need to be in the current
|
||||||
CMakeLists.txt file.
|
CMakeLists.txt file.
|
||||||
|
|
||||||
See also the more general get_property() command.
|
See also the more general :command:`get_property` command.
|
||||||
|
@ -8,8 +8,8 @@ Get a property of the test.
|
|||||||
get_test_property(test property VAR)
|
get_test_property(test property VAR)
|
||||||
|
|
||||||
Get a property from the test. The value of the property is stored in
|
Get a property from the test. The value of the property is stored in
|
||||||
the variable VAR. If the test or property is not found, VAR will be
|
the variable ``VAR``. If the test or property is not found, ``VAR`` will
|
||||||
set to "NOTFOUND". For a list of standard properties you can type cmake
|
be set to "NOTFOUND". For a list of standard properties you can type
|
||||||
--help-property-list.
|
``cmake --help-property-list``.
|
||||||
|
|
||||||
See also the more general get_property() command.
|
See also the more general :command:`get_property` command.
|
||||||
|
@ -71,6 +71,10 @@ Possible expressions are:
|
|||||||
created by the :command:`add_executable`, :command:`add_library`, or
|
created by the :command:`add_executable`, :command:`add_library`, or
|
||||||
:command:`add_custom_target` commands.
|
:command:`add_custom_target` commands.
|
||||||
|
|
||||||
|
``if(TEST test-name)``
|
||||||
|
True if the given name is an existing test name created by the
|
||||||
|
:command:`add_test` command.
|
||||||
|
|
||||||
``if(EXISTS path-to-file-or-directory)``
|
``if(EXISTS path-to-file-or-directory)``
|
||||||
True if the named file or directory exists. Behavior is well-defined
|
True if the named file or directory exists. Behavior is well-defined
|
||||||
only for full paths.
|
only for full paths.
|
||||||
|
@ -9,17 +9,17 @@ Load and run CMake code from a file or module.
|
|||||||
[NO_POLICY_SCOPE])
|
[NO_POLICY_SCOPE])
|
||||||
|
|
||||||
Load and run CMake code from the file given. Variable reads and
|
Load and run CMake code from the file given. Variable reads and
|
||||||
writes access the scope of the caller (dynamic scoping). If OPTIONAL
|
writes access the scope of the caller (dynamic scoping). If ``OPTIONAL``
|
||||||
is present, then no error is raised if the file does not exist. If
|
is present, then no error is raised if the file does not exist. If
|
||||||
RESULT_VARIABLE is given the variable will be set to the full filename
|
``RESULT_VARIABLE`` is given the variable will be set to the full filename
|
||||||
which has been included or NOTFOUND if it failed.
|
which has been included or NOTFOUND if it failed.
|
||||||
|
|
||||||
If a module is specified instead of a file, the file with name
|
If a module is specified instead of a file, the file with name
|
||||||
<modulename>.cmake is searched first in CMAKE_MODULE_PATH, then in the
|
<modulename>.cmake is searched first in :variable:`CMAKE_MODULE_PATH`,
|
||||||
CMake module directory. There is one exception to this: if the file
|
then in the CMake module directory. There is one exception to this: if
|
||||||
which calls include() is located itself in the CMake module directory,
|
the file which calls ``include()`` is located itself in the CMake module
|
||||||
then first the CMake module directory is searched and
|
directory, then first the CMake module directory is searched and
|
||||||
CMAKE_MODULE_PATH afterwards. See also policy CMP0017.
|
:variable:`CMAKE_MODULE_PATH` afterwards. See also policy :policy:`CMP0017`.
|
||||||
|
|
||||||
See the cmake_policy() command documentation for discussion of the
|
See the :command:`cmake_policy` command documentation for discussion of the
|
||||||
NO_POLICY_SCOPE option.
|
``NO_POLICY_SCOPE`` option.
|
||||||
|
@ -13,10 +13,10 @@ Include an external Microsoft project file in a workspace.
|
|||||||
|
|
||||||
Includes an external Microsoft project in the generated workspace
|
Includes an external Microsoft project in the generated workspace
|
||||||
file. Currently does nothing on UNIX. This will create a target
|
file. Currently does nothing on UNIX. This will create a target
|
||||||
named [projectname]. This can be used in the add_dependencies command
|
named [projectname]. This can be used in the :command:`add_dependencies`
|
||||||
to make things depend on the external project.
|
command to make things depend on the external project.
|
||||||
|
|
||||||
TYPE, GUID and PLATFORM are optional parameters that allow one to
|
``TYPE``, ``GUID`` and ``PLATFORM`` are optional parameters that allow one to
|
||||||
specify the type of project, id (GUID) of the project and the name of
|
specify the type of project, id (GUID) of the project and the name of
|
||||||
the target platform. This is useful for projects requiring values
|
the target platform. This is useful for projects requiring values
|
||||||
other than the default (e.g. WIX projects). These options are not
|
other than the default (e.g. WIX projects). These options are not
|
||||||
|
@ -8,8 +8,8 @@ Set the regular expression used for dependency checking.
|
|||||||
include_regular_expression(regex_match [regex_complain])
|
include_regular_expression(regex_match [regex_complain])
|
||||||
|
|
||||||
Set the regular expressions used in dependency checking. Only files
|
Set the regular expressions used in dependency checking. Only files
|
||||||
matching regex_match will be traced as dependencies. Only files
|
matching ``regex_match`` will be traced as dependencies. Only files
|
||||||
matching regex_complain will generate warnings if they cannot be found
|
matching ``regex_complain`` will generate warnings if they cannot be found
|
||||||
(standard header paths are not searched). The defaults are:
|
(standard header paths are not searched). The defaults are:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
@ -192,6 +192,10 @@ The list of ``files...`` given to ``FILES`` or ``PROGRAMS`` may use
|
|||||||
However, if any item begins in a generator expression it must evaluate
|
However, if any item begins in a generator expression it must evaluate
|
||||||
to a full path.
|
to a full path.
|
||||||
|
|
||||||
|
The install destination given to the files install ``DESTINATION`` may
|
||||||
|
use "generator expressions" with the syntax ``$<...>``. See the
|
||||||
|
:manual:`cmake-generator-expressions(7)` manual for available expressions.
|
||||||
|
|
||||||
Installing Directories
|
Installing Directories
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
@ -267,6 +271,10 @@ will install the ``icons`` directory to ``share/myproj/icons`` and the
|
|||||||
file permissions, the scripts will be given specific permissions, and any
|
file permissions, the scripts will be given specific permissions, and any
|
||||||
``CVS`` directories will be excluded.
|
``CVS`` directories will be excluded.
|
||||||
|
|
||||||
|
The install destination given to the directory install ``DESTINATION`` may
|
||||||
|
use "generator expressions" with the syntax ``$<...>``. See the
|
||||||
|
:manual:`cmake-generator-expressions(7)` manual for available expressions.
|
||||||
|
|
||||||
Custom Installation Logic
|
Custom Installation Logic
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
install_files
|
install_files
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Deprecated. Use the install(FILES ) command instead.
|
Deprecated. Use the :command:`install(FILES)` command instead.
|
||||||
|
|
||||||
This command has been superceded by the install command. It is
|
This command has been superceded by the :command:`install` command. It is
|
||||||
provided for compatibility with older CMake code. The FILES form is
|
provided for compatibility with older CMake code. The ``FILES`` form is
|
||||||
directly replaced by the FILES form of the install command. The
|
directly replaced by the ``FILES`` form of the :command:`install`
|
||||||
regexp form can be expressed more clearly using the GLOB form of the
|
command. The regexp form can be expressed more clearly using the ``GLOB``
|
||||||
file command.
|
form of the :command:`file` command.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@ -32,8 +32,8 @@ expression will be installed.
|
|||||||
|
|
||||||
install_files(<dir> FILES file file ...)
|
install_files(<dir> FILES file file ...)
|
||||||
|
|
||||||
Any files listed after the FILES keyword will be installed explicitly
|
Any files listed after the ``FILES`` keyword will be installed explicitly
|
||||||
from the names given. Full paths are allowed in this form.
|
from the names given. Full paths are allowed in this form.
|
||||||
|
|
||||||
The directory <dir> is relative to the installation prefix, which is
|
The directory ``<dir>`` is relative to the installation prefix, which is
|
||||||
stored in the variable CMAKE_INSTALL_PREFIX.
|
stored in the variable :variable:`CMAKE_INSTALL_PREFIX`.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
install_programs
|
install_programs
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
Deprecated. Use the install(PROGRAMS ) command instead.
|
Deprecated. Use the :command:`install(PROGRAMS)` command instead.
|
||||||
|
|
||||||
This command has been superceded by the install command. It is
|
This command has been superceded by the :command:`install` command. It is
|
||||||
provided for compatibility with older CMake code. The FILES form is
|
provided for compatibility with older CMake code. The ``FILES`` form is
|
||||||
directly replaced by the PROGRAMS form of the INSTALL command. The
|
directly replaced by the ``PROGRAMS`` form of the :command:`install`
|
||||||
regexp form can be expressed more clearly using the GLOB form of the
|
command. The regexp form can be expressed more clearly using the ``GLOB``
|
||||||
FILE command.
|
form of the :command:`file` command.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ FILE command.
|
|||||||
install_programs(<dir> FILES file1 [file2 ...])
|
install_programs(<dir> FILES file1 [file2 ...])
|
||||||
|
|
||||||
Create rules to install the listed programs into the given directory.
|
Create rules to install the listed programs into the given directory.
|
||||||
Use the FILES argument to guarantee that the file list version of the
|
Use the ``FILES`` argument to guarantee that the file list version of the
|
||||||
command will be used even when there is only one argument.
|
command will be used even when there is only one argument.
|
||||||
|
|
||||||
::
|
::
|
||||||
@ -26,8 +26,9 @@ In the second form any program in the current source directory that
|
|||||||
matches the regular expression will be installed.
|
matches the regular expression will be installed.
|
||||||
|
|
||||||
This command is intended to install programs that are not built by
|
This command is intended to install programs that are not built by
|
||||||
cmake, such as shell scripts. See the TARGETS form of the INSTALL
|
cmake, such as shell scripts. See the ``TARGETS`` form of the
|
||||||
command to create installation rules for targets built by cmake.
|
:command:`install` command to create installation rules for targets built
|
||||||
|
by cmake.
|
||||||
|
|
||||||
The directory <dir> is relative to the installation prefix, which is
|
The directory ``<dir>`` is relative to the installation prefix, which is
|
||||||
stored in the variable CMAKE_INSTALL_PREFIX.
|
stored in the variable :variable:`CMAKE_INSTALL_PREFIX`.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
install_targets
|
install_targets
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Deprecated. Use the install(TARGETS ) command instead.
|
Deprecated. Use the :command:`install(TARGETS)` command instead.
|
||||||
|
|
||||||
This command has been superceded by the install command. It is
|
This command has been superceded by the :command:`install` command. It is
|
||||||
provided for compatibility with older CMake code.
|
provided for compatibility with older CMake code.
|
||||||
|
|
||||||
::
|
::
|
||||||
@ -11,7 +11,7 @@ provided for compatibility with older CMake code.
|
|||||||
install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
|
install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
|
||||||
|
|
||||||
Create rules to install the listed targets into the given directory.
|
Create rules to install the listed targets into the given directory.
|
||||||
The directory <dir> is relative to the installation prefix, which is
|
The directory ``<dir>`` is relative to the installation prefix, which is
|
||||||
stored in the variable CMAKE_INSTALL_PREFIX. If RUNTIME_DIRECTORY is
|
stored in the variable :variable:`CMAKE_INSTALL_PREFIX`. If
|
||||||
specified, then on systems with special runtime files (Windows DLL),
|
``RUNTIME_DIRECTORY`` is specified, then on systems with special runtime
|
||||||
the files will be copied to that directory.
|
files (Windows DLL), the files will be copied to that directory.
|
||||||
|
@ -10,10 +10,10 @@ Specify directories in which the linker will look for libraries.
|
|||||||
Specify the paths in which the linker should search for libraries.
|
Specify the paths in which the linker should search for libraries.
|
||||||
The command will apply only to targets created after it is called.
|
The command will apply only to targets created after it is called.
|
||||||
Relative paths given to this command are interpreted as relative to
|
Relative paths given to this command are interpreted as relative to
|
||||||
the current source directory, see CMP0015.
|
the current source directory, see :policy:`CMP0015`.
|
||||||
|
|
||||||
Note that this command is rarely necessary. Library locations
|
Note that this command is rarely necessary. Library locations
|
||||||
returned by find_package() and find_library() are absolute paths.
|
returned by :command:`find_package` and :command:`find_library` are
|
||||||
Pass these absolute library file paths directly to the
|
absolute paths. Pass these absolute library file paths directly to the
|
||||||
target_link_libraries() command. CMake will ensure the linker finds
|
:command:`target_link_libraries` command. CMake will ensure the linker finds
|
||||||
them.
|
them.
|
||||||
|
@ -17,45 +17,45 @@ List operations.
|
|||||||
list(REVERSE <list>)
|
list(REVERSE <list>)
|
||||||
list(SORT <list>)
|
list(SORT <list>)
|
||||||
|
|
||||||
LENGTH will return a given list's length.
|
``LENGTH`` will return a given list's length.
|
||||||
|
|
||||||
GET will return list of elements specified by indices from the list.
|
``GET`` will return list of elements specified by indices from the list.
|
||||||
|
|
||||||
APPEND will append elements to the list.
|
``APPEND`` will append elements to the list.
|
||||||
|
|
||||||
FIND will return the index of the element specified in the list or -1
|
``FIND`` will return the index of the element specified in the list or -1
|
||||||
if it wasn't found.
|
if it wasn't found.
|
||||||
|
|
||||||
INSERT will insert elements to the list to the specified location.
|
``INSERT`` will insert elements to the list to the specified location.
|
||||||
|
|
||||||
REMOVE_AT and REMOVE_ITEM will remove items from the list. The
|
``REMOVE_AT`` and ``REMOVE_ITEM`` will remove items from the list. The
|
||||||
difference is that REMOVE_ITEM will remove the given items, while
|
difference is that ``REMOVE_ITEM`` will remove the given items, while
|
||||||
REMOVE_AT will remove the items at the given indices.
|
``REMOVE_AT`` will remove the items at the given indices.
|
||||||
|
|
||||||
REMOVE_DUPLICATES will remove duplicated items in the list.
|
``REMOVE_DUPLICATES`` will remove duplicated items in the list.
|
||||||
|
|
||||||
REVERSE reverses the contents of the list in-place.
|
``REVERSE`` reverses the contents of the list in-place.
|
||||||
|
|
||||||
SORT sorts the list in-place alphabetically.
|
``SORT`` sorts the list in-place alphabetically.
|
||||||
|
|
||||||
The list subcommands APPEND, INSERT, REMOVE_AT, REMOVE_ITEM,
|
The list subcommands ``APPEND``, ``INSERT``, ``REMOVE_AT``, ``REMOVE_ITEM``,
|
||||||
REMOVE_DUPLICATES, REVERSE and SORT may create new values for the list
|
``REMOVE_DUPLICATES``, ``REVERSE`` and ``SORT`` may create new values for
|
||||||
within the current CMake variable scope. Similar to the SET command,
|
the list within the current CMake variable scope. Similar to the
|
||||||
the LIST command creates new variable values in the current scope,
|
:command:`set` command, the LIST command creates new variable values in the
|
||||||
even if the list itself is actually defined in a parent scope. To
|
current scope, even if the list itself is actually defined in a parent
|
||||||
propagate the results of these operations upwards, use SET with
|
scope. To propagate the results of these operations upwards, use
|
||||||
PARENT_SCOPE, SET with CACHE INTERNAL, or some other means of value
|
:command:`set` with ``PARENT_SCOPE``, :command:`set` with
|
||||||
propagation.
|
``CACHE INTERNAL``, or some other means of value propagation.
|
||||||
|
|
||||||
NOTES: A list in cmake is a ; separated group of strings. To create a
|
NOTES: A list in cmake is a ``;`` separated group of strings. To create a
|
||||||
list the set command can be used. For example, set(var a b c d e)
|
list the set command can be used. For example, ``set(var a b c d e)``
|
||||||
creates a list with a;b;c;d;e, and set(var "a b c d e") creates a
|
creates a list with ``a;b;c;d;e``, and ``set(var "a b c d e")`` creates a
|
||||||
string or a list with one item in it. (Note macro arguments are not
|
string or a list with one item in it. (Note macro arguments are not
|
||||||
variables, and therefore cannot be used in LIST commands.)
|
variables, and therefore cannot be used in LIST commands.)
|
||||||
|
|
||||||
When specifying index values, if <element index> is 0 or greater, it
|
When specifying index values, if ``<element index>`` is 0 or greater, it
|
||||||
is indexed from the beginning of the list, with 0 representing the
|
is indexed from the beginning of the list, with 0 representing the
|
||||||
first list element. If <element index> is -1 or lesser, it is indexed
|
first list element. If ``<element index>`` is -1 or lesser, it is indexed
|
||||||
from the end of the list, with -1 representing the last list element.
|
from the end of the list, with -1 representing the last list element.
|
||||||
Be careful when counting with negative indices: they do not start from
|
Be careful when counting with negative indices: they do not start from
|
||||||
0. -0 is equivalent to 0, the first list element.
|
0. -0 is equivalent to 0, the first list element.
|
||||||
|
@ -19,9 +19,9 @@ does not create entries in the local project's cache.
|
|||||||
|
|
||||||
Load in the values from another cache and store them in the local
|
Load in the values from another cache and store them in the local
|
||||||
project's cache as internal entries. This is useful for a project
|
project's cache as internal entries. This is useful for a project
|
||||||
that depends on another project built in a different tree. EXCLUDE
|
that depends on another project built in a different tree. ``EXCLUDE``
|
||||||
option can be used to provide a list of entries to be excluded.
|
option can be used to provide a list of entries to be excluded.
|
||||||
INCLUDE_INTERNALS can be used to provide a list of internal entries to
|
``INCLUDE_INTERNALS`` can be used to provide a list of internal entries to
|
||||||
be included. Normally, no internal entries are brought in. Use of
|
be included. Normally, no internal entries are brought in. Use of
|
||||||
this form of the command is strongly discouraged, but it is provided
|
this form of the command is strongly discouraged, but it is provided
|
||||||
for backward compatibility.
|
for backward compatibility.
|
||||||
|
@ -11,9 +11,9 @@ Load a command into a running CMake.
|
|||||||
|
|
||||||
The given locations are searched for a library whose name is
|
The given locations are searched for a library whose name is
|
||||||
cmCOMMAND_NAME. If found, it is loaded as a module and the command is
|
cmCOMMAND_NAME. If found, it is loaded as a module and the command is
|
||||||
added to the set of available CMake commands. Usually, TRY_COMPILE is
|
added to the set of available CMake commands. Usually,
|
||||||
used before this command to compile the module. If the command is
|
:command:`try_compile` is used before this command to compile the
|
||||||
successfully loaded a variable named
|
module. If the command is successfully loaded a variable named
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
make_directory
|
make_directory
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Deprecated. Use the file(MAKE_DIRECTORY ) command instead.
|
Deprecated. Use the :command:`file(MAKE_DIRECTORY)` command instead.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ Mark cmake cached variables as advanced.
|
|||||||
|
|
||||||
Mark the named cached variables as advanced. An advanced variable
|
Mark the named cached variables as advanced. An advanced variable
|
||||||
will not be displayed in any of the cmake GUIs unless the show
|
will not be displayed in any of the cmake GUIs unless the show
|
||||||
advanced option is on. If CLEAR is the first argument advanced
|
advanced option is on. If ``CLEAR`` is the first argument advanced
|
||||||
variables are changed back to unadvanced. If FORCE is the first
|
variables are changed back to unadvanced. If ``FORCE`` is the first
|
||||||
argument, then the variable is made advanced. If neither FORCE nor
|
argument, then the variable is made advanced. If neither ``FORCE`` nor
|
||||||
CLEAR is specified, new values will be marked as advanced, but if the
|
``CLEAR`` is specified, new values will be marked as advanced, but if the
|
||||||
variable already has an advanced/non-advanced state, it will not be
|
variable already has an advanced/non-advanced state, it will not be
|
||||||
changed.
|
changed.
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ Mathematical expressions.
|
|||||||
|
|
||||||
math(EXPR <output variable> <math expression>)
|
math(EXPR <output variable> <math expression>)
|
||||||
|
|
||||||
EXPR evaluates mathematical expression and returns result in the
|
``EXPR`` evaluates mathematical expression and returns result in the
|
||||||
output variable. Example mathematical expression is '5 * ( 10 + 13
|
output variable. Example mathematical expression is '5 * ( 10 + 13
|
||||||
)'. Supported operators are + - * / % | & ^ ~ << >> * / %. They have
|
)'. Supported operators are + - * / % | & ^ ~ << >> * / %. They have
|
||||||
the same meaning as they do in C code.
|
the same meaning as they do in C code.
|
||||||
|
@ -7,7 +7,7 @@ Display a message to the user.
|
|||||||
|
|
||||||
message([<mode>] "message to display" ...)
|
message([<mode>] "message to display" ...)
|
||||||
|
|
||||||
The optional <mode> keyword determines the type of message:
|
The optional ``<mode>`` keyword determines the type of message:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ Provides an option that the user can optionally select.
|
|||||||
option(<option_variable> "help string describing option"
|
option(<option_variable> "help string describing option"
|
||||||
[initial value])
|
[initial value])
|
||||||
|
|
||||||
Provide an option for the user to select as ON or OFF. If no initial
|
Provide an option for the user to select as ``ON`` or ``OFF``. If no
|
||||||
value is provided, OFF is used.
|
initial value is provided, ``OFF`` is used.
|
||||||
|
|
||||||
If you have options that depend on the values of other options, see
|
If you have options that depend on the values of other options, see
|
||||||
the module help for CMakeDependentOption.
|
the module help for :module:`CMakeDependentOption`.
|
||||||
|
@ -9,4 +9,4 @@ Create Qt Wrappers.
|
|||||||
SourceLists ...)
|
SourceLists ...)
|
||||||
|
|
||||||
Produce moc files for all the .h files listed in the SourceLists. The
|
Produce moc files for all the .h files listed in the SourceLists. The
|
||||||
moc files will be added to the library using the DestName source list.
|
moc files will be added to the library using the ``DestName`` source list.
|
||||||
|
@ -9,6 +9,6 @@ Create Qt user interfaces Wrappers.
|
|||||||
SourcesDestName SourceLists ...)
|
SourcesDestName SourceLists ...)
|
||||||
|
|
||||||
Produce .h and .cxx files for all the .ui files listed in the
|
Produce .h and .cxx files for all the .ui files listed in the
|
||||||
SourceLists. The .h files will be added to the library using the
|
``SourceLists``. The .h files will be added to the library using the
|
||||||
HeadersDestNamesource list. The .cxx files will be added to the
|
``HeadersDestNamesource`` list. The .cxx files will be added to the
|
||||||
library using the SourcesDestNamesource list.
|
library using the ``SourcesDestNamesource`` list.
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
remove
|
remove
|
||||||
------
|
------
|
||||||
|
|
||||||
Deprecated. Use the list(REMOVE_ITEM ) command instead.
|
Deprecated. Use the :command:`list(REMOVE_ITEM)` command instead.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
remove(VAR VALUE VALUE ...)
|
remove(VAR VALUE VALUE ...)
|
||||||
|
|
||||||
Removes VALUE from the variable VAR. This is typically used to remove
|
Removes ``VALUE`` from the variable ``VAR``. This is typically used to
|
||||||
entries from a vector (e.g. semicolon separated list). VALUE is
|
remove entries from a vector (e.g. semicolon separated list). ``VALUE``
|
||||||
expanded.
|
is expanded.
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
remove_definitions
|
remove_definitions
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
Removes -D define flags added by add_definitions.
|
Removes -D define flags added by :command:`add_definitions`.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
remove_definitions(-DFOO -DBAR ...)
|
remove_definitions(-DFOO -DBAR ...)
|
||||||
|
|
||||||
Removes flags (added by add_definitions) from the compiler command
|
Removes flags (added by :command:`add_definitions`) from the compiler
|
||||||
line for sources in the current directory and below.
|
command line for sources in the current directory and below.
|
||||||
|
@ -8,11 +8,11 @@ Return from a file, directory or function.
|
|||||||
return()
|
return()
|
||||||
|
|
||||||
Returns from a file, directory or function. When this command is
|
Returns from a file, directory or function. When this command is
|
||||||
encountered in an included file (via include() or find_package()), it
|
encountered in an included file (via :command:`include` or
|
||||||
causes processing of the current file to stop and control is returned
|
:command:`find_package`), it causes processing of the current file to stop
|
||||||
to the including file. If it is encountered in a file which is not
|
and control is returned to the including file. If it is encountered in a
|
||||||
included by another file, e.g. a CMakeLists.txt, control is returned
|
file which is not included by another file, e.g. a ``CMakeLists.txt``,
|
||||||
to the parent directory if there is one. If return is called in a
|
control is returned to the parent directory if there is one. If return is
|
||||||
function, control is returned to the caller of the function. Note
|
called in a function, control is returned to the caller of the function.
|
||||||
that a macro is not a function and does not handle return like a
|
Note that a macro is not a function and does not handle return like a
|
||||||
function does.
|
function does.
|
||||||
|
@ -8,15 +8,15 @@ Parse space-separated arguments into a semicolon-separated list.
|
|||||||
separate_arguments(<var> <UNIX|WINDOWS>_COMMAND "<args>")
|
separate_arguments(<var> <UNIX|WINDOWS>_COMMAND "<args>")
|
||||||
|
|
||||||
Parses a unix- or windows-style command-line string "<args>" and
|
Parses a unix- or windows-style command-line string "<args>" and
|
||||||
stores a semicolon-separated list of the arguments in <var>. The
|
stores a semicolon-separated list of the arguments in ``<var>``. The
|
||||||
entire command line must be given in one "<args>" argument.
|
entire command line must be given in one "<args>" argument.
|
||||||
|
|
||||||
The UNIX_COMMAND mode separates arguments by unquoted whitespace. It
|
The ``UNIX_COMMAND`` mode separates arguments by unquoted whitespace. It
|
||||||
recognizes both single-quote and double-quote pairs. A backslash
|
recognizes both single-quote and double-quote pairs. A backslash
|
||||||
escapes the next literal character (\" is "); there are no special
|
escapes the next literal character (\" is "); there are no special
|
||||||
escapes (\n is just n).
|
escapes (\n is just n).
|
||||||
|
|
||||||
The WINDOWS_COMMAND mode parses a windows command-line using the same
|
The ``WINDOWS_COMMAND`` mode parses a windows command-line using the same
|
||||||
syntax the runtime library uses to construct argv at startup. It
|
syntax the runtime library uses to construct argv at startup. It
|
||||||
separates arguments by whitespace that is not double-quoted.
|
separates arguments by whitespace that is not double-quoted.
|
||||||
Backslashes are literal unless they precede double-quotes. See the
|
Backslashes are literal unless they precede double-quotes. See the
|
||||||
@ -26,6 +26,6 @@ MSDN article "Parsing C Command-Line Arguments" for details.
|
|||||||
|
|
||||||
separate_arguments(VARIABLE)
|
separate_arguments(VARIABLE)
|
||||||
|
|
||||||
Convert the value of VARIABLE to a semi-colon separated list. All
|
Convert the value of ``VARIABLE`` to a semi-colon separated list. All
|
||||||
spaces are replaced with ';'. This helps with generating command
|
spaces are replaced with ';'. This helps with generating command
|
||||||
lines.
|
lines.
|
||||||
|
@ -64,3 +64,6 @@ property value in the form of a semicolon-separated list. If the
|
|||||||
value. If the ``APPEND_STRING`` option is given the string is append to any
|
value. If the ``APPEND_STRING`` option is given the string is append to any
|
||||||
existing property value as string, i.e. it results in a longer string
|
existing property value as string, i.e. it results in a longer string
|
||||||
and not a list of strings.
|
and not a list of strings.
|
||||||
|
|
||||||
|
See the :manual:`cmake-properties(7)` manual for a list of properties
|
||||||
|
in each scope.
|
||||||
|
@ -12,93 +12,7 @@ Targets can have properties that affect how they are built.
|
|||||||
Set properties on a target. The syntax for the command is to list all
|
Set properties on a target. The syntax for the command is to list all
|
||||||
the files you want to change, and then provide the values you want to
|
the files you want to change, and then provide the values you want to
|
||||||
set next. You can use any prop value pair you want and extract it
|
set next. You can use any prop value pair you want and extract it
|
||||||
later with the GET_TARGET_PROPERTY command.
|
later with the :command:`get_property` or :command:`get_target_property`
|
||||||
|
command.
|
||||||
|
|
||||||
Properties that affect the name of a target's output file are as
|
See :ref:`Target Properties` for the list of properties known to CMake.
|
||||||
follows. The PREFIX and SUFFIX properties override the default target
|
|
||||||
name prefix (such as "lib") and suffix (such as ".so"). IMPORT_PREFIX
|
|
||||||
and IMPORT_SUFFIX are the equivalent properties for the import library
|
|
||||||
corresponding to a DLL (for SHARED library targets). OUTPUT_NAME sets
|
|
||||||
the real name of a target when it is built and can be used to help
|
|
||||||
create two targets of the same name even though CMake requires unique
|
|
||||||
logical target names. There is also a <CONFIG>_OUTPUT_NAME that can
|
|
||||||
set the output name on a per-configuration basis. <CONFIG>_POSTFIX
|
|
||||||
sets a postfix for the real name of the target when it is built under
|
|
||||||
the configuration named by <CONFIG> (in upper-case, such as
|
|
||||||
"DEBUG_POSTFIX"). The value of this property is initialized when the
|
|
||||||
target is created to the value of the variable CMAKE_<CONFIG>_POSTFIX
|
|
||||||
(except for executable targets because earlier CMake versions which
|
|
||||||
did not use this variable for executables).
|
|
||||||
|
|
||||||
The LINK_FLAGS property can be used to add extra flags to the link
|
|
||||||
step of a target. LINK_FLAGS_<CONFIG> will add to the configuration
|
|
||||||
<CONFIG>, for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO.
|
|
||||||
DEFINE_SYMBOL sets the name of the preprocessor symbol defined when
|
|
||||||
compiling sources in a shared library. If not set here then it is set
|
|
||||||
to target_EXPORTS by default (with some substitutions if the target is
|
|
||||||
not a valid C identifier). This is useful for headers to know whether
|
|
||||||
they are being included from inside their library or outside to
|
|
||||||
properly setup dllexport/dllimport decorations. The COMPILE_FLAGS
|
|
||||||
property sets additional compiler flags used to build sources within
|
|
||||||
the target. It may also be used to pass additional preprocessor
|
|
||||||
definitions.
|
|
||||||
|
|
||||||
The LINKER_LANGUAGE property is used to change the tool used to link
|
|
||||||
an executable or shared library. The default is set the language to
|
|
||||||
match the files in the library. CXX and C are common values for this
|
|
||||||
property.
|
|
||||||
|
|
||||||
For shared libraries VERSION and SOVERSION can be used to specify the
|
|
||||||
build version and API version respectively. When building or
|
|
||||||
installing appropriate symlinks are created if the platform supports
|
|
||||||
symlinks and the linker supports so-names. If only one of both is
|
|
||||||
specified the missing is assumed to have the same version number. For
|
|
||||||
executables VERSION can be used to specify the build version. When
|
|
||||||
building or installing appropriate symlinks are created if the
|
|
||||||
platform supports symlinks. For shared libraries and executables on
|
|
||||||
Windows the VERSION attribute is parsed to extract a "major.minor"
|
|
||||||
version number. These numbers are used as the image version of the
|
|
||||||
binary.
|
|
||||||
|
|
||||||
There are a few properties used to specify RPATH rules. INSTALL_RPATH
|
|
||||||
is a semicolon-separated list specifying the rpath to use in installed
|
|
||||||
targets (for platforms that support it). INSTALL_RPATH_USE_LINK_PATH
|
|
||||||
is a boolean that if set to true will append directories in the linker
|
|
||||||
search path and outside the project to the INSTALL_RPATH.
|
|
||||||
SKIP_BUILD_RPATH is a boolean specifying whether to skip automatic
|
|
||||||
generation of an rpath allowing the target to run from the build tree.
|
|
||||||
BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link the
|
|
||||||
target in the build tree with the INSTALL_RPATH. This takes
|
|
||||||
precedence over SKIP_BUILD_RPATH and avoids the need for relinking
|
|
||||||
before installation. INSTALL_NAME_DIR is a string specifying the
|
|
||||||
directory portion of the "install_name" field of shared libraries on
|
|
||||||
Mac OSX to use in the installed targets. When the target is created
|
|
||||||
the values of the variables CMAKE_INSTALL_RPATH,
|
|
||||||
CMAKE_INSTALL_RPATH_USE_LINK_PATH, CMAKE_SKIP_BUILD_RPATH,
|
|
||||||
CMAKE_BUILD_WITH_INSTALL_RPATH, and CMAKE_INSTALL_NAME_DIR are used to
|
|
||||||
initialize these properties.
|
|
||||||
|
|
||||||
PROJECT_LABEL can be used to change the name of the target in an IDE
|
|
||||||
like visual studio. VS_KEYWORD can be set to change the visual studio
|
|
||||||
keyword, for example Qt integration works better if this is set to
|
|
||||||
Qt4VSv1.0.
|
|
||||||
|
|
||||||
VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER and
|
|
||||||
VS_SCC_AUXPATH can be set to add support for source control bindings
|
|
||||||
in a Visual Studio project file.
|
|
||||||
|
|
||||||
VS_GLOBAL_<variable> can be set to add a Visual Studio
|
|
||||||
project-specific global variable. Qt integration works better if
|
|
||||||
VS_GLOBAL_QtVersion is set to the Qt version FindQt4.cmake found. For
|
|
||||||
example, "4.7.3"
|
|
||||||
|
|
||||||
The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the old
|
|
||||||
way to specify CMake scripts to run before and after installing a
|
|
||||||
target. They are used only when the old INSTALL_TARGETS command is
|
|
||||||
used to install the target. Use the INSTALL command instead.
|
|
||||||
|
|
||||||
The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual studio
|
|
||||||
generators. If it is set to 1 the target will not be part of the
|
|
||||||
default build when you select "Build Solution". This can also be set
|
|
||||||
on a per-configuration basis using
|
|
||||||
EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>.
|
|
||||||
|
@ -1,99 +1,84 @@
|
|||||||
string
|
string
|
||||||
------
|
------
|
||||||
|
|
||||||
|
.. only:: html
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
String operations.
|
String operations.
|
||||||
|
|
||||||
|
Search and Replace
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
FIND
|
||||||
|
""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(FIND <string> <substring> <output variable> [REVERSE])
|
||||||
|
|
||||||
|
Return the position where the given substring was found in
|
||||||
|
the supplied string. If the ``REVERSE`` flag was used, the command will
|
||||||
|
search for the position of the last occurrence of the specified
|
||||||
|
substring. If the substring is not found, a position of -1 is returned.
|
||||||
|
|
||||||
|
REPLACE
|
||||||
|
"""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(REPLACE <match_string>
|
||||||
|
<replace_string> <output variable>
|
||||||
|
<input> [<input>...])
|
||||||
|
|
||||||
|
Replace all occurrences of ``match_string`` in the input
|
||||||
|
with ``replace_string`` and store the result in the output.
|
||||||
|
|
||||||
|
Regular Expressions
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
REGEX MATCH
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
string(REGEX MATCH <regular_expression>
|
string(REGEX MATCH <regular_expression>
|
||||||
<output variable> <input> [<input>...])
|
<output variable> <input> [<input>...])
|
||||||
|
|
||||||
|
Match the regular expression once and store the match in the output variable.
|
||||||
|
All ``<input>`` arguments are concatenated before matching.
|
||||||
|
|
||||||
|
REGEX MATCHALL
|
||||||
|
""""""""""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
string(REGEX MATCHALL <regular_expression>
|
string(REGEX MATCHALL <regular_expression>
|
||||||
<output variable> <input> [<input>...])
|
<output variable> <input> [<input>...])
|
||||||
|
|
||||||
|
Match the regular expression as many times as possible and store the matches
|
||||||
|
in the output variable as a list.
|
||||||
|
All ``<input>`` arguments are concatenated before matching.
|
||||||
|
|
||||||
|
REGEX REPLACE
|
||||||
|
"""""""""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
string(REGEX REPLACE <regular_expression>
|
string(REGEX REPLACE <regular_expression>
|
||||||
<replace_expression> <output variable>
|
<replace_expression> <output variable>
|
||||||
<input> [<input>...])
|
<input> [<input>...])
|
||||||
string(REPLACE <match_string>
|
|
||||||
<replace_string> <output variable>
|
|
||||||
<input> [<input>...])
|
|
||||||
string(CONCAT <output variable> [<input>...])
|
|
||||||
string(<MD5|SHA1|SHA224|SHA256|SHA384|SHA512>
|
|
||||||
<output variable> <input>)
|
|
||||||
string(COMPARE EQUAL <string1> <string2> <output variable>)
|
|
||||||
string(COMPARE NOTEQUAL <string1> <string2> <output variable>)
|
|
||||||
string(COMPARE LESS <string1> <string2> <output variable>)
|
|
||||||
string(COMPARE GREATER <string1> <string2> <output variable>)
|
|
||||||
string(ASCII <number> [<number> ...] <output variable>)
|
|
||||||
string(CONFIGURE <string1> <output variable>
|
|
||||||
[@ONLY] [ESCAPE_QUOTES])
|
|
||||||
string(TOUPPER <string1> <output variable>)
|
|
||||||
string(TOLOWER <string1> <output variable>)
|
|
||||||
string(LENGTH <string> <output variable>)
|
|
||||||
string(SUBSTRING <string> <begin> <length> <output variable>)
|
|
||||||
string(STRIP <string> <output variable>)
|
|
||||||
string(RANDOM [LENGTH <length>] [ALPHABET <alphabet>]
|
|
||||||
[RANDOM_SEED <seed>] <output variable>)
|
|
||||||
string(FIND <string> <substring> <output variable> [REVERSE])
|
|
||||||
string(TIMESTAMP <output variable> [<format string>] [UTC])
|
|
||||||
string(MAKE_C_IDENTIFIER <input string> <output variable>)
|
|
||||||
string(GENEX_STRIP <input string> <output variable>)
|
|
||||||
string(UUID <output variable> NAMESPACE <namespace> NAME <name>
|
|
||||||
TYPE <MD5|SHA1> [UPPER])
|
|
||||||
|
|
||||||
REGEX MATCH will match the regular expression once and store the match
|
Match the regular expression as many times as possible and substitute the
|
||||||
in the output variable.
|
replacement expression for the match in the output.
|
||||||
|
All ``<input>`` arguments are concatenated before matching.
|
||||||
|
|
||||||
REGEX MATCHALL will match the regular expression as many times as
|
The replace expression may refer to paren-delimited subexpressions of the
|
||||||
possible and store the matches in the output variable as a list.
|
match using ``\1``, ``\2``, ..., ``\9``. Note that two backslashes (``\\1``)
|
||||||
|
are required in CMake code to get a backslash through argument parsing.
|
||||||
|
|
||||||
REGEX REPLACE will match the regular expression as many times as
|
Regex Specification
|
||||||
possible and substitute the replacement expression for the match in
|
"""""""""""""""""""
|
||||||
the output. The replace expression may refer to paren-delimited
|
|
||||||
subexpressions of the match using \1, \2, ..., \9. Note that two
|
|
||||||
backslashes (\\1) are required in CMake code to get a backslash
|
|
||||||
through argument parsing.
|
|
||||||
|
|
||||||
REPLACE will replace all occurrences of match_string in the input with
|
|
||||||
replace_string and store the result in the output.
|
|
||||||
|
|
||||||
CONCAT will concatenate all the input arguments together and store
|
|
||||||
the result in the named output variable.
|
|
||||||
|
|
||||||
MD5, SHA1, SHA224, SHA256, SHA384, and SHA512 will compute a
|
|
||||||
cryptographic hash of the input string.
|
|
||||||
|
|
||||||
COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and store
|
|
||||||
true or false in the output variable.
|
|
||||||
|
|
||||||
ASCII will convert all numbers into corresponding ASCII characters.
|
|
||||||
|
|
||||||
CONFIGURE will transform a string like CONFIGURE_FILE transforms a
|
|
||||||
file.
|
|
||||||
|
|
||||||
TOUPPER/TOLOWER will convert string to upper/lower characters.
|
|
||||||
|
|
||||||
LENGTH will return a given string's length.
|
|
||||||
|
|
||||||
SUBSTRING will return a substring of a given string. If length is -1
|
|
||||||
the remainder of the string starting at begin will be returned.
|
|
||||||
If string is shorter than length then end of string is used instead.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
CMake 3.1 and below reported an error if length pointed past
|
|
||||||
the end of string.
|
|
||||||
|
|
||||||
STRIP will return a substring of a given string with leading and
|
|
||||||
trailing spaces removed.
|
|
||||||
|
|
||||||
RANDOM will return a random string of given length consisting of
|
|
||||||
characters from the given alphabet. Default length is 5 characters
|
|
||||||
and default alphabet is all numbers and upper and lower case letters.
|
|
||||||
If an integer RANDOM_SEED is given, its value will be used to seed the
|
|
||||||
random number generator.
|
|
||||||
|
|
||||||
FIND will return the position where the given substring was found in
|
|
||||||
the supplied string. If the REVERSE flag was used, the command will
|
|
||||||
search for the position of the last occurrence of the specified
|
|
||||||
substring.
|
|
||||||
|
|
||||||
The following characters have special meaning in regular expressions:
|
The following characters have special meaning in regular expressions:
|
||||||
|
|
||||||
@ -118,21 +103,170 @@ The following characters have special meaning in regular expressions:
|
|||||||
by all regular expression-related commands, including
|
by all regular expression-related commands, including
|
||||||
e.g. if( MATCHES ), in the variables CMAKE_MATCH_(0..9).
|
e.g. if( MATCHES ), in the variables CMAKE_MATCH_(0..9).
|
||||||
|
|
||||||
``*``, ``+`` and ``?`` have higher precedence than concatenation. | has lower
|
``*``, ``+`` and ``?`` have higher precedence than concatenation. ``|``
|
||||||
precedence than concatenation. This means that the regular expression
|
has lower precedence than concatenation. This means that the regular
|
||||||
"^ab+d$" matches "abbd" but not "ababd", and the regular expression
|
expression ``^ab+d$`` matches ``abbd`` but not ``ababd``, and the regular
|
||||||
"^(ab|cd)$" matches "ab" but not "abd".
|
expression ``^(ab|cd)$`` matches ``ab`` but not ``abd``.
|
||||||
|
|
||||||
TIMESTAMP will write a string representation of the current date
|
Manipulation
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
APPEND
|
||||||
|
""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(APPEND <string variable> [<input>...])
|
||||||
|
|
||||||
|
Append all the input arguments to the string.
|
||||||
|
|
||||||
|
CONCAT
|
||||||
|
""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(CONCAT <output variable> [<input>...])
|
||||||
|
|
||||||
|
Concatenate all the input arguments together and store
|
||||||
|
the result in the named output variable.
|
||||||
|
|
||||||
|
TOLOWER
|
||||||
|
"""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(TOLOWER <string1> <output variable>)
|
||||||
|
|
||||||
|
Convert string to lower characters.
|
||||||
|
|
||||||
|
TOUPPER
|
||||||
|
"""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(TOUPPER <string1> <output variable>)
|
||||||
|
|
||||||
|
Convert string to upper characters.
|
||||||
|
|
||||||
|
LENGTH
|
||||||
|
""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(LENGTH <string> <output variable>)
|
||||||
|
|
||||||
|
Store in an output variable a given string's length.
|
||||||
|
|
||||||
|
SUBSTRING
|
||||||
|
"""""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(SUBSTRING <string> <begin> <length> <output variable>)
|
||||||
|
|
||||||
|
Store in an output variable a substring of a given string. If length is
|
||||||
|
``-1`` the remainder of the string starting at begin will be returned.
|
||||||
|
If string is shorter than length then end of string is used instead.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
CMake 3.1 and below reported an error if length pointed past
|
||||||
|
the end of string.
|
||||||
|
|
||||||
|
STRIP
|
||||||
|
"""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(STRIP <string> <output variable>)
|
||||||
|
|
||||||
|
Store in an output variable a substring of a given string with leading and
|
||||||
|
trailing spaces removed.
|
||||||
|
|
||||||
|
GENEX_STRIP
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(GENEX_STRIP <input string> <output variable>)
|
||||||
|
|
||||||
|
Strip any :manual:`generator expressions <cmake-generator-expressions(7)>`
|
||||||
|
from the ``input string`` and store the result in the ``output variable``.
|
||||||
|
|
||||||
|
Comparison
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(COMPARE EQUAL <string1> <string2> <output variable>)
|
||||||
|
string(COMPARE NOTEQUAL <string1> <string2> <output variable>)
|
||||||
|
string(COMPARE LESS <string1> <string2> <output variable>)
|
||||||
|
string(COMPARE GREATER <string1> <string2> <output variable>)
|
||||||
|
|
||||||
|
Compare the strings and store true or false in the output variable.
|
||||||
|
|
||||||
|
Hashing
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(<MD5|SHA1|SHA224|SHA256|SHA384|SHA512>
|
||||||
|
<output variable> <input>)
|
||||||
|
|
||||||
|
Compute a cryptographic hash of the input string.
|
||||||
|
|
||||||
|
Generation
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
ASCII
|
||||||
|
"""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(ASCII <number> [<number> ...] <output variable>)
|
||||||
|
|
||||||
|
Convert all numbers into corresponding ASCII characters.
|
||||||
|
|
||||||
|
CONFIGURE
|
||||||
|
"""""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(CONFIGURE <string1> <output variable>
|
||||||
|
[@ONLY] [ESCAPE_QUOTES])
|
||||||
|
|
||||||
|
Transform a string like :command:`configure_file` transforms a file.
|
||||||
|
|
||||||
|
RANDOM
|
||||||
|
""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(RANDOM [LENGTH <length>] [ALPHABET <alphabet>]
|
||||||
|
[RANDOM_SEED <seed>] <output variable>)
|
||||||
|
|
||||||
|
Return a random string of given length consisting of
|
||||||
|
characters from the given alphabet. Default length is 5 characters
|
||||||
|
and default alphabet is all numbers and upper and lower case letters.
|
||||||
|
If an integer ``RANDOM_SEED`` is given, its value will be used to seed the
|
||||||
|
random number generator.
|
||||||
|
|
||||||
|
TIMESTAMP
|
||||||
|
"""""""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(TIMESTAMP <output variable> [<format string>] [UTC])
|
||||||
|
|
||||||
|
Write a string representation of the current date
|
||||||
and/or time to the output variable.
|
and/or time to the output variable.
|
||||||
|
|
||||||
Should the command be unable to obtain a timestamp the output variable
|
Should the command be unable to obtain a timestamp the output variable
|
||||||
will be set to the empty string "".
|
will be set to the empty string "".
|
||||||
|
|
||||||
The optional UTC flag requests the current date/time representation to
|
The optional ``UTC`` flag requests the current date/time representation to
|
||||||
be in Coordinated Universal Time (UTC) rather than local time.
|
be in Coordinated Universal Time (UTC) rather than local time.
|
||||||
|
|
||||||
The optional <format string> may contain the following format
|
The optional ``<format string>`` may contain the following format
|
||||||
specifiers:
|
specifiers:
|
||||||
|
|
||||||
::
|
::
|
||||||
@ -153,23 +287,31 @@ specifiers:
|
|||||||
Unknown format specifiers will be ignored and copied to the output
|
Unknown format specifiers will be ignored and copied to the output
|
||||||
as-is.
|
as-is.
|
||||||
|
|
||||||
If no explicit <format string> is given it will default to:
|
If no explicit ``<format string>`` is given it will default to:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
%Y-%m-%dT%H:%M:%S for local time.
|
%Y-%m-%dT%H:%M:%S for local time.
|
||||||
%Y-%m-%dT%H:%M:%SZ for UTC.
|
%Y-%m-%dT%H:%M:%SZ for UTC.
|
||||||
|
|
||||||
MAKE_C_IDENTIFIER will write a string which can be used as an
|
|
||||||
identifier in C.
|
|
||||||
|
|
||||||
``GENEX_STRIP`` will strip any
|
::
|
||||||
:manual:`generator expressions <cmake-generator-expressions(7)>` from the
|
|
||||||
``input string`` and store the result in the ``output variable``.
|
|
||||||
|
|
||||||
UUID creates a univerally unique identifier (aka GUID) as per RFC4122
|
string(MAKE_C_IDENTIFIER <input string> <output variable>)
|
||||||
based on the hash of the combined values of <namespace>
|
|
||||||
(which itself has to be a valid UUID) and <name>.
|
Write a string which can be used as an identifier in C.
|
||||||
|
|
||||||
|
UUID
|
||||||
|
""""
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
string(UUID <output variable> NAMESPACE <namespace> NAME <name>
|
||||||
|
TYPE <MD5|SHA1> [UPPER])
|
||||||
|
|
||||||
|
Create a univerally unique identifier (aka GUID) as per RFC4122
|
||||||
|
based on the hash of the combined values of ``<namespace>``
|
||||||
|
(which itself has to be a valid UUID) and ``<name>``.
|
||||||
The hash algorithm can be either ``MD5`` (Version 3 UUID) or
|
The hash algorithm can be either ``MD5`` (Version 3 UUID) or
|
||||||
``SHA1`` (Version 5 UUID).
|
``SHA1`` (Version 5 UUID).
|
||||||
A UUID has the format ``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``
|
A UUID has the format ``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
subdirs
|
subdirs
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Deprecated. Use the add_subdirectory() command instead.
|
Deprecated. Use the :command:`add_subdirectory` command instead.
|
||||||
|
|
||||||
Add a list of subdirectories to the build.
|
Add a list of subdirectories to the build.
|
||||||
|
|
||||||
@ -10,12 +10,12 @@ Add a list of subdirectories to the build.
|
|||||||
subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
|
subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
|
||||||
[PREORDER] )
|
[PREORDER] )
|
||||||
|
|
||||||
Add a list of subdirectories to the build. The add_subdirectory
|
Add a list of subdirectories to the build. The :command:`add_subdirectory`
|
||||||
command should be used instead of subdirs although subdirs will still
|
command should be used instead of ``subdirs`` although ``subdirs`` will still
|
||||||
work. This will cause any CMakeLists.txt files in the sub directories
|
work. This will cause any CMakeLists.txt files in the sub directories
|
||||||
to be processed by CMake. Any directories after the PREORDER flag are
|
to be processed by CMake. Any directories after the ``PREORDER`` flag are
|
||||||
traversed first by makefile builds, the PREORDER flag has no effect on
|
traversed first by makefile builds, the ``PREORDER`` flag has no effect on
|
||||||
IDE projects. Any directories after the EXCLUDE_FROM_ALL marker will
|
IDE projects. Any directories after the ``EXCLUDE_FROM_ALL`` marker will
|
||||||
not be included in the top level makefile or project file. This is
|
not be included in the top level makefile or project file. This is
|
||||||
useful for having CMake create makefiles or projects for a set of
|
useful for having CMake create makefiles or projects for a set of
|
||||||
examples in a project. You would want CMake to generate makefiles or
|
examples in a project. You would want CMake to generate makefiles or
|
||||||
|
@ -96,5 +96,19 @@ the try_compile call of interest, and then re-run cmake again with
|
|||||||
Other Behavior Settings
|
Other Behavior Settings
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If set, the following variables are passed in to the generated
|
||||||
|
try_compile CMakeLists.txt to initialize compile target properties with
|
||||||
|
default values:
|
||||||
|
|
||||||
|
* :variable:`CMAKE_ENABLE_EXPORTS`
|
||||||
|
* :variable:`CMAKE_LINK_SEARCH_START_STATIC`
|
||||||
|
* :variable:`CMAKE_LINK_SEARCH_END_STATIC`
|
||||||
|
* :variable:`CMAKE_POSITION_INDEPENDENT_CODE`
|
||||||
|
|
||||||
|
If :policy:`CMP0056` is set to ``NEW``, then
|
||||||
|
:variable:`CMAKE_EXE_LINKER_FLAGS` is passed in as well.
|
||||||
|
|
||||||
|
The current setting of :policy:`CMP0065` is set in the generated project.
|
||||||
|
|
||||||
Set the :variable:`CMAKE_TRY_COMPILE_CONFIGURATION` variable to choose
|
Set the :variable:`CMAKE_TRY_COMPILE_CONFIGURATION` variable to choose
|
||||||
a build configuration.
|
a build configuration.
|
||||||
|
@ -8,14 +8,14 @@ Unset a variable, cache variable, or environment variable.
|
|||||||
unset(<variable> [CACHE | PARENT_SCOPE])
|
unset(<variable> [CACHE | PARENT_SCOPE])
|
||||||
|
|
||||||
Removes the specified variable causing it to become undefined. If
|
Removes the specified variable causing it to become undefined. If
|
||||||
CACHE is present then the variable is removed from the cache instead
|
``CACHE`` is present then the variable is removed from the cache instead
|
||||||
of the current scope.
|
of the current scope.
|
||||||
|
|
||||||
If PARENT_SCOPE is present then the variable is removed from the scope
|
If ``PARENT_SCOPE`` is present then the variable is removed from the scope
|
||||||
above the current scope. See the same option in the set() command for
|
above the current scope. See the same option in the :command:`set` command
|
||||||
further details.
|
for further details.
|
||||||
|
|
||||||
<variable> can be an environment variable such as:
|
``<variable>`` can be an environment variable such as:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -12,11 +12,11 @@ Specify the source tree of a third-party utility.
|
|||||||
|
|
||||||
When a third-party utility's source is included in the distribution,
|
When a third-party utility's source is included in the distribution,
|
||||||
this command specifies its location and name. The cache entry will
|
this command specifies its location and name. The cache entry will
|
||||||
not be set unless the path_to_source and all listed files exist. It
|
not be set unless the ``path_to_source`` and all listed files exist. It
|
||||||
is assumed that the source tree of the utility will have been built
|
is assumed that the source tree of the utility will have been built
|
||||||
before it is needed.
|
before it is needed.
|
||||||
|
|
||||||
When cross compiling CMake will print a warning if a utility_source()
|
When cross compiling CMake will print a warning if a ``utility_source()``
|
||||||
command is executed, because in many cases it is used to build an
|
command is executed, because in many cases it is used to build an
|
||||||
executable which is executed later on. This doesn't work when cross
|
executable which is executed later on. This doesn't work when cross
|
||||||
compiling, since the executable can run only on their target platform.
|
compiling, since the executable can run only on their target platform.
|
||||||
|
@ -3,7 +3,7 @@ variable_requires
|
|||||||
|
|
||||||
Disallowed. See CMake Policy :policy:`CMP0035`.
|
Disallowed. See CMake Policy :policy:`CMP0035`.
|
||||||
|
|
||||||
Use the if() command instead.
|
Use the :command:`if` command instead.
|
||||||
|
|
||||||
Assert satisfaction of an option's required variables.
|
Assert satisfaction of an option's required variables.
|
||||||
|
|
||||||
@ -13,10 +13,10 @@ Assert satisfaction of an option's required variables.
|
|||||||
REQUIRED_VARIABLE1
|
REQUIRED_VARIABLE1
|
||||||
REQUIRED_VARIABLE2 ...)
|
REQUIRED_VARIABLE2 ...)
|
||||||
|
|
||||||
The first argument (TEST_VARIABLE) is the name of the variable to be
|
The first argument (``TEST_VARIABLE``) is the name of the variable to be
|
||||||
tested, if that variable is false nothing else is done. If
|
tested, if that variable is false nothing else is done. If
|
||||||
TEST_VARIABLE is true, then the next argument (RESULT_VARIABLE) is a
|
``TEST_VARIABLE`` is true, then the next argument (``RESULT_VARIABLE``)
|
||||||
variable that is set to true if all the required variables are set.
|
is a variable that is set to true if all the required variables are set.
|
||||||
The rest of the arguments are variables that must be true or not set
|
The rest of the arguments are variables that must be true or not set
|
||||||
to NOTFOUND to avoid an error. If any are not true, an error is
|
to NOTFOUND to avoid an error. If any are not true, an error is
|
||||||
reported.
|
reported.
|
||||||
|
@ -11,7 +11,7 @@ Evaluate a group of commands while a condition is true
|
|||||||
...
|
...
|
||||||
endwhile(condition)
|
endwhile(condition)
|
||||||
|
|
||||||
All commands between while and the matching endwhile are recorded
|
All commands between while and the matching :command:`endwhile` are recorded
|
||||||
without being invoked. Once the endwhile is evaluated, the recorded
|
without being invoked. Once the :command:`endwhile` is evaluated, the
|
||||||
list of commands is invoked as long as the condition is true. The
|
recorded list of commands is invoked as long as the condition is true. The
|
||||||
condition is evaluated using the same logic as the if command.
|
condition is evaluated using the same logic as the :command:`if` command.
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
write_file
|
write_file
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Deprecated. Use the file(WRITE ) command instead.
|
Deprecated. Use the :command:`file(WRITE)` command instead.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
write_file(filename "message to write"... [APPEND])
|
write_file(filename "message to write"... [APPEND])
|
||||||
|
|
||||||
The first argument is the file name, the rest of the arguments are
|
The first argument is the file name, the rest of the arguments are
|
||||||
messages to write. If the argument APPEND is specified, then the
|
messages to write. If the argument ``APPEND`` is specified, then the
|
||||||
message will be appended.
|
message will be appended.
|
||||||
|
|
||||||
NOTE 1: file(WRITE ... and file(APPEND ... do exactly the same as
|
NOTE 1: :command:`file(WRITE)` and :command:`file(APPEND)` do exactly
|
||||||
this one but add some more functionality.
|
the same as this one but add some more functionality.
|
||||||
|
|
||||||
NOTE 2: When using write_file the produced file cannot be used as an
|
NOTE 2: When using ``write_file`` the produced file cannot be used as an
|
||||||
input to CMake (CONFIGURE_FILE, source file ...) because it will lead
|
input to CMake (CONFIGURE_FILE, source file ...) because it will lead
|
||||||
to an infinite loop. Use configure_file if you want to generate input
|
to an infinite loop. Use :command:`configure_file` if you want to
|
||||||
files to CMake.
|
generate input files to CMake.
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
The following resources are available to get help using CMake:
|
The following resources are available to get help using CMake:
|
||||||
|
|
||||||
Home Page
|
Home Page
|
||||||
http://www.cmake.org
|
https://cmake.org
|
||||||
|
|
||||||
The primary starting point for learning about CMake.
|
The primary starting point for learning about CMake.
|
||||||
|
|
||||||
Frequently Asked Questions
|
Frequently Asked Questions
|
||||||
http://www.cmake.org/Wiki/CMake_FAQ
|
https://cmake.org/Wiki/CMake_FAQ
|
||||||
|
|
||||||
A Wiki is provided containing answers to frequently asked questions.
|
A Wiki is provided containing answers to frequently asked questions.
|
||||||
|
|
||||||
Online Documentation
|
Online Documentation
|
||||||
http://www.cmake.org/documentation
|
https://cmake.org/documentation
|
||||||
|
|
||||||
Links to available documentation may be found on this web page.
|
Links to available documentation may be found on this web page.
|
||||||
|
|
||||||
Mailing List
|
Mailing List
|
||||||
http://www.cmake.org/mailing-lists
|
https://cmake.org/mailing-lists
|
||||||
|
|
||||||
For help and discussion about using cmake, a mailing list is
|
For help and discussion about using cmake, a mailing list is
|
||||||
provided at cmake@cmake.org. The list is member-post-only but one
|
provided at cmake@cmake.org. The list is member-post-only but one
|
||||||
may sign up on the CMake web page. Please first read the full
|
may sign up on the CMake web page. Please first read the full
|
||||||
documentation at http://www.cmake.org before posting questions to
|
documentation at https://cmake.org before posting questions to
|
||||||
the list.
|
the list.
|
||||||
|
@ -80,11 +80,31 @@ regardless of the library type. The ``MODULE`` library type is
|
|||||||
dissimilar in that it is generally not linked to -- it is not used in
|
dissimilar in that it is generally not linked to -- it is not used in
|
||||||
the right-hand-side of the :command:`target_link_libraries` command.
|
the right-hand-side of the :command:`target_link_libraries` command.
|
||||||
It is a type which is loaded as a plugin using runtime techniques.
|
It is a type which is loaded as a plugin using runtime techniques.
|
||||||
|
If the library does not export any unmanaged symbols (e.g. Windows
|
||||||
|
resource DLL, C++/CLI DLL), it is required that the library not be a
|
||||||
|
``SHARED`` library because CMake expects ``SHARED`` libraries to export
|
||||||
|
at least one symbol.
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
add_library(archive MODULE 7z.cpp)
|
add_library(archive MODULE 7z.cpp)
|
||||||
|
|
||||||
|
.. _`Apple Frameworks`:
|
||||||
|
|
||||||
|
Apple Frameworks
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
|
||||||
|
target property to create an OS X Framework:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
add_library(MyFramework SHARED MyFramework.cpp)
|
||||||
|
set_target_properties(MyFramework PROPERTIES
|
||||||
|
FRAMEWORK 1
|
||||||
|
FRAMEWORK_VERSION A
|
||||||
|
)
|
||||||
|
|
||||||
.. _`Object Libraries`:
|
.. _`Object Libraries`:
|
||||||
|
|
||||||
Object Libraries
|
Object Libraries
|
||||||
@ -765,7 +785,8 @@ An *archive* output artifact of a buildsystem target may be:
|
|||||||
|
|
||||||
* On DLL platforms: the import library file (e.g. ``.lib``) of a shared
|
* On DLL platforms: the import library file (e.g. ``.lib``) of a shared
|
||||||
library target created by the :command:`add_library` command
|
library target created by the :command:`add_library` command
|
||||||
with the ``SHARED`` option.
|
with the ``SHARED`` option. This file is only guaranteed to exist if
|
||||||
|
the library exports at least one unmanaged symbol.
|
||||||
|
|
||||||
* On DLL platforms: the import library file (e.g. ``.lib``) of an
|
* On DLL platforms: the import library file (e.g. ``.lib``) of an
|
||||||
executable target created by the :command:`add_executable` command
|
executable target created by the :command:`add_executable` command
|
||||||
|
@ -71,7 +71,6 @@ These commands may be used freely in CMake projects.
|
|||||||
/command/link_libraries
|
/command/link_libraries
|
||||||
/command/list
|
/command/list
|
||||||
/command/load_cache
|
/command/load_cache
|
||||||
/command/load_command
|
|
||||||
/command/macro
|
/command/macro
|
||||||
/command/mark_as_advanced
|
/command/mark_as_advanced
|
||||||
/command/math
|
/command/math
|
||||||
@ -119,6 +118,7 @@ versions of CMake. Do not use them in new code.
|
|||||||
/command/install_files
|
/command/install_files
|
||||||
/command/install_programs
|
/command/install_programs
|
||||||
/command/install_targets
|
/command/install_targets
|
||||||
|
/command/load_command
|
||||||
/command/make_directory
|
/command/make_directory
|
||||||
/command/output_required_files
|
/command/output_required_files
|
||||||
/command/remove
|
/command/remove
|
||||||
|
@ -52,9 +52,9 @@ When adding the first supported feature to a particular CompilerId, it is
|
|||||||
necessary to list support for all features known to cmake (See
|
necessary to list support for all features known to cmake (See
|
||||||
:variable:`CMAKE_C_COMPILE_FEATURES` and
|
:variable:`CMAKE_C_COMPILE_FEATURES` and
|
||||||
:variable:`CMAKE_CXX_COMPILE_FEATURES` as appropriate), where available for
|
:variable:`CMAKE_CXX_COMPILE_FEATURES` as appropriate), where available for
|
||||||
the compiler. Furthermore, set ``CMAKE_<LANG>_STANDARD_DEFAULT`` to the
|
the compiler. Ensure that the ``CMAKE_<LANG>_STANDARD_DEFAULT`` is set to
|
||||||
default language standard level the compiler uses, or to the empty string
|
the computed internal variable ``CMAKE_<LANG>_STANDARD_COMPUTED_DEFAULT``
|
||||||
if the compiler has no notion of standard levels (such as ``MSVC``).
|
for compiler versions which should be supported.
|
||||||
|
|
||||||
It is sensible to record the features for the most recent version of a
|
It is sensible to record the features for the most recent version of a
|
||||||
particular CompilerId first, and then work backwards. It is sensible to
|
particular CompilerId first, and then work backwards. It is sensible to
|
||||||
|
@ -278,3 +278,7 @@ Available output expressions are:
|
|||||||
object of type ``OBJECT_LIBRARY``. This expression may only be used in
|
object of type ``OBJECT_LIBRARY``. This expression may only be used in
|
||||||
the sources of :command:`add_library` and :command:`add_executable`
|
the sources of :command:`add_library` and :command:`add_executable`
|
||||||
commands.
|
commands.
|
||||||
|
``$<SHELL_PATH:...>``
|
||||||
|
Content of ``...`` converted to shell path style. For example, slashes are
|
||||||
|
converted to backslashes in Windows shells and drive letters are converted
|
||||||
|
to posix paths in MSYS shells. The ``...`` must be an absolute path.
|
||||||
|
@ -121,3 +121,5 @@ All Policies
|
|||||||
/policy/CMP0061
|
/policy/CMP0061
|
||||||
/policy/CMP0062
|
/policy/CMP0062
|
||||||
/policy/CMP0063
|
/policy/CMP0063
|
||||||
|
/policy/CMP0064
|
||||||
|
/policy/CMP0065
|
||||||
|
@ -40,6 +40,7 @@ Properties of Global Scope
|
|||||||
/prop_gbl/RULE_LAUNCH_LINK
|
/prop_gbl/RULE_LAUNCH_LINK
|
||||||
/prop_gbl/RULE_MESSAGES
|
/prop_gbl/RULE_MESSAGES
|
||||||
/prop_gbl/TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
|
/prop_gbl/TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
|
||||||
|
/prop_gbl/TARGET_MESSAGES
|
||||||
/prop_gbl/TARGET_SUPPORTS_SHARED_LIBS
|
/prop_gbl/TARGET_SUPPORTS_SHARED_LIBS
|
||||||
/prop_gbl/USE_FOLDERS
|
/prop_gbl/USE_FOLDERS
|
||||||
|
|
||||||
@ -85,9 +86,23 @@ Properties on Targets
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
/prop_tgt/ALIASED_TARGET
|
/prop_tgt/ALIASED_TARGET
|
||||||
|
/prop_tgt/ANDROID_ANT_ADDITIONAL_OPTIONS
|
||||||
/prop_tgt/ANDROID_API
|
/prop_tgt/ANDROID_API
|
||||||
/prop_tgt/ANDROID_API_MIN
|
/prop_tgt/ANDROID_API_MIN
|
||||||
|
/prop_tgt/ANDROID_ARCH
|
||||||
|
/prop_tgt/ANDROID_ASSETS_DIRECTORIES
|
||||||
/prop_tgt/ANDROID_GUI
|
/prop_tgt/ANDROID_GUI
|
||||||
|
/prop_tgt/ANDROID_JAR_DEPENDENCIES
|
||||||
|
/prop_tgt/ANDROID_JAR_DIRECTORIES
|
||||||
|
/prop_tgt/ANDROID_JAVA_SOURCE_DIR
|
||||||
|
/prop_tgt/ANDROID_NATIVE_LIB_DEPENDENCIES
|
||||||
|
/prop_tgt/ANDROID_NATIVE_LIB_DIRECTORIES
|
||||||
|
/prop_tgt/ANDROID_PROCESS_MAX
|
||||||
|
/prop_tgt/ANDROID_PROGUARD
|
||||||
|
/prop_tgt/ANDROID_PROGUARD_CONFIG_PATH
|
||||||
|
/prop_tgt/ANDROID_SECURE_PROPS_PATH
|
||||||
|
/prop_tgt/ANDROID_SKIP_ANT_STEP
|
||||||
|
/prop_tgt/ANDROID_STL_TYPE
|
||||||
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
||||||
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY
|
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY
|
||||||
/prop_tgt/ARCHIVE_OUTPUT_NAME_CONFIG
|
/prop_tgt/ARCHIVE_OUTPUT_NAME_CONFIG
|
||||||
@ -99,6 +114,7 @@ Properties on Targets
|
|||||||
/prop_tgt/AUTOUIC_OPTIONS
|
/prop_tgt/AUTOUIC_OPTIONS
|
||||||
/prop_tgt/AUTORCC
|
/prop_tgt/AUTORCC
|
||||||
/prop_tgt/AUTORCC_OPTIONS
|
/prop_tgt/AUTORCC_OPTIONS
|
||||||
|
/prop_tgt/BINARY_DIR
|
||||||
/prop_tgt/BUILD_WITH_INSTALL_RPATH
|
/prop_tgt/BUILD_WITH_INSTALL_RPATH
|
||||||
/prop_tgt/BUNDLE_EXTENSION
|
/prop_tgt/BUNDLE_EXTENSION
|
||||||
/prop_tgt/BUNDLE
|
/prop_tgt/BUNDLE
|
||||||
@ -135,6 +151,7 @@ Properties on Targets
|
|||||||
/prop_tgt/Fortran_FORMAT
|
/prop_tgt/Fortran_FORMAT
|
||||||
/prop_tgt/Fortran_MODULE_DIRECTORY
|
/prop_tgt/Fortran_MODULE_DIRECTORY
|
||||||
/prop_tgt/FRAMEWORK
|
/prop_tgt/FRAMEWORK
|
||||||
|
/prop_tgt/FRAMEWORK_VERSION
|
||||||
/prop_tgt/GENERATOR_FILE_NAME
|
/prop_tgt/GENERATOR_FILE_NAME
|
||||||
/prop_tgt/GNUtoMS
|
/prop_tgt/GNUtoMS
|
||||||
/prop_tgt/HAS_CXX
|
/prop_tgt/HAS_CXX
|
||||||
@ -177,6 +194,7 @@ Properties on Targets
|
|||||||
/prop_tgt/JOB_POOL_COMPILE
|
/prop_tgt/JOB_POOL_COMPILE
|
||||||
/prop_tgt/JOB_POOL_LINK
|
/prop_tgt/JOB_POOL_LINK
|
||||||
/prop_tgt/LABELS
|
/prop_tgt/LABELS
|
||||||
|
/prop_tgt/LANG_COMPILER_LAUNCHER
|
||||||
/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
|
/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
|
||||||
/prop_tgt/LANG_VISIBILITY_PRESET
|
/prop_tgt/LANG_VISIBILITY_PRESET
|
||||||
/prop_tgt/LIBRARY_OUTPUT_DIRECTORY_CONFIG
|
/prop_tgt/LIBRARY_OUTPUT_DIRECTORY_CONFIG
|
||||||
@ -227,6 +245,7 @@ Properties on Targets
|
|||||||
/prop_tgt/RUNTIME_OUTPUT_NAME_CONFIG
|
/prop_tgt/RUNTIME_OUTPUT_NAME_CONFIG
|
||||||
/prop_tgt/RUNTIME_OUTPUT_NAME
|
/prop_tgt/RUNTIME_OUTPUT_NAME
|
||||||
/prop_tgt/SKIP_BUILD_RPATH
|
/prop_tgt/SKIP_BUILD_RPATH
|
||||||
|
/prop_tgt/SOURCE_DIR
|
||||||
/prop_tgt/SOURCES
|
/prop_tgt/SOURCES
|
||||||
/prop_tgt/SOVERSION
|
/prop_tgt/SOVERSION
|
||||||
/prop_tgt/STATIC_LIBRARY_FLAGS_CONFIG
|
/prop_tgt/STATIC_LIBRARY_FLAGS_CONFIG
|
||||||
@ -235,21 +254,27 @@ Properties on Targets
|
|||||||
/prop_tgt/TYPE
|
/prop_tgt/TYPE
|
||||||
/prop_tgt/VERSION
|
/prop_tgt/VERSION
|
||||||
/prop_tgt/VISIBILITY_INLINES_HIDDEN
|
/prop_tgt/VISIBILITY_INLINES_HIDDEN
|
||||||
|
/prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION
|
||||||
/prop_tgt/VS_DOTNET_REFERENCES
|
/prop_tgt/VS_DOTNET_REFERENCES
|
||||||
/prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION
|
/prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
/prop_tgt/VS_GLOBAL_KEYWORD
|
/prop_tgt/VS_GLOBAL_KEYWORD
|
||||||
/prop_tgt/VS_GLOBAL_PROJECT_TYPES
|
/prop_tgt/VS_GLOBAL_PROJECT_TYPES
|
||||||
/prop_tgt/VS_GLOBAL_ROOTNAMESPACE
|
/prop_tgt/VS_GLOBAL_ROOTNAMESPACE
|
||||||
/prop_tgt/VS_GLOBAL_variable
|
/prop_tgt/VS_GLOBAL_variable
|
||||||
|
/prop_tgt/VS_IOT_EXTENSIONS_VERSION
|
||||||
|
/prop_tgt/VS_IOT_STARTUP_TASK
|
||||||
/prop_tgt/VS_KEYWORD
|
/prop_tgt/VS_KEYWORD
|
||||||
|
/prop_tgt/VS_MOBILE_EXTENSIONS_VERSION
|
||||||
/prop_tgt/VS_SCC_AUXPATH
|
/prop_tgt/VS_SCC_AUXPATH
|
||||||
/prop_tgt/VS_SCC_LOCALPATH
|
/prop_tgt/VS_SCC_LOCALPATH
|
||||||
/prop_tgt/VS_SCC_PROJECTNAME
|
/prop_tgt/VS_SCC_PROJECTNAME
|
||||||
/prop_tgt/VS_SCC_PROVIDER
|
/prop_tgt/VS_SCC_PROVIDER
|
||||||
|
/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
|
||||||
/prop_tgt/VS_WINRT_COMPONENT
|
/prop_tgt/VS_WINRT_COMPONENT
|
||||||
/prop_tgt/VS_WINRT_EXTENSIONS
|
/prop_tgt/VS_WINRT_EXTENSIONS
|
||||||
/prop_tgt/VS_WINRT_REFERENCES
|
/prop_tgt/VS_WINRT_REFERENCES
|
||||||
/prop_tgt/WIN32_EXECUTABLE
|
/prop_tgt/WIN32_EXECUTABLE
|
||||||
|
/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS
|
||||||
/prop_tgt/XCODE_ATTRIBUTE_an-attribute
|
/prop_tgt/XCODE_ATTRIBUTE_an-attribute
|
||||||
/prop_tgt/XCTEST
|
/prop_tgt/XCTEST
|
||||||
|
|
||||||
|
@ -220,6 +220,23 @@ Windows CE to use. Currently version 8.0 (Windows Embedded Compact 2013) is
|
|||||||
supported out of the box. Other versions may require one to set
|
supported out of the box. Other versions may require one to set
|
||||||
:variable:`CMAKE_GENERATOR_TOOLSET` to the correct value.
|
:variable:`CMAKE_GENERATOR_TOOLSET` to the correct value.
|
||||||
|
|
||||||
|
Cross Compiling for Windows 10 Universal Applications
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
A toolchain file to configure a Visual Studio generator for a
|
||||||
|
Windows 10 Universal Application may look like this:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME WindowsStore)
|
||||||
|
set(CMAKE_SYSTEM_VERSION 10.0)
|
||||||
|
|
||||||
|
A Windows 10 Universal Application targets both Windows Store and
|
||||||
|
Windows Phone. Specify the :variable:`CMAKE_SYSTEM_VERSION` variable
|
||||||
|
to be ``10.0`` to build with the latest available Windows 10 SDK.
|
||||||
|
Specify a more specific version (e.g. ``10.0.10240.0`` for RTM)
|
||||||
|
to build with the corresponding SDK.
|
||||||
|
|
||||||
Cross Compiling for Windows Phone
|
Cross Compiling for Windows Phone
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
@ -256,6 +273,22 @@ like this:
|
|||||||
The :variable:`CMAKE_GENERATOR_TOOLSET` may be set to select
|
The :variable:`CMAKE_GENERATOR_TOOLSET` may be set to select
|
||||||
the Nsight Tegra "Toolchain Version" value.
|
the Nsight Tegra "Toolchain Version" value.
|
||||||
|
|
||||||
See the :prop_tgt:`ANDROID_API_MIN`, :prop_tgt:`ANDROID_API`
|
See also target properties:
|
||||||
and :prop_tgt:`ANDROID_GUI` target properties to configure
|
|
||||||
targets within the project.
|
* :prop_tgt:`ANDROID_ANT_ADDITIONAL_OPTIONS`
|
||||||
|
* :prop_tgt:`ANDROID_API_MIN`
|
||||||
|
* :prop_tgt:`ANDROID_API`
|
||||||
|
* :prop_tgt:`ANDROID_ARCH`
|
||||||
|
* :prop_tgt:`ANDROID_ASSETS_DIRECTORIES`
|
||||||
|
* :prop_tgt:`ANDROID_GUI`
|
||||||
|
* :prop_tgt:`ANDROID_JAR_DEPENDENCIES`
|
||||||
|
* :prop_tgt:`ANDROID_JAR_DIRECTORIES`
|
||||||
|
* :prop_tgt:`ANDROID_JAVA_SOURCE_DIR`
|
||||||
|
* :prop_tgt:`ANDROID_NATIVE_LIB_DEPENDENCIES`
|
||||||
|
* :prop_tgt:`ANDROID_NATIVE_LIB_DIRECTORIES`
|
||||||
|
* :prop_tgt:`ANDROID_PROCESS_MAX`
|
||||||
|
* :prop_tgt:`ANDROID_PROGUARD_CONFIG_PATH`
|
||||||
|
* :prop_tgt:`ANDROID_PROGUARD`
|
||||||
|
* :prop_tgt:`ANDROID_SECURE_PROPS_PATH`
|
||||||
|
* :prop_tgt:`ANDROID_SKIP_ANT_STEP`
|
||||||
|
* :prop_tgt:`ANDROID_STL_TYPE`
|
||||||
|
@ -47,6 +47,8 @@ Variables that Provide Information
|
|||||||
/variable/CMAKE_JOB_POOL_COMPILE
|
/variable/CMAKE_JOB_POOL_COMPILE
|
||||||
/variable/CMAKE_JOB_POOL_LINK
|
/variable/CMAKE_JOB_POOL_LINK
|
||||||
/variable/CMAKE_LINK_LIBRARY_SUFFIX
|
/variable/CMAKE_LINK_LIBRARY_SUFFIX
|
||||||
|
/variable/CMAKE_LINK_SEARCH_END_STATIC
|
||||||
|
/variable/CMAKE_LINK_SEARCH_START_STATIC
|
||||||
/variable/CMAKE_MAJOR_VERSION
|
/variable/CMAKE_MAJOR_VERSION
|
||||||
/variable/CMAKE_MAKE_PROGRAM
|
/variable/CMAKE_MAKE_PROGRAM
|
||||||
/variable/CMAKE_MATCH_COUNT
|
/variable/CMAKE_MATCH_COUNT
|
||||||
@ -80,6 +82,7 @@ Variables that Provide Information
|
|||||||
/variable/CMAKE_VS_NsightTegra_VERSION
|
/variable/CMAKE_VS_NsightTegra_VERSION
|
||||||
/variable/CMAKE_VS_PLATFORM_NAME
|
/variable/CMAKE_VS_PLATFORM_NAME
|
||||||
/variable/CMAKE_VS_PLATFORM_TOOLSET
|
/variable/CMAKE_VS_PLATFORM_TOOLSET
|
||||||
|
/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
|
||||||
/variable/CMAKE_XCODE_PLATFORM_TOOLSET
|
/variable/CMAKE_XCODE_PLATFORM_TOOLSET
|
||||||
/variable/PROJECT_BINARY_DIR
|
/variable/PROJECT_BINARY_DIR
|
||||||
/variable/PROJECT-NAME_BINARY_DIR
|
/variable/PROJECT-NAME_BINARY_DIR
|
||||||
@ -117,6 +120,8 @@ Variables that Change Behavior
|
|||||||
/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
|
/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
|
||||||
/variable/CMAKE_EXPORT_NO_PACKAGE_REGISTRY
|
/variable/CMAKE_EXPORT_NO_PACKAGE_REGISTRY
|
||||||
/variable/CMAKE_SYSROOT
|
/variable/CMAKE_SYSROOT
|
||||||
|
/variable/CMAKE_FIND_APPBUNDLE
|
||||||
|
/variable/CMAKE_FIND_FRAMEWORK
|
||||||
/variable/CMAKE_FIND_LIBRARY_PREFIXES
|
/variable/CMAKE_FIND_LIBRARY_PREFIXES
|
||||||
/variable/CMAKE_FIND_LIBRARY_SUFFIXES
|
/variable/CMAKE_FIND_LIBRARY_SUFFIXES
|
||||||
/variable/CMAKE_FIND_NO_INSTALL_PREFIX
|
/variable/CMAKE_FIND_NO_INSTALL_PREFIX
|
||||||
@ -147,6 +152,8 @@ Variables that Change Behavior
|
|||||||
/variable/CMAKE_PROJECT_PROJECT-NAME_INCLUDE
|
/variable/CMAKE_PROJECT_PROJECT-NAME_INCLUDE
|
||||||
/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
|
/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
|
||||||
/variable/CMAKE_STAGING_PREFIX
|
/variable/CMAKE_STAGING_PREFIX
|
||||||
|
/variable/CMAKE_SYSTEM_APPBUNDLE_PATH
|
||||||
|
/variable/CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
/variable/CMAKE_SYSTEM_IGNORE_PATH
|
/variable/CMAKE_SYSTEM_IGNORE_PATH
|
||||||
/variable/CMAKE_SYSTEM_INCLUDE_PATH
|
/variable/CMAKE_SYSTEM_INCLUDE_PATH
|
||||||
/variable/CMAKE_SYSTEM_LIBRARY_PATH
|
/variable/CMAKE_SYSTEM_LIBRARY_PATH
|
||||||
@ -209,9 +216,23 @@ Variables that Control the Build
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
/variable/CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS
|
||||||
/variable/CMAKE_ANDROID_API
|
/variable/CMAKE_ANDROID_API
|
||||||
/variable/CMAKE_ANDROID_API_MIN
|
/variable/CMAKE_ANDROID_API_MIN
|
||||||
|
/variable/CMAKE_ANDROID_ARCH
|
||||||
|
/variable/CMAKE_ANDROID_ASSETS_DIRECTORIES
|
||||||
/variable/CMAKE_ANDROID_GUI
|
/variable/CMAKE_ANDROID_GUI
|
||||||
|
/variable/CMAKE_ANDROID_JAR_DEPENDENCIES
|
||||||
|
/variable/CMAKE_ANDROID_JAR_DIRECTORIES
|
||||||
|
/variable/CMAKE_ANDROID_JAVA_SOURCE_DIR
|
||||||
|
/variable/CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES
|
||||||
|
/variable/CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES
|
||||||
|
/variable/CMAKE_ANDROID_PROCESS_MAX
|
||||||
|
/variable/CMAKE_ANDROID_PROGUARD
|
||||||
|
/variable/CMAKE_ANDROID_PROGUARD_CONFIG_PATH
|
||||||
|
/variable/CMAKE_ANDROID_SECURE_PROPS_PATH
|
||||||
|
/variable/CMAKE_ANDROID_SKIP_ANT_STEP
|
||||||
|
/variable/CMAKE_ANDROID_STL_TYPE
|
||||||
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
||||||
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
||||||
/variable/CMAKE_AUTOMOC_MOC_OPTIONS
|
/variable/CMAKE_AUTOMOC_MOC_OPTIONS
|
||||||
@ -225,6 +246,7 @@ Variables that Control the Build
|
|||||||
/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
|
/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
|
||||||
/variable/CMAKE_CONFIG_POSTFIX
|
/variable/CMAKE_CONFIG_POSTFIX
|
||||||
/variable/CMAKE_DEBUG_POSTFIX
|
/variable/CMAKE_DEBUG_POSTFIX
|
||||||
|
/variable/CMAKE_ENABLE_EXPORTS
|
||||||
/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG
|
/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG
|
||||||
/variable/CMAKE_EXE_LINKER_FLAGS
|
/variable/CMAKE_EXE_LINKER_FLAGS
|
||||||
/variable/CMAKE_Fortran_FORMAT
|
/variable/CMAKE_Fortran_FORMAT
|
||||||
@ -235,6 +257,7 @@ Variables that Control the Build
|
|||||||
/variable/CMAKE_INSTALL_NAME_DIR
|
/variable/CMAKE_INSTALL_NAME_DIR
|
||||||
/variable/CMAKE_INSTALL_RPATH
|
/variable/CMAKE_INSTALL_RPATH
|
||||||
/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH
|
/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH
|
||||||
|
/variable/CMAKE_LANG_COMPILER_LAUNCHER
|
||||||
/variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
|
/variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
|
||||||
/variable/CMAKE_LANG_VISIBILITY_PRESET
|
/variable/CMAKE_LANG_VISIBILITY_PRESET
|
||||||
/variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY
|
/variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY
|
||||||
@ -270,6 +293,7 @@ Variables that Control the Build
|
|||||||
/variable/CMAKE_USE_RELATIVE_PATHS
|
/variable/CMAKE_USE_RELATIVE_PATHS
|
||||||
/variable/CMAKE_VISIBILITY_INLINES_HIDDEN
|
/variable/CMAKE_VISIBILITY_INLINES_HIDDEN
|
||||||
/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
|
/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
|
||||||
|
/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
|
||||||
/variable/CMAKE_WIN32_EXECUTABLE
|
/variable/CMAKE_WIN32_EXECUTABLE
|
||||||
/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute
|
/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute
|
||||||
/variable/EXECUTABLE_OUTPUT_PATH
|
/variable/EXECUTABLE_OUTPUT_PATH
|
||||||
@ -345,12 +369,30 @@ Variables for CTest
|
|||||||
/variable/CTEST_BUILD_NAME
|
/variable/CTEST_BUILD_NAME
|
||||||
/variable/CTEST_BZR_COMMAND
|
/variable/CTEST_BZR_COMMAND
|
||||||
/variable/CTEST_BZR_UPDATE_OPTIONS
|
/variable/CTEST_BZR_UPDATE_OPTIONS
|
||||||
|
/variable/CTEST_CHANGE_ID
|
||||||
/variable/CTEST_CHECKOUT_COMMAND
|
/variable/CTEST_CHECKOUT_COMMAND
|
||||||
/variable/CTEST_CONFIGURATION_TYPE
|
/variable/CTEST_CONFIGURATION_TYPE
|
||||||
/variable/CTEST_CONFIGURE_COMMAND
|
/variable/CTEST_CONFIGURE_COMMAND
|
||||||
/variable/CTEST_COVERAGE_COMMAND
|
/variable/CTEST_COVERAGE_COMMAND
|
||||||
/variable/CTEST_COVERAGE_EXTRA_FLAGS
|
/variable/CTEST_COVERAGE_EXTRA_FLAGS
|
||||||
/variable/CTEST_CURL_OPTIONS
|
/variable/CTEST_CURL_OPTIONS
|
||||||
|
/variable/CTEST_CUSTOM_COVERAGE_EXCLUDE
|
||||||
|
/variable/CTEST_CUSTOM_ERROR_EXCEPTION
|
||||||
|
/variable/CTEST_CUSTOM_ERROR_MATCH
|
||||||
|
/variable/CTEST_CUSTOM_ERROR_POST_CONTEXT
|
||||||
|
/variable/CTEST_CUSTOM_ERROR_PRE_CONTEXT
|
||||||
|
/variable/CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE
|
||||||
|
/variable/CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS
|
||||||
|
/variable/CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS
|
||||||
|
/variable/CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE
|
||||||
|
/variable/CTEST_CUSTOM_MEMCHECK_IGNORE
|
||||||
|
/variable/CTEST_CUSTOM_POST_MEMCHECK
|
||||||
|
/variable/CTEST_CUSTOM_POST_TEST
|
||||||
|
/variable/CTEST_CUSTOM_PRE_MEMCHECK
|
||||||
|
/variable/CTEST_CUSTOM_PRE_TEST
|
||||||
|
/variable/CTEST_CUSTOM_TEST_IGNORE
|
||||||
|
/variable/CTEST_CUSTOM_WARNING_EXCEPTION
|
||||||
|
/variable/CTEST_CUSTOM_WARNING_MATCH
|
||||||
/variable/CTEST_CVS_CHECKOUT
|
/variable/CTEST_CVS_CHECKOUT
|
||||||
/variable/CTEST_CVS_COMMAND
|
/variable/CTEST_CVS_COMMAND
|
||||||
/variable/CTEST_CVS_UPDATE_OPTIONS
|
/variable/CTEST_CVS_UPDATE_OPTIONS
|
||||||
@ -360,6 +402,7 @@ Variables for CTest
|
|||||||
/variable/CTEST_DROP_SITE_CDASH
|
/variable/CTEST_DROP_SITE_CDASH
|
||||||
/variable/CTEST_DROP_SITE_PASSWORD
|
/variable/CTEST_DROP_SITE_PASSWORD
|
||||||
/variable/CTEST_DROP_SITE_USER
|
/variable/CTEST_DROP_SITE_USER
|
||||||
|
/variable/CTEST_EXTRA_COVERAGE_GLOB
|
||||||
/variable/CTEST_GIT_COMMAND
|
/variable/CTEST_GIT_COMMAND
|
||||||
/variable/CTEST_GIT_UPDATE_CUSTOM
|
/variable/CTEST_GIT_UPDATE_CUSTOM
|
||||||
/variable/CTEST_GIT_UPDATE_OPTIONS
|
/variable/CTEST_GIT_UPDATE_OPTIONS
|
||||||
@ -381,6 +424,7 @@ Variables for CTest
|
|||||||
/variable/CTEST_SVN_COMMAND
|
/variable/CTEST_SVN_COMMAND
|
||||||
/variable/CTEST_SVN_OPTIONS
|
/variable/CTEST_SVN_OPTIONS
|
||||||
/variable/CTEST_SVN_UPDATE_OPTIONS
|
/variable/CTEST_SVN_UPDATE_OPTIONS
|
||||||
|
/variable/CTEST_TEST_LOAD
|
||||||
/variable/CTEST_TEST_TIMEOUT
|
/variable/CTEST_TEST_TIMEOUT
|
||||||
/variable/CTEST_TRIGGER_SITE
|
/variable/CTEST_TRIGGER_SITE
|
||||||
/variable/CTEST_UPDATE_COMMAND
|
/variable/CTEST_UPDATE_COMMAND
|
||||||
|
@ -27,6 +27,8 @@ in each directory of a source tree with the name CMakeLists.txt.
|
|||||||
Users build a project by using CMake to generate a build system for a
|
Users build a project by using CMake to generate a build system for a
|
||||||
native tool on their platform.
|
native tool on their platform.
|
||||||
|
|
||||||
|
.. _`CMake Options`:
|
||||||
|
|
||||||
Options
|
Options
|
||||||
=======
|
=======
|
||||||
|
|
||||||
@ -113,14 +115,18 @@ Options
|
|||||||
``--debug-output``
|
``--debug-output``
|
||||||
Put cmake in a debug mode.
|
Put cmake in a debug mode.
|
||||||
|
|
||||||
Print extra stuff during the cmake run like stack traces with
|
Print extra information during the cmake run like stack traces with
|
||||||
message(send_error ) calls.
|
message(send_error ) calls.
|
||||||
|
|
||||||
``--trace``
|
``--trace``
|
||||||
Put cmake in trace mode.
|
Put cmake in trace mode.
|
||||||
|
|
||||||
Print a trace of all calls made and from where with
|
Print a trace of all calls made and from where.
|
||||||
message(send_error ) calls.
|
|
||||||
|
``--trace-expand``
|
||||||
|
Put cmake in trace mode.
|
||||||
|
|
||||||
|
Like ``--trace``, but with variables expanded.
|
||||||
|
|
||||||
``--warn-uninitialized``
|
``--warn-uninitialized``
|
||||||
Warn about uninitialized values.
|
Warn about uninitialized values.
|
||||||
|
@ -66,6 +66,13 @@ Options
|
|||||||
number of jobs. This option can also be set by setting the
|
number of jobs. This option can also be set by setting the
|
||||||
environment variable ``CTEST_PARALLEL_LEVEL``.
|
environment variable ``CTEST_PARALLEL_LEVEL``.
|
||||||
|
|
||||||
|
``--test-load <level>``
|
||||||
|
While running tests in parallel (e.g. with ``-j``), try not to start
|
||||||
|
tests when they may cause the CPU load to pass above a given threshold.
|
||||||
|
|
||||||
|
When ``ctest`` is run as a `Dashboard Client`_ this sets the
|
||||||
|
``TestLoad`` option of the `CTest Test Step`_.
|
||||||
|
|
||||||
``-Q,--quiet``
|
``-Q,--quiet``
|
||||||
Make ctest quiet.
|
Make ctest quiet.
|
||||||
|
|
||||||
@ -295,6 +302,12 @@ Options
|
|||||||
``--test-command``
|
``--test-command``
|
||||||
The test to run with the --build-and-test option.
|
The test to run with the --build-and-test option.
|
||||||
|
|
||||||
|
``--test-output-size-passed <size>``
|
||||||
|
Limit the output for passed tests to <size> bytes.
|
||||||
|
|
||||||
|
``--test-output-size-failed <size>``
|
||||||
|
Limit the output for failed tests to <size> bytes.
|
||||||
|
|
||||||
``--test-timeout``
|
``--test-timeout``
|
||||||
The time limit in seconds, internal use only.
|
The time limit in seconds, internal use only.
|
||||||
|
|
||||||
@ -776,6 +789,13 @@ Arguments to the command may specify some of the step settings.
|
|||||||
|
|
||||||
Configuration settings include:
|
Configuration settings include:
|
||||||
|
|
||||||
|
``TestLoad``
|
||||||
|
While running tests in parallel (e.g. with ``-j``), try not to start
|
||||||
|
tests when they may cause the CPU load to pass above a given threshold.
|
||||||
|
|
||||||
|
* `CTest Script`_ variable: :variable:`CTEST_TEST_LOAD`
|
||||||
|
* :module:`CTest` module variable: ``CTEST_TEST_LOAD``
|
||||||
|
|
||||||
``TimeOut``
|
``TimeOut``
|
||||||
The default timeout for each test if not specified by the
|
The default timeout for each test if not specified by the
|
||||||
:prop_test:`TIMEOUT` test property.
|
:prop_test:`TIMEOUT` test property.
|
||||||
|
17
Help/policy/CMP0064.rst
Normal file
17
Help/policy/CMP0064.rst
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
CMP0064
|
||||||
|
-------
|
||||||
|
|
||||||
|
Recognize ``TEST`` as a operator for the :command:`if` command.
|
||||||
|
|
||||||
|
The ``TEST`` operator was added to the :command:`if` command to determine if a
|
||||||
|
given test name was created by the :command:`add_test` command.
|
||||||
|
|
||||||
|
The ``OLD`` behavior for this policy is to ignore the ``TEST`` operator.
|
||||||
|
The ``NEW`` behavior is to interpret the ``TEST`` operator.
|
||||||
|
|
||||||
|
This policy was introduced in CMake version 3.4. CMake version
|
||||||
|
|release| warns when the policy is not set and uses ``OLD`` behavior. Use
|
||||||
|
the :command:`cmake_policy()` command to set it to ``OLD`` or ``NEW``
|
||||||
|
explicitly.
|
||||||
|
|
||||||
|
.. include:: DEPRECATED.txt
|
27
Help/policy/CMP0065.rst
Normal file
27
Help/policy/CMP0065.rst
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
CMP0065
|
||||||
|
-------
|
||||||
|
|
||||||
|
Do not add flags to export symbols from executables without
|
||||||
|
the :prop_tgt:`ENABLE_EXPORTS` target property.
|
||||||
|
|
||||||
|
CMake 3.3 and below, for historical reasons, always linked executables
|
||||||
|
on some platforms with flags like ``-rdynamic`` to export symbols from
|
||||||
|
the executables for use by any plugins they may load via ``dlopen``.
|
||||||
|
CMake 3.4 and above prefer to do this only for executables that are
|
||||||
|
explicitly marked with the :prop_tgt:`ENABLE_EXPORTS` target property.
|
||||||
|
|
||||||
|
The ``OLD`` behavior of this policy is to always use the additional link
|
||||||
|
flags when linking executables regardless of the value of the
|
||||||
|
:prop_tgt:`ENABLE_EXPORTS` target property.
|
||||||
|
|
||||||
|
The ``NEW`` behavior of this policy is to only use the additional link
|
||||||
|
flags when linking executables if the :prop_tgt:`ENABLE_EXPORTS` target
|
||||||
|
property is set to ``True``.
|
||||||
|
|
||||||
|
This policy was introduced in CMake version 3.4. Unlike most policies,
|
||||||
|
CMake version |release| does *not* warn by default when this policy
|
||||||
|
is not set and simply uses OLD behavior. See documentation of the
|
||||||
|
:variable:`CMAKE_POLICY_WARNING_CMP0065 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
|
||||||
|
variable to control the warning.
|
||||||
|
|
||||||
|
.. include:: DEPRECATED.txt
|
@ -3,6 +3,7 @@ INCLUDE_REGULAR_EXPRESSION
|
|||||||
|
|
||||||
Include file scanning regular expression.
|
Include file scanning regular expression.
|
||||||
|
|
||||||
This read-only property specifies the regular expression used during
|
This property specifies the regular expression used during
|
||||||
dependency scanning to match include files that should be followed.
|
dependency scanning to match include files that should be followed.
|
||||||
See the include_regular_expression command.
|
See the :command:`include_regular_expression` command for a high-level
|
||||||
|
interface to set this property.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user