1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-07-21 23:40:38 +08:00

655 Commits

Author SHA1 Message Date
Cristian Adam
4127f82179 add_library: Document UNKNOWN type of imported targets 2019-06-02 08:44:47 +02:00
John Freeman
b7b7f1806a Help: Fix typo in install(EXPORT_ANDROID_MK) example 2019-05-26 09:09:07 -05:00
Brad King
c024e44abe Merge topic 'find-package-prefer-config'
26a99da206 find_package: Add option to prefer Config mode
c365243a3a find_package: Factor out module and config find_package methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !3339
2019-05-22 10:28:59 -04:00
Cristian Adam
26a99da206 find_package: Add option to prefer Config mode
Add a `CMAKE_FIND_PACKAGE_PREFER_CONFIG` variable to tell
`find_package` calls to look for a package configuration file
first even if a find module is available.

Fixes: #16805, #19236
2019-05-21 10:29:47 -04:00
Brad King
a1eb03569d file: Change REMOVE to ignore empty names
Previously code like

    file(REMOVE_RECURSE "${accidentally_missing_variable}")

treated the empty string as a relative path with respect to the
current directory and removed its contents.  Change this behavior
to ignore the empty string with a warning instead.

Normally such behavior changes are done with a policy, but in this case
such code is likely a real bug in project code that can delete data.

Fixes: #19274
2019-05-21 09:25:32 -04:00
Kyle Edwards
e3ff7ced63 file(INSTALL): Add FOLLOW_SYMLINK_CHAIN argument 2019-05-16 15:25:33 -04:00
Rosen Matev
9f76961de8 Support job pools in custom commands and targets
Provide a way for custom commands and targets to set the pool variable
of the ninja build statement. Setting `JOB_POOL` is not compatible with
`USES_TERMINAL`, which implies the `console` pool.

The option is silently ignored with other generators.

Closes: #18483
2019-05-14 15:58:00 +02:00
Craig Scott
4aace9b015 Merge topic 'ctest-update-version-override'
2a34d0ac36 ctest: Add new variable CTEST_UPDATE_VERSION_OVERRIDE
7ddac95121 Help: cross-ref and wording of docs related to ctest_update()
a0d04d8810 testing: Update terminology in ctest_update tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Merge-request: !3277
2019-05-08 08:49:34 -04:00
Brad King
fa077acba5 Merge topic 'enforce-explicit-use-of-project'
1527defbfe cmMakefile: Enforce explicit use of project() command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3245
2019-05-07 11:17:26 -04:00
Bartosz Kosiorek
1527defbfe cmMakefile: Enforce explicit use of project() command
Fixes: 17714
2019-05-06 10:58:10 +02:00
Craig Scott
a6a543ced6 Help: Clarify that link options don't apply to static library targets 2019-05-05 19:05:14 +10:00
Zack Galbreath
7ddac95121 Help: cross-ref and wording of docs related to ctest_update()
Provide better motivation for users to click through to the CTest manual
from the ctest_update command help page.
2019-05-03 20:26:50 +10:00
Craig Scott
e138207c42 Merge topic 'message-new-types-and-logging'
599587feb1 message(): Minor code modernization
6cc93b370e message(): Add support for log levels
377d1b7896 cmSystemTools: Remove unused message-related code, simplify logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !3268
2019-04-30 18:35:06 -04:00
Brad King
60b28de5c8 Merge topic 'add-execute_process-command-echo'
044dcf9f8d execute_process: Add option to echo command lines
d350fb6889 execute_process: Manage KWSys Process lifetime with unique_ptr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3165
2019-04-30 10:05:09 -04:00
Alex Turbov
6cc93b370e message(): Add support for log levels
Relates: #18943
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2019-04-28 22:45:44 +10:00
Kyle Edwards
c3ef567951 Merge topic 'update-documentation'
cb811d11ce Help: Improve description of modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3222
2019-04-24 10:23:39 -04:00
Bartosz Kosiorek
cb811d11ce Help: Improve description of modules 2019-04-23 10:39:34 +02:00
Bill Hoffman
044dcf9f8d execute_process: Add option to echo command lines
Add COMMAND_ECHO option to the execute_process command. This will allow
execute_process to show the command it will run. Also add a cmake variable
CMAKE_EXECUTE_PROCESS_COMMAND_ECHO. Both the option and the variable can
be set to one of the following: STDERR|STDOUT|NONE. The command will be
printed to stderr or stdout or not at all.

Fixes: #18933
2019-04-19 13:32:08 -04:00
Brad King
2ed688a863 Merge topic 'msvc-runtime-library'
fb3370b6a1 MSVC: Add abstraction for runtime library selection
f621e7fa5d VS: Fix Fortran runtime library flag map special case for '-' options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Merge-request: !3211
2019-04-17 11:01:37 -04:00
Brad King
fb3370b6a1 MSVC: Add abstraction for runtime library selection
Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class
abstraction to select the runtime library from an enumeration of logical
names.  We've long hesitated to do this because the idea of "runtime
library selection" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.

Removing the old default flags requires a policy because existing
projects may rely on string processing to edit them and choose a runtime
library under the old behavior.  Add policy CMP0091 to provide
compatibility.

Fixes: #19108
2019-04-17 11:00:44 -04:00
Brad King
3205561b8a Merge topic 'string-repeat'
536cca60ea string: introduce `REPEAT` sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3239
2019-04-16 13:40:02 -04:00
Alex Turbov
536cca60ea string: introduce REPEAT sub-command 2019-04-15 11:06:06 -04:00
Brad King
4adc0b7c75 Merge topic 'iface-headers'
a40f9083dd INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3181
2019-04-12 10:20:20 -04:00
Avraham Shukron
a40f9083dd INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER properties
Also support installing headers on an INTERFACE library.

Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com>
Fixes: #15234
2019-04-11 11:09:42 -04:00
Bartosz Kosiorek
cb33befe2d Modules: Update documentation formatting 2019-04-08 14:55:56 +02:00
Bartosz Kosiorek
0e4fbb4a1f Help: Improve formatting of Help documentation 2019-04-08 14:53:31 +02:00
Brad King
8c28e63cb4 Merge topic 'if-EXISTS-doc'
78ac8cb04a Help: clarify if(EXISTS) operation for symlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3189
2019-04-04 12:51:41 -04:00
Brad King
56abc31270 Merge topic 'improve-documentation'
456e0fb64f Help: Improve documentation formating

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3174
2019-04-04 11:48:55 -04:00
Bartosz Kosiorek
456e0fb64f Help: Improve documentation formating 2019-04-04 15:13:58 +02:00
Shoaib Meenai
78ac8cb04a Help: clarify if(EXISTS) operation for symlinks
if(EXISTS) resolves symlinks; note this explicitly in its documentation.
2019-04-03 17:25:52 -07:00
Ruslan Baratov
0761186949 project: Add variable CMAKE_PROJECT_INCLUDE_BEFORE 2019-04-01 20:30:19 +03:00
Brad King
3e129d71bc Merge topic 'project-include'
7d19b3091d Release note for CMAKE_PROJECT_INCLUDE variable
dda0190458 project: Add variable CMAKE_PROJECT_INCLUDE
390f14a244 Test ProjectInclude: Add NONE to avoid enabling languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3155
2019-04-01 10:49:02 -04:00
Ruslan Baratov
dda0190458 project: Add variable CMAKE_PROJECT_INCLUDE 2019-03-27 22:39:02 +03:00
Bartosz Kosiorek
07f3082d3b Help: Improve documentation links and formatting 2019-03-27 16:01:20 +01:00
Zack Galbreath
ba7e44eb7a ctest_submit: Add option BUILD_ID
Fixes: #18968
2019-03-22 09:37:08 -04:00
Joachim Wuttke (l)
0295b153f4 Help: describe the command pipeline of execute_process more explicitly
When reading the doc page on execute_process, I was mislead by the
words "in parallel". They convinced at once that the processes
are run independently of each other, so that I did not even bother
to read further. The rewording, and not least the insertion of a
paragraph break, should prevent such oversight.
2019-03-20 18:25:52 +01:00
Joachim Wuttke (l)
33efdfc0b5 Help: improve source formatting 2019-03-20 18:19:10 +01:00
Joachim Wuttke (l)
cd524c1c33 Help: describe what happens if command execute_process reaches timeout. 2019-03-20 18:17:29 +01:00
Brad King
3261f23870 Merge topic 'export-package-default-off'
9bede5c4ce export: Disable PACKAGE mode user package registry by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Lukas Mosimann <lumosimann@gmail.com>
Merge-request: !3041
2019-03-15 10:45:51 -04:00
Robert Maynard
9bede5c4ce export: Disable PACKAGE mode user package registry by default
The user package registry populated by the `export()` command causes
side effects outside the build and source directories.  Such effects
should be opt-in rather than op-out.  Introduce a policy to change
default behavior of `export(PACKAGE)` to do nothing.
2019-03-15 10:24:47 -04:00
Brad King
18ff7cc34f Merge topic 'enable_testing'
538e699e5a Help: for command enable_testing, explain relation to module CTest.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3070
2019-03-08 09:37:56 -05:00
Kyle Edwards
d7ca0a2644 Help: add code-block directive 2019-03-07 11:52:38 -05:00
Zack Galbreath
46c5830394 Help: provide example for HTTPHEADER option to ctest_submit 2019-03-07 10:08:34 -05:00
Joachim Wuttke (o)
538e699e5a Help: for command enable_testing, explain relation to module CTest. 2019-03-07 11:58:22 +01:00
Brad King
809890e3f6 Merge topic 'issue-18883-support-for-multiple-targets'
324d18bb34 cmake: Teach --build mode to support multiple targets
ebc94500c1 cmGlobalGenerator: Optimize Printable() method from GeneratedMakeCommand
fdeb364a84 cmGlobalGenerator: Change case of methods from GeneratedMakeCommand struct
b3955a08ab cmakemain: Remove ignored --use-stderr option from command line help
f1367c8c51 cmGlobalGenerator: Remove unused code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2939
2019-03-06 08:32:39 -05:00
Brad King
ce9117fdbe Merge topic 'docs-install-destinations'
a5f79b83c7 Help: clarify DESTINATION and TYPE usage for install()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3052
2019-03-06 08:29:14 -05:00
Bartosz Kosiorek
324d18bb34 cmake: Teach --build mode to support multiple targets
Fixes: #16136
2019-03-05 08:55:28 -05:00
Craig Scott
a5f79b83c7 Help: clarify DESTINATION and TYPE usage for install() 2019-03-05 21:48:44 +11:00
NeroBurner
b8307adb9f Help: inter-link install() commands 2019-02-28 11:49:53 -05:00
NeroBurner-tux
19e15853e9 Help: add inter link anchors for install() commands 2019-02-28 11:49:23 -05:00