Commit Graph

297 Commits

Author SHA1 Message Date
Gregor Jasny
7a9a1e0453 Help: Add a hint about C and C++ compiler version variable
Closes #16917
2017-05-28 20:19:53 +02:00
Brad King
53e89b6ab0 Add options for separate compile and link sysroots
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>
2017-05-09 14:21:54 -04:00
Christian Pfeiffer
664bb36729 Help: Fix CMAKE_HOST_WIN32 documentation
The documentation falsely claims `CMAKE_HOST_WIN32` is `true` on Cygwin.
Since commit v2.8.4~153^2 (Cygwin: Do not define 'WIN32', 2010-12-17) we
do not define `CMAKE_HOST_WIN32` on Cygwin either.
2017-04-24 20:22:24 +02:00
Brad King
c94f1bcf92 Drop Visual Studio 7 .NET 2003 generator
This generator has been deprecated since CMake 3.6.  Remove it.
2017-04-19 15:28:05 -04:00
Brad King
eb08e1febb Help: Document CMAKE_MATCH_<n> variables 2017-04-18 14:45:49 -04:00
Brad King
f7e3a34d3c Merge topic 'ipo-var-per-config'
470437f6 Support CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !709
2017-04-18 08:54:24 -04:00
Ruslan Baratov
470437f6f9 Support CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> 2017-04-18 03:10:34 +08:00
Brad King
c0323cbf5f Merge topic 'vs-custom-kits-dir'
fee01194 VS: Add an environment variable for the Windows 10 kits directory
b80c6d12 VS: Refactor Win 10 Kits root detection to support multiple roots

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !696
2017-04-17 10:29:15 -04:00
Brad King
2cb98329f1 Merge topic 'project-description'
3b484871 project: Add `DESCRIPTION` parameter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !679
2017-04-13 08:14:23 -04:00
Brad King
fee011946e VS: Add an environment variable for the Windows 10 kits directory
Define a `CMAKE_WINDOWS_KITS_10_DIR` environment variable to allow
users to tell CMake about a custom Windows 10 SDK directory.  We
choose to make this an environment variable rather than a CMake
variable or cache entry because:

* Using a custom directory also requires custom external MSBuild
  configuration.  Therefore users are already configuring a
  custom environment.

* The custom directory must be set consistently in all parts of
  a build including nested projects.  An environment variable
  avoids requiring users to thread the setting into nested builds.

Fixes: #16743
2017-04-12 10:57:05 -04:00
Alex Turbov
3b4848717a project: Add DESCRIPTION parameter
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`.
2017-04-11 10:17:00 -04:00
Ruslan Baratov
7393418844 Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB}
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.
2017-04-03 14:10:50 -04:00
Brad King
cfa55fd428 Merge topic 'doc-prefer-MSVC_VERSION'
fecf8467 Help: Document preference of `MSVC_VERSION` over `MSVC##`
712452e3 Help: Clarify MSVC14 docs w.r.t. VS 2017 v141 toolset
49a60b70 MSVC: Exclude future cl 20+ from MSVC14 variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !609
2017-03-23 08:44:58 -04:00
Brad King
fecf846701 Help: Document preference of MSVC_VERSION over MSVC##
Issue: #16735
2017-03-22 11:24:54 -04:00
Brad King
712452e330 Help: Clarify MSVC14 docs w.r.t. VS 2017 v141 toolset
Issue: #16735
2017-03-22 11:24:46 -04:00
Brad King
3df2506fb5 Help: Document VS generator toolset specification syntax 2017-03-13 10:36:58 -04:00
Brad King
60546b4829 Help: Cross-reference generator toolset variables 2017-03-13 10:36:58 -04:00
Brad King
35c5cddcc5 Help: Cross-reference generator platform variables 2017-03-13 10:36:58 -04:00
Brad King
7df38939f9 Help: Move generator toolset support details to variable docs
Move the details about support for generator toolset specification
to the `CMAKE_GENERATOR_TOOLSET` variable documentation.  This is
a more suitable place because it is shared by all means to set this
variable, not just the `cmake -T` option.
2017-03-13 10:36:58 -04:00
Brad King
c750b28220 Help: Move generator platform support details to variable docs
Move the details about support for generator platform specification
to the `CMAKE_GENERATOR_PLATFORM` variable documentation.  This is
a more suitable place because it is shared by all means to set this
variable, not just the `cmake -A` option.
2017-03-13 10:36:57 -04:00
Brad King
10f444a5c6 Merge topic 'doc-toolset-host-arch-typo'
81b24547 Help: Fix typo in CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !579
2017-03-13 10:36:25 -04:00
Brad King
81b2454757 Help: Fix typo in CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE 2017-03-13 10:32:50 -04:00
Brad King
22908e4be8 Merge topic 'xcode-test-schema-generation'
3fd9f4ab Xcode: Add test for schema generation
cf13e495 Xcode: Control schema generation via variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !577
2017-03-13 08:58:50 -04:00
Brad King
b46fa35824 Merge topic 'cuda-vs'
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
2017-03-13 08:57:57 -04:00
Gregor Jasny
cf13e49544 Xcode: Control schema generation via variable
Issue: #15441
2017-03-12 21:24:46 +01:00
Brad King
62b308515a VS: Select highest available CUDA toolset by default
If `CMAKE_GENERATOR_TOOLSET` does not have a `cuda=...` field then
find available CUDA toolsets and choose the highest version.
2017-03-10 10:19:53 -05:00
Brad King
5164e9a651 VS: Provide an option to specify CUDA toolset version
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.
2017-03-10 10:19:53 -05:00
Brad King
29ec8d65f2 Merge topic 'pr.gcc_ar'
b9d36826 Add 'CMAKE_GCC_AR' and 'CMAKE_GCC_RANLIB' variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !550
2017-03-10 08:40:58 -05:00
Brad King
c4f9d10426 Merge topic 'master'
d9bdcf34 Tests: Add x32 tests to test suite
5b6d354f Help: Add notes for topic 'x32-abi'
bed9c73d Modules: Add x32-abi support to hard-coded paths
462cf254 Add support for x32-abi

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !532
2017-03-09 11:08:11 -05:00
Brad King
31f3531856 Merge topic 'doc-vs15-MSVC_VERSION'
66542b66 Help: Update MSVC_VERSION for Visual Studio 2017

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !567
2017-03-09 10:51:40 -05:00
Ruslan Baratov
b9d36826c5 Add 'CMAKE_GCC_AR' and 'CMAKE_GCC_RANLIB' variables 2017-03-09 04:28:01 +08:00
Wojciech Mamrak
66542b6636 Help: Update MSVC_VERSION for Visual Studio 2017
The value we documented was left from a preview that still used `v140`
tools.  Update it to match the `v141` tools distributed with the final
release.
2017-03-08 14:30:38 -05:00
Steven Newbury
462cf25427 Add support for x32-abi
Detect x32-abi through CMakeCompilerABI infrastruture and use this
information at runtime to determine the correct library paths with
`FIND_LIBRARY_USE_LIBX32_PATHS`.

Fixes: #15994
2017-03-07 15:22:55 -05:00
Ruslan Baratov
6b6191d875 Add variable 'CMAKE_INTERPROCEDURAL_OPTIMIZATION' 2017-03-02 09:37:39 -05:00
Brad King
c1fb7213ed Merge topic 'autogen_uic_paths'
3bf28f5e Autogen: New short InfoGet functions
154d8339 Autogen: Parse enabled feature configuration only
ac77fa35 Autogen: Add missing return on error
662ad240 Autogen: Rename and merge moc related methods
5adf22bb Autogen: Add AUTOUIC_SEARCH_PATHS release notes
36fa535d Autogen: Add AUTOUIC_SEARCH_PATHS documentation
6d7c02db Autogen: Add AUTOUIC_SEARCH_PATHS test
1cdf7c1b Autogen: Add AUTOUIC_SEARCH_PATHS support
110c1bf4 Autogen: Add subDirPrefix function
db431ecf Autogen: Merge FindInIncludeDirectories into FindIncludeFile
2017-03-02 09:26:13 -05:00
Sebastian Holtermann
36fa535d92 Autogen: Add AUTOUIC_SEARCH_PATHS documentation 2017-03-02 09:10:02 -05:00
Christian Schmidbauer
503f25d490 find_library: Allow custom lib suffix be used as find path
Add a new `CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable to allow use
of a custom suffix on `lib` directory names.  This is a more general
option than that added by commit v3.7.0-rc1~504^2 (Teach find_library
and find_package to search lib32 paths, 2016-06-10).  It allows the find
path to be more deterministic on custom setups.

See discussion in #10287 and #15994.
2017-03-01 09:49:42 -05:00
Sebastian Holtermann
96f6f392e3 Autogen: Add AUTOMOC_DEPEND_FILTERS documentation 2017-02-23 14:14:29 +01:00
Brad King
f3e8a89a9b Merge topic 'install_name_policy'
1ba91291 Add policy CMP0068 separate install_name and RPATH settings on macOS
f7b9bf41 Apple: Add BUILD_WITH_INSTALL_NAME_DIR target property
4bff2d14 Apple: Refactor support for using INSTALL_NAME_DIR.
624fb9d7 Help: Format BUILD_WITH_INSTALL_RPATH documentation
2017-02-17 08:46:14 -05:00
Clinton Stimpson
f7b9bf41c5 Apple: Add BUILD_WITH_INSTALL_NAME_DIR target property
This new property controls whether to apply INSTALL_NAME_DIR to the
build tree.  It also overrides BUILD_WITH_INSTALL_RPATH.
2017-02-14 14:28:07 -07:00
Robert Maynard
44f3acb202 CUDA: Detect the toolkit include directories
The `nvcc -v` output provides what include directories need to be added
to use the CUDA toolkit from other languages ( C/C++ ).
2017-02-10 16:08:06 -05:00
Brad King
4f37987e3f Merge topic 'lang_lint'
0618ddf6 Add properties to run the cpplint style checker with the compiler
2017-01-25 08:41:18 -05:00
Thiago Perrotta
114ac7d005 Help: Fix typo in CMAKE_DL_LIBS docs 2017-01-24 14:37:07 -05:00
Jamie Snape
0618ddf6b1 Add properties to run the cpplint style checker with the compiler
Create a `<LANG>_CPPLINT` target property (initialized by a
`CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker
command line to be run along with the compiler.
2017-01-23 14:47:13 -05:00
Jamie Snape
cf590c1236 ctest_memcheck: add support for standalone LeakSanitizer 2017-01-09 13:15:42 -05:00
Brad King
58f02aaa4d Help: Clarify meaning of CMAKE_CL_64
Closes: #16504
2016-12-14 11:11:55 -05:00
Robert Maynard
4505411982 Help: Document CUDA_STANDARD and related properties 2016-12-09 14:13:06 -05:00
Brad King
f72ba42b7c try_compile: Add policy CMP0067 to honor language standards
Projects use `try_compile` to check if they will be able to compile some
particular source code.  When a language standard variable like
`CMAKE_CXX_STANDARD` is set, then the project intends to compile source
code using a compiler mode for that standard.  Therefore it makes sense
for `try_compile` to use that standard in the test project too.

Unfortunately this was not done when support for the
`CMAKE_CXX_STANDARD` variable was first implemented.  Add a policy to
introduce the improved behavior in a compatible way.

Closes: #16456
2016-12-06 08:58:42 -05:00
Brad King
839cd16396 Merge topic 'vs-default-build-package'
9e3164df VS: Add option to place `PACKAGE` target in solution default build
2016-11-29 08:59:11 -05:00
Michael Stürmer
9e3164dfa2 VS: Add option to place PACKAGE target in solution default build
Add a `CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD` variable to control
this behavior.
2016-11-29 08:46:27 -05:00