Commit Graph

19 Commits

Author SHA1 Message Date
Raul Tambre
7123c8fdbf CheckLanguage: Don't pass CMAKE_CUDA_HOST_COMPILER for Visual Studio
Visual Studio doesn't support specifying it and if we do we get a warning.

Fixes: #22712
2021-10-19 09:03:24 -04:00
Brad King
89ed11ae6f CheckLanguage: Avoid CMP0126 warning
The macro's implementation converts a normal variable into a cache
variable intentionally, so both are set.  Explicitly set CMP0126 to NEW
to avoid a warning in trace mode.  This won't affect the module behavior
because the code path does not activate if a normal variable is already
defined anyway.

Fixes: #22548
2021-08-18 15:25:49 -04:00
Samir Benmendil
bddc54a37d CheckLanguage: Pass CMAKE_TOOLCHAIN_FILE to test project
Fixes: #20545
2020-10-16 09:13:32 -04:00
Brad King
7968d9d442 Help: Document CMAKE_CUDA_HOST_COMPILER as specific to NVIDIA nvcc
Explain the purpose of this variable and the conditions under which
it can be set.  Point out that it should not be set explicitly without
also setting `CMAKE_CUDA_COMPILER` explicitly.

Issue: #20826
2020-07-14 15:22:54 -04:00
Brad King
1cadb625f2 Merge topic 'CheckLanguage-cuda-host'
5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4711
2020-05-06 09:27:13 -04:00
Brad King
5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER
Fix the condition added by commit fada8cbfd6 (CheckLanguage: Report
CMAKE_CUDA_HOST_COMPILER if needed for compilation, 2019-05-31,
v3.15.0-rc1~12^2) to activate CUDA-specific logic.  The old condition
had worked in our test suite only by accident because the loop variable
used in the test happened to be the name and value that the old
condition used!  Update the test to use a different name.

Fixes: #19013
2020-05-05 09:50:29 -04:00
Hannes Vogt
36baf1f13c CheckLanguage: hide commonly used variable names
The check_language sets internal variables with a common name in the
caller's scope: `result`, `output` and `content`.
They are now prefixed with `_cl_`,
inspired by the CheckLibraryExists module.
2020-03-18 17:47:06 +01:00
Kyle Edwards
9d0f61839b CheckLanguage: Pass CMAKE_MAKE_PROGRAM to child process
Fixes: #20017
2020-01-24 11:23:04 -05:00
Alex Turbov
7b2dd9dedc
Refactor: Use added message types in various modules
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2019-11-02 14:10:09 +02:00
Robert Maynard
fada8cbfd6 CheckLanguage: Report CMAKE_CUDA_HOST_COMPILER if needed for compilation
Fixes: #19013
2019-06-03 10:36:06 -04:00
Bartosz Kosiorek
cb811d11ce Help: Improve description of modules 2019-04-23 10:39:34 +02:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Cristian Adam
4d611868df Check*: Added include guards 2017-12-01 13:05:02 +02:00
Brad King
a19b811363 CheckLanguage: Pass generator instance into check
Otherwise we do not check for support for the language with the same
generator instance as the caller.
2017-10-19 10:20:11 -04:00
Brad King
0f5e76df0c CheckLanguage: Pass generator platform and toolset into check
Otherwise we do not check for support for the language with the same
generator settings as the caller.
2017-03-08 09:10:45 -05:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Daniele E. Domenichelli
1890c668e9 Keep cmake_minimum_required calls in sync with current version
Update cmake_minimum_required calls in CMakeLists.txt in Modules and in
CMakeLists.txt generated by other modules, so that they are always in
sync with current CMake version.
2014-05-19 16:55:12 +02:00
Kitware Robot
f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Brad King
5db99e8708 Add CheckLanguage module
Define a "check_language(<lang>)" macro to test whether <lang> can be
enabled.  Cache the result in CMAKE_<lang>_COMPILER.  Add a test case
covering expected results.
2012-02-08 10:48:34 -05:00