summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-variables.7.rst
Commit message (Collapse)AuthorAgeFilesLines
* VS: Add option to select the version of the toolset used by VS 2017Basil Fierz2018-05-291-0/+1
| | | | | | | | 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
* added CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION variableMichael Stürmer2018-05-151-0/+1
| | | | Fixes: #17955
* CPack: Use project version as default for `CPACK_PACKAGE_VERSION`Alex Turbov2018-05-021-0/+5
| | | | | | | | | | * 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.
* VS: Add variables to set SDK directories in vcxproj filesBastien Schatt2018-04-191-0/+7
| | | | | | | Create `CMAKE_VS_SDK_*_DIRECTORIES` variables to tell the VS generator how to populate fields in `.vcxproj` files that specify SDK directories. Fixes: #17908
* MSVC: Add MSVC_TOOLSET_VERSION variableArkady Shapkin2018-04-041-0/+1
| | | | | | Provide the MSVC toolset version number based on the compiler version. Fixes: #16923
* Add CMAKE_FOLDER variable to initialize FOLDER target propertyMarc B2018-03-291-0/+1
| | | | | | | | | | | | | | | | | 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}")
* project: Add HOMEPAGE_URL named parameterAlex Turbov2018-03-161-0/+3
| | | | | | | | | 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>
* project: Add <PROJECT-NAME>_DESCRIPTIONCraig Scott2018-03-161-0/+1
| | | | For consistency with the VERSION keyword, also define the <PROJECT-NAME>_DESCRIPTION variable.
* Document and extend the CMAKE_SUPPRESS_REGENERATION variableShane Parris2018-02-231-0/+1
| | | | Fixes: https://gitlab.kitware.com/cmake/cmake/issues/16815
* Help: add release notes, documentation for CTEST_RUN_CURRENT_SCRIPT behaviorKyle Edwards2018-01-261-0/+1
|
* Autogen: Add documentation for (CMAKE_)AUTOGEN_PARALLELSebastian Holtermann2018-01-171-0/+1
|
* Unhardcode the CMAKE_CONFIGURATION_TYPES valuesBeren Minor2018-01-081-0/+3
| | | | | | | | | | | | 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.
* Merge topic 'cmake-job-pool'Brad King2017-12-041-0/+1
|\ | | | | | | | | | | | | 07185055 Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1514
| * Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLSMatt McCormick2017-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge topic 'CodeBlocks-custom-compiler-id'Brad King2017-11-291-0/+1
|\ \ | |/ |/| | | | | | | | | e04f1d1b CodeBlocks: add option for the CB compiler ID Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1512
| * CodeBlocks: add option for the CB compiler IDMelven Roehrig-Zoellner2017-11-271-0/+1
| | | | | | | | | | | | | | | | CodeBlocks uses his own compiler ID string which may differ from CMAKE_<LANG>_COMPILER_ID. In particular CodeBlocks supports a large number of different compiler configurations (with different IDs) This commit adds a cache variable "CMAKE_CODEBLOCKS_COMPILER_ID", so the user might adjust it when needed.
* | CUDA: Add CMAKE_CUDA_SEPARABLE_COMPILATION variableBrad King2017-11-171-0/+1
|/ | | | | | | Use its value to initialize the `CUDA_SEPARABLE_COMPILATION` target property when targets are created. Fixes: #17478
* CPack: enable setting default dir creation permissionsDomen Vrankar2017-11-081-0/+1
| | | | | | | | | | | Introduces CPACK_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable which adds support for functionality introduced by CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable. Fixes #17333 # Conflicts: # Help/release/dev/cmake-default-dir-install-permissions.rst
* CMake: enable setting default dir creation permissionsDomen Vrankar2017-11-081-0/+1
| | | | | | | | | Introduces CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable which enables the user to specify the default permissions for directory creation. This setting is then used to auto set the permissions on directories which are implicitly created by install() and file(INSTALL) commands such as CMAKE_INSTALL_PREFIX directories.
* Xcode: Add option to generate only topmost project fileGregor Jasny2017-10-311-0/+1
| | | | Closes #16780
* Add infrastructure for generators to select a build tool instanceBrad King2017-10-191-0/+1
| | | | | | | | | | | | | | Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location persistently across re-runs of CMake in a given build tree. For now we reject the option by default if explicitly set. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add a RunCMake.GeneratorInstance test to cover basic use cases for the option. Verify that `CMAKE_GENERATOR_INSTANCE` is empty by default, and that it is rejected when the generator does not support a user setting. Issue: #17268
* file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboptionShane Parris2017-10-181-0/+2
|
* Add infrastructure to detect secondary compiler version informationBrad King2017-10-031-0/+1
| | | | | | | | | | | Create a `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL` variable to hold a secondary/internal compiler version number detected at the same time as the primary compiler version. This will be useful for some compilers where we need such a number to determine correct usage. Inspired-by: Stefan Andersson <tfosm@hotmail.com> Suggested-by: Norbert Lange <norbert.lange@andritz.com> Issue: #17264
* Help: Fix placement of one variable in cmake-variables manualBrad King2017-10-021-1/+1
| | | | | The `CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND` variable was recently added slightly in the wrong place for the sorted ordering.
* Autogen: Doc: Add documentation for (CMAKE_)AUTOMOC_COMPILER_PREDEFINESSebastian Holtermann2017-09-291-0/+2
| | | | | | Also adds the documentation for CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND. Closes #17275
* Merge topic 'document_env_variables'Craig Scott2017-09-271-0/+1
|\ | | | | | | | | | | | | e6b77c5f Help: Document CMake's environment variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1235
| * Help: Document CMake's environment variablesRobert Maynard2017-09-261-0/+1
| |
* | CodeBlocks: add option to exclude external filesAlexandr (Sagrer) Gridnev2017-09-141-0/+1
|/ | | | | | | | | | | | Add variable `CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` to optionally exclude files from outside the project root from the project file written by the CodeBlocks extra generator. This optionally restores logic that had been removed by commit v2.8.3~40^2 (CodeBlocks Generator: Do not omit files in the project file listing, 2010-10-05) in response to QTCREATORBUG-2250. Issue: #12110 Fixes: #17188
* Add properties to run cppcheck along with the compilerBill Hoffman2017-08-301-0/+1
| | | | | | Create a `<LANG>_CPPCHECK` target property (initialized by a `CMAKE_<LANG>_CPPCHECK` variable) to specify a `cppcheck` command line to be run along with the compiler.
* Autogen: Add documentation for AUTOMOC_MACRO_NAMESSebastian Holtermann2017-08-181-0/+1
|
* Merge topic 'labels-for-subprojects'Brad King2017-07-131-0/+2
|\ | | | | | | | | | | | | | | | | | | | | 376dc3eb Help: Add notes for topic 'labels_for_subprojects' a70d8e93 Add tests for new directory labels and labels-for-subprojects features 47b3a57c Display subproject timing summary d3859624 Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable d08ec4d2 Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1004
| * Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variableBetsy McPhail2017-07-101-0/+1
| | | | | | | | | | The specified LABELS will be passed down to subdirectories as well as any targets or tests in the directory.
| * Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variableBetsy McPhail2017-07-101-0/+1
| | | | | | | | | | Use this variable to specify a list of labels that will be reported to CDash as subprojects.
* | Merge topic 'iar_improved'Brad King2017-07-071-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | d8e6cd9e IAR: Improve support for IAR ARM Compiler 0b1a2876 Add a CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID variable fea7d69d Store CMAKE_ASM_COMPILER_VERSION persistently d2a8b5ce CMakeDetermineASMCompiler: Fix small copy-paste mistake a2112257 Add infrastructure to use language extensions without any standard 8cd28bb0 cmLocalGenerator: Switch order of <LANG>_{EXTENSIONS,STANDARD} check 0fc2d78e cmLocalGenerator: Simplify logic for language standard or extension flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !991
| * Add a CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID variableNorbert Lange2017-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | Compilers such as MSVC and IAR may have variants that target different architectures. We have been using a `MSVC_<LANG>_ARCHITECTURE_ID` variable to hold this information for MSVC. Add an alternative with a more general name (later we can port MSVC to it too). This additional information may be needed to generate proper invocations of the compiler based on its architecture variant.
* | Help: Document the CMAKE_MSVCIDE_RUN_PATH variable.Robert Maynard2017-06-271-0/+1
|/
* Android: Add support for unified headersBrad King2017-06-121-0/+1
| | | | | | | | The unified headers are preferred as of NDK r15, so use them by default if available and provide an option to use the deprecated headers. Inspired-by: Florent Castelli <florent.castelli@gmail.com> Fixes: #16584
* Add options for separate compile and link sysrootsBrad King2017-05-091-0/+2
| | | | | | | | | Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as operation-specific alternatives to `CMAKE_SYSROOT`. This will be useful for Android NDKs that compile and link with different sysroot values (e.g. `r14` with unified headers). Co-Author: Florent Castelli <florent.castelli@gmail.com>
* Help: Document CMAKE_MATCH_<n> variablesBrad King2017-04-181-0/+1
|
* Support CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>Ruslan Baratov2017-04-171-0/+1
|
* Merge topic 'project-description'Brad King2017-04-131-0/+2
|\ | | | | | | | | | | | | 3b484871 project: Add `DESCRIPTION` parameter Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !679
| * project: Add `DESCRIPTION` parameterAlex Turbov2017-04-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is quite often the project description has used in a real world software. Examples include: * part of a help screen of the application * builtin resources (`*.rc` files, data for "About" dialog of a GUI app, & etc) * most generators for CPack can use it * it could be used by documentary software (Doxygen, Sphinx) which is usually integrated to CMake based projects via `add_custom_target()` Now `project()` call learned an optional `DESCRIPTION` parameter with a short string describing a project. Being specified, it would set the `PROJECT_DESCRIPTION` variable which could be used in `configure_file()` or whatever user wants. Also `PROJECT_DESCRIPTION` is a default value for `CPACK_PACKAGE_DESCRIPTION_SUMMARY`.
* | Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB}Ruslan Baratov2017-04-031-2/+2
|/ | | | | | The variables recently added by commit b9d36826 (Add 'CMAKE_GCC_AR' and 'CMAKE_GCC_RANLIB' variables, 2017-03-08) are more appropriately managed with language-specific names rather than toolchain-specific names.
* Merge topic 'xcode-test-schema-generation'Brad King2017-03-131-0/+1
|\ | | | | | | | | | | | | | | 3fd9f4ab Xcode: Add test for schema generation cf13e495 Xcode: Control schema generation via variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !577
| * Xcode: Control schema generation via variableGregor Jasny2017-03-121-0/+1
| | | | | | | | Issue: #15441
* | Merge topic 'cuda-vs'Brad King2017-03-131-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | 65481a60 CUDA: Work around VS limitation in CudaOnly.WithDefs test 8cae24a1 VS: Add more CUDA flag table entries 6ca4f222 VS: Add support for the CUDA_SEPARABLE_COMPILATION property 94255511 VS: Select CUDA code generation architectures 253594d0 VS: Select the CUDA runtime library 4def02a3 VS: Place CUDA host compiler options in proper project file fields 29f07b08 VS: Do not pass CUDA compile options to C compiler b966f489 VS: Do not use absolute paths to CUDA sources ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !566
| * VS: Provide an option to specify CUDA toolset versionBrad King2017-03-101-0/+1
| | | | | | | | | | | | | | | | The NVIDIA CUDA Toolkit provides MSBuild toolset files for integration with Visual Studio. Multiple versions may be installed so we need a way to tell our VS generators which CUDA toolset to use. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a `cuda=...` field specifying the version number.
* | Add 'CMAKE_GCC_AR' and 'CMAKE_GCC_RANLIB' variablesRuslan Baratov2017-03-081-0/+2
|/
* Help: Sort cmake-variables.7 toctreeRuslan Baratov2017-03-071-26/+26
|
* Add variable 'CMAKE_INTERPROCEDURAL_OPTIMIZATION'Ruslan Baratov2017-03-021-0/+1
|