Commit Graph

216 Commits

Author SHA1 Message Date
Ruslan Baratov
dda0190458 project: Add variable CMAKE_PROJECT_INCLUDE 2019-03-27 22:39:02 +03: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
4de554b1a5 Merge topic 'docs-xcode-schemes'
d0cb912a28 Help: Remove note that Xcode scheme generator is experimental
de850fe385 Help: Trivial typo fix for CMAKE_XCODE_GENERATE_SCHEME
d61a5a20ef Help: Sort lists of (CMAKE_)XCODE_SCHEME_... variables and properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3066
2019-03-06 09:07:59 -05:00
Craig Scott
d61a5a20ef Help: Sort lists of (CMAKE_)XCODE_SCHEME_... variables and properties 2019-03-07 00:04:55 +11:00
Ruslan Baratov
e427c7c1d8 iOS: Add IOS variable
Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) we support setting
`CMAKE_SYSTEM_NAME` to `iOS`.  Existing iOS toolchain files already
set `IOS` as a short-hand variable, so do the same here.
2019-03-05 09:42:41 -05:00
Fred Baksik
bcd99fac60 GHS: Document usage of GHS_NO_SOURCE_GROUP_FILE
-- Also change variable name to CMAKE_GHS_NO_SOURCE_GROUP_FILE
2019-02-08 13:07:00 -05:00
Brad King
9aef4a732b Merge topic 'variables1'
9d20fe014f Help: moved 7 variables to "internal" section
dfb2d6178e Help: "internal variables" instead of "obsolete", with some explanatory prose
9c4cdc43f6 Help: declare CMAKE_HOME_DIRECTORY obsolete

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2881
2019-01-31 11:11:28 -05:00
Harry Mallon
ec027aa64a Help: Add documentation for MSYS variable 2019-01-30 10:20:59 -05:00
Joachim Wuttke (o)
9d20fe014f Help: moved 7 variables to "internal" section 2019-01-30 16:13:13 +01:00
Joachim Wuttke (o)
dfb2d6178e Help: "internal variables" instead of "obsolete", with some explanatory prose 2019-01-30 16:13:10 +01:00
Joachim Wuttke (o)
9c4cdc43f6 Help: declare CMAKE_HOME_DIRECTORY obsolete 2019-01-30 13:04:56 +01:00
Kyle Edwards
a6982cff0d cmMakefile: Impose maximum recursion limit
In order to keep infinitely-recursive scripts from causing a stack
overflow in the CMake executable, CMake now imposes a maximum
recursion limit before issuing an error message. The limit can be
adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH.

Fixes: #18694
2019-01-23 09:52:29 -05:00
Brad King
d1aa2e1109 Merge topic 'find-package-resolve-symlinks'
b773e58099 find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
a5e948a36f find_package: optionally resolve symlinks when discovering packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2798
2019-01-21 07:47:29 -05:00
Brad King
fefae527c8 Merge topic 'submit-url'
2915a75615 CTest: Add documentation and release notes for SubmitURL
d6475daa79 Modules/CTest: Set SubmitURL
938f06fda6 ctest_submit: Add parameter SUBMIT_URL
65e725c957 CTest: Add option SubmitURL
65f1fc9d63 CTest: Add function GetSubmitURL
2bedd5fb7c ctest_submit: Remove submit method from log output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2719
2019-01-21 07:46:20 -05:00
Fred Baksik
702121c5f3 GHS: Use the correct compiler flags for CMAKE_BUILD_TYPE
-- Do not use CMAKE_C_FLAGS_RELEASE flags when CMAKE_BUILD_TYPE is empty
   if CMAKE_BUILD_TYPE was not set the generator would use Release settings
   this does not match the documented behavior of CMAKE_BUILD_TYPE

-- CMAKE_C_FLAGS_<CONFIG> not used when -kernel is present
   Fixes issue where CMAKE_C_FLAGS_<CONFIG> is ignored when -kernel option is present as a compiler option
   When the -kernel option is added to an executable it uses a different set of language flags
   This does not occur -kernel=<type> is used or if it is added as part of a link flag
   The variables CMAKE_<LANG>_GHS_KERNEL_FLAGS_<CONFIG> are removed
   NOTE: By default this only added the flag -ldebug which links in the debugger library.

-- Separate compiler options by newlines
2019-01-16 10:41:35 -05:00
Regina Pfeifer
2915a75615 CTest: Add documentation and release notes for SubmitURL 2019-01-16 10:34:08 -05:00
David Aguilar
a5e948a36f find_package: optionally resolve symlinks when discovering packages
Teach find_package() to resolve symlinks when constructing
relocatable prefix paths from discovered cmake config files.
The `CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable enables
this behavior when set to `TRUE`.

Fixes: #18704
2019-01-16 09:59:46 -05:00
Ben Boeckel
261ae28ccd Help: fix typo for CTEST_CUSTOM_TESTS_IGNORE
In commit v3.4.0-rc1~57^2 (Help: document CTEST_CUSTOM_* variables,
2015-09-17), the CTEST_CUSTOM_TESTS_IGNORE variable was documented with
a typo.
2019-01-02 15:42:33 -05:00
Sebastian Holtermann
2ef8fe2222 Autogen: Add documentation for CMAKE_GLOBAL_AUTOGEN/RCC_TARGET 2018-11-11 14:29:38 +01:00
Joachim Wuttke (l)
860338491e Help: Describe $CACHE and $ENV as operators
This resolves issue #18514

Also add a cross-reference to if(DEFINED ENV{var}).
2018-11-08 20:33:13 +01:00
Joachim Wuttke (h)
85498fccd8 Help: Provide backreferences.
Short intro to pages cmake-variables.7 and cmake-env-variables.7,
with backlinks to cmake-language.7.
2018-11-08 20:27:49 +01:00
Sebastian Holtermann
0669de5d36 Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS documentation 2018-11-03 12:14:40 +01:00
Peter Wu
6114d85a7d RPATH: Add option for using $ORIGIN in build tree
This makes binaries independent of the build directory by not embedding
the build directory via RPATH.  The tests are partially based on the
existing RuntimePath test, but with the check moved into a POST_BUILD
command such that it can be skipped when the platform lacks support.

Fixes: #18413
2018-10-26 09:25:51 -04:00
Brad King
4e98203c6c Merge topic 'vs-global-props-for-all-targets'
36489b85aa VS: Add test for CMAKE_VS_GLOBALS
22e670a306 VS: Add option to set VS_GLOBAL_* for all targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2345
2018-09-28 11:13:59 -04:00
Marc Chevrier
f9717725f9 link_directories(): enhance capabilities 2018-09-25 23:59:59 +10:00
Mikhail Korolev
22e670a306 VS: Add option to set VS_GLOBAL_* for all targets
Fixes: #18287
2018-09-25 09:20:25 -04:00
Julien Schueller
17e581af4c Help: Document CMAKE_RULE_MESSAGES variable
Fixes: #18368
2018-09-17 10:05:30 +02:00
Kyle Edwards
5ff7149298 Help: Document existence of CMAKE_CPACK_COMMAND
This useful variable was previously undocumented. This commit adds
brief documentation for it.
2018-09-10 12:36:41 -04:00
Mikhail Korolev
e78a0c8e8a VS: Add option to tell generator that platfrom is WinRT by default
Create a ``CMAKE_VS_WINRT_BY_DEFAULT`` variable to indicate this.

Fixes: #18286
2018-08-30 12:46:57 -04:00
Robert Maynard
4d384d290e Help: Document the $CACHE{} syntax
Also add a test case for the behavior.
2018-08-07 13:13:27 -04:00
Gregor Jasny
6b7f1e1db0 Xcode: Add variables and properties to configure schemes
Add `XCODE_SCHEME_*` target properties and associated variables
`CMAKE_XCODE_SCHEME_*` to initialize them on target creation.
Map each target property value to an associated Xcode scheme entry.

Co-Author: Martin Sander <mail@martin-sander.de>
Fixes: #17919
2018-08-01 09:12:42 -04:00
Craig Scott
e3664debd2 Merge topic 'doc-find_package-root'
492ade276b Help: Add explicit <PackageName>_ROOT variable documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2225
2018-07-20 18:58:43 -04:00
Brad King
492ade276b Help: Add explicit <PackageName>_ROOT variable documentation
Add documentation for both the CMake variable and environment variable
of this name pattern.  Update references to these names to link to their
documents.  Clarify the pattern used to construct their names.
2018-07-20 09:43:08 -04:00
Sebastian Holtermann
6651aab2ab Autogen: Add documentation for CMAKE_AUTOGEN_VERBOSE 2018-06-21 19:18:18 +02:00
Marc Chevrier
66ea1a3795 LINK_OPTIONS: Add support of "LINKER:" prefix 2018-06-06 17:22:41 +02:00
Basil Fierz
5f13168419 VS: Add option to select the version of the toolset used by VS 2017
Add new `version=` parameter in the toolset setting to select the
version.  Add variable `CMAKE_VS_PLATFORM_TOOLSET_VERSION` to hold the
version, if one is set (blank indicates default).

Fixes: #17549
2018-05-29 10:12:59 -04:00
Michael Stürmer
71a033616a added CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION variable
Fixes: #17955
2018-05-15 09:00:31 +02:00
Alex Turbov
af1c48871c CPack: Use project version as default for CPACK_PACKAGE_VERSION
* Introduce `CMAKE_PROJECT_VERSION` and the corresponsing components:
  `CMAKE_PROJECT_VERSION_MAJOR`, `CMAKE_PROJECT_VERSION_MINOR`,
  `CMAKE_PROJECT_VERSION_PATCH` and `CMAKE_PROJECT_VERSION_TWEAK`.

* `CPack` module use `CMAKE_PROJECT_VERSION_MAJOR`,
  `CMAKE_PROJECT_VERSION_MINOR` and `CMAKE_PROJECT_VERSION_PATCH`
  to initialize corresponsing CPack variables.
2018-05-03 08:26:03 +10:00
Bastien Schatt
6ec3e880e7 VS: Add variables to set SDK directories in vcxproj files
Create `CMAKE_VS_SDK_*_DIRECTORIES` variables to tell the VS generator
how to populate fields in `.vcxproj` files that specify SDK directories.

Fixes: #17908
2018-04-19 09:39:34 -04:00
Arkady Shapkin
304f493e57 MSVC: Add MSVC_TOOLSET_VERSION variable
Provide the MSVC toolset version number based on the compiler version.

Fixes: #16923
2018-04-04 13:21:09 -04:00
Marc B
df535ad846 Add CMAKE_FOLDER variable to initialize FOLDER target property
This can be used for example to organize all following targets into one
Visual Studio folder:

  set(CMAKE_FOLDER Libraries)
  add_subdirectory(libA)
  add_subdirectory(libB)
  set(CMAKE_FOLDER Executables)
  add_subdirectory(progA)

Another possibility is using the current directory name for all
following targets in subdirectories:

  get_filename_component(dirname "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
  string(APPEND CMAKE_FOLDER "/${dirname}")
2018-03-29 13:19:13 -04:00
Alex Turbov
73f9b2974c project: Add HOMEPAGE_URL named parameter
This sets variables like PROJECT_HOMEPAGE_URL, which can be
used as default values for various things (packaging modules,
doxygen defaults, etc.). Some packaging modules have been
updated to do this as part of this commit.

Co-Author: Craig Scott <craig.scott@crascit.com>
2018-03-17 08:25:48 +11:00
Craig Scott
fd28c382b4 project: Add <PROJECT-NAME>_DESCRIPTION
For consistency with the VERSION keyword, also define the
<PROJECT-NAME>_DESCRIPTION variable.
2018-03-17 08:25:48 +11:00
Shane Parris
b6ef4bc329 Document and extend the CMAKE_SUPPRESS_REGENERATION variable
Fixes: https://gitlab.kitware.com/cmake/cmake/issues/16815
2018-02-23 11:20:15 -05:00
Kyle Edwards
13347740e2 Help: add release notes, documentation for CTEST_RUN_CURRENT_SCRIPT behavior 2018-01-26 09:28:33 -05:00
Sebastian Holtermann
45ee4979fb Autogen: Add documentation for (CMAKE_)AUTOGEN_PARALLEL 2018-01-17 17:23:49 +01:00
Beren Minor
48f7e2d300
Unhardcode the CMAKE_CONFIGURATION_TYPES values
This removes duplicated code for per-config variable initialization by
providing a `cmake_initialize_per_config_variable(<PREFIX> <DOCSTRING>)`
function.

This function initializes a `<PREFIX>` cache variable from `<PREFIX>_INIT`
and unless the `CMAKE_NOT_USING_CONFIG_FLAGS` variable is defined, does
the same with `<PREFIX>_<CONFIG>` from `<PREFIX>_<CONFIG>_INIT` for every
`<CONFIG>` in `CMAKE_CONFIGURATION_TYPES` for multi-config generators or
`CMAKE_BUILD_TYPE` for single-config generators.
2018-01-08 21:15:14 +01:00
Brad King
5f87ea1603 Merge topic 'cmake-job-pool'
07185055 Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1514
2017-12-04 10:38:51 -05:00
Matt McCormick
07185055d5 Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLS
This enables configuration of build parallelism with the Ninja generator by
passing arguments on the command line to CMake. For example,

  cmake \
    '-DCMAKE_JOB_POOLS:STRING=compile=5;link=2' \
    -DCMAKE_JOB_POOL_COMPILE:STRING=compile \
    -DCMAKE_JOB_POOL_LINK:STRING=link \
      ~/src/MyProject
2017-11-29 15:13:36 -05:00