Commit Graph

37753 Commits

Author SHA1 Message Date
Brad King
ae5f40696e CMP0037: Allow test and package targets when features are not enabled
When CMake will not generate a test, package, or package_source target,
allow projects to create their own targets with these names.

Fixes: #16062
2017-10-30 10:21:31 -04:00
Brad King
409527a03c CMP0037: De-duplicate check and message generation 2017-10-30 10:21:21 -04:00
Brad King
a2611d816b Tests: Add RunCMake.CMP0037 case for WARN on reserved targets 2017-10-26 14:11:19 -04:00
Brad King
103501c4e0 Tests: Do not enable languages in all cases of RunCMake.CMP0037 2017-10-26 14:11:19 -04:00
Brad King
2d0b3e6ed2 cmGlobalGenerator: Refactor test and package target conditions
In `AddGlobalTarget_{Test,Package,PackageSource}`, check conditions up
front and return early if the targets are not needed.  This reduces the
indentation of the main logic.
2017-10-26 14:09:38 -04:00
Brad King
8b10098598 Merge branch 'release-3.10' 2017-10-26 09:37:01 -04:00
Brad King
6a8c765c8f Merge topic 'cm-array-begins-size'
57132765 Replace cmArray{Begin,End,Size} by their standard counterparts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1352
2017-10-26 08:57:04 -04:00
Brad King
0278ec84d8 Merge topic 'clang-cl-TP'
7077a554 Clang: Use -TP flag for C++ sources with clang-cl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1407
2017-10-26 08:56:37 -04:00
Kitware Robot
6b829ff23d CMake Nightly Date Stamp 2017-10-26 00:02:39 -04:00
Brad King
206354ac4c Merge branch 'release-3.10' 2017-10-25 08:44:18 -04:00
Brad King
cec4b86f0a Merge topic 'server-codemodel-install-dest'
296eb9ad cmake-server: Add target install destinations to codemodel

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1382
2017-10-25 08:17:03 -04:00
Brad King
7470561278 Merge topic 'flang-windows'
b2c6c357 Flang: Add partial support on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1404
2017-10-25 08:15:43 -04:00
Brad King
e419a67a56 Merge topic 'windows_symlinks'
393e0fbe cmTimestamp: For symlinks switch to timestamp of resolved path
640709e7 cmSystemTools: Implement GetRealPath on Windows
d41582fc Call GetRealPath through cmSystemTools instead of KWSys directly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1202
2017-10-25 08:14:55 -04:00
Brad King
fe4d6f1fd6 Merge topic 'omp-oacc-werror-return-type'
15da0ba3 Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1406
2017-10-25 08:12:30 -04:00
Brad King
b0207cec32 Merge topic 'findmpi-core-count'
1610f757 FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1405
2017-10-25 08:12:07 -04:00
Brad King
b5dd256d94 Merge topic 'defer-target-source-check'
4e7f6738 Defer check for sources within a target until generation.
6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1242
2017-10-25 08:11:19 -04:00
Brad King
a720131006 Merge branch 'clang-cl-TP' into release-3.10
Merge-request: !1407
2017-10-25 07:39:12 -04:00
Brad King
7077a554f1 Clang: Use -TP flag for C++ sources with clang-cl
We do this for `cl`, so we should do it for `clang-cl`.

Fixes: #17394
2017-10-25 07:36:10 -04:00
Kitware Robot
53d8be4118 CMake Nightly Date Stamp 2017-10-25 00:01:14 -04:00
Justin Goshi
296eb9ad4c cmake-server: Add target install destinations to codemodel
Protocol version is updated to 1.2 since this is a change
to what was released in cmake version 3.10.
2017-10-24 14:58:07 -04:00
Isuru Fernando
b2c6c3574e Flang: Add partial support on Windows
Add minimal changes needed to help Flang itself build on Windows using
CMake.  Additional work will be required for full support.

Issue: #17384
2017-10-24 11:27:08 -04:00
Manuel Núñez
393e0fbe63 cmTimestamp: For symlinks switch to timestamp of resolved path
ModifiedTime uses stat on UNIX which does resolve symlinks, however Windows implementation relies on GetFileAttributesExW which does not. Getting real file path before calling ModifiedTime will not change UNIX semantic and will fix Windows behavior.

Fixes: #17206
2017-10-24 11:04:25 -04:00
Manuel Núñez
640709e7db cmSystemTools: Implement GetRealPath on Windows
Override the KWSys GetRealPath on Windows and use uv_fs_realpath first
to resolve symbolic links.

Fixes: #17206
2017-10-24 11:04:23 -04:00
Manuel Núñez
d41582fc94 Call GetRealPath through cmSystemTools instead of KWSys directly
This will allow a wrapper to be added to extend functionality.
2017-10-24 11:04:21 -04:00
Brad King
b305e81b3e Merge branch 'omp-oacc-werror-return-type' into release-3.10
Merge-request: !1406
2017-10-24 10:56:36 -04:00
Christian Pfeiffer
15da0ba3a2 Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type
Explicitly return a value from `main` in our test sources.

Fixes: #17391
2017-10-24 10:55:06 -04:00
Brad King
143b2e7b21 Merge branch 'findmpi-core-count' into release-3.10
Merge-request: !1405
2017-10-24 10:41:44 -04:00
Christian Pfeiffer
1610f757ac FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS
Since commit v3.9.0-rc1~224^2~1 (FindMPI: MPIEXEC handling improvements,
2017-04-21) the `ProcessorCount` module is being used to initialize
`MPIEXEC_MAX_NUMPROCS`.  However, this leads to the logical cores being
counted rather than the physical ones, and some MPI implementations like
OpenMPI will error if mpiexec is called with that number.  Switch it to
the number of physical cores using `cmake_host_system_information`.

This ensures that if `MPIEXEC_MAX_NUMPROCS` is being used to set up MPI
tests with CTest or similar that the tests won't spuriously fail due to
OpenMPI refusing to start the application.
2017-10-24 10:41:02 -04:00
Brad King
7519594000 Merge branch 'release-3.10' 2017-10-24 08:50:09 -04:00
Brad King
d93b8009f9 Merge topic 'FindCUDA-doc-format'
17ddf126 FindCUDA: Improve documentation formatting markup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1403
2017-10-24 08:48:45 -04:00
Brad King
047af6e94e Merge topic 'FindOpenCL-more-versions'
55f7930f FindOpenCL: Add detection of OpenCL 2.1 and 2.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1398
2017-10-24 08:48:28 -04:00
Brad King
4edcf4f169 Merge topic 'help_parse_arguments'
546a3289 Help: Fix cmake_parse_arguments behavior for not found arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1397
2017-10-24 08:47:59 -04:00
Brad King
07253b8919 Merge topic 'gnuid-cmp54-fix'
a8be8b1b GNUInstallDirs: Enable CMP0054

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1400
2017-10-24 08:47:27 -04:00
Brad King
ef6ccfda60 Merge topic 'doc-cxx-std-msvc'
e0587669 Help: Correct <LANG>_STANDARD help w.r.t. MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1401
2017-10-24 08:47:05 -04:00
Brad King
11dcf81c44 Merge topic 'generator-instance'
9ffb3538 VS: Select and save a VS 2017 instance persistently
17edfa41 cmVSSetupHelper: Add option to specify an instance
a19b8113 CheckLanguage: Pass generator instance into check
6b3cd64d ExternalProject: Propagate the generator instance
314613d1 Add infrastructure for generators to select a build tool instance

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1394
2017-10-24 08:22:25 -04:00
Deniz Bahadir
4e7f67383f Defer check for sources within a target until generation.
The `add_library` and `add_executable` commands can now be called with
no source-files and won't generate a warning or error message, as long
as source-files will be added later via the `target_sources` command.
If during the generation step still no sources are associated with
targets created by such calls a useful error message will be generated
and generation fails.

Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
excluded from this check because we do not need sources for these target
types during generation.

Fixes: #16872
2017-10-24 08:14:47 -04:00
Brad King
6e4e7c6547 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode
The `NoSourcesButLinkObjects` case would not be expected to work under
Xcode with multiple architectures even if the target objects were listed
directly as sources.  Exclude it.  We already exclude similar cases in
`RunCMake.add_library`.
2017-10-24 08:11:29 -04:00
Kitware Robot
48c713d324 CMake Nightly Date Stamp 2017-10-24 00:01:07 -04:00
Henry Schreiner
17ddf126f0 FindCUDA: Improve documentation formatting markup 2017-10-23 12:17:38 -04:00
Matthias Maennich
57132765e0 Replace cmArray{Begin,End,Size} by their standard counterparts
std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14
and an standard compliant implementation has been introduced within the
'cm' namespace: cm::{cbegin,cend}.

std::size is only part of C++17, hence exposing a compliant implementation
within namespace cm (cm::size).

where possible, the standard implementations are reused.
2017-10-23 17:51:35 +02:00
Brad King
d9430d1739 Merge branch 'FindOpenCL-more-versions' into release-3.10
Merge-request: !1398
2017-10-23 11:40:34 -04:00
Henry Schreiner
55f7930f0e FindOpenCL: Add detection of OpenCL 2.1 and 2.2 2017-10-23 11:39:53 -04:00
Brad King
0f016fae3e Merge branch 'help_parse_arguments' into release-3.10
Merge-request: !1397
2017-10-23 10:35:31 -04:00
Brad King
3d35c3d1a3 Merge branch 'gnuid-cmp54-fix' into release-3.10
Merge-request: !1400
2017-10-23 09:03:10 -04:00
Christian Pfeiffer
a8be8b1b54 GNUInstallDirs: Enable CMP0054
Fixes: #17381
2017-10-23 09:02:54 -04:00
Brad King
cd80eb2c50 Merge branch 'doc-cxx-std-msvc' into release-3.10
Merge-request: !1401
2017-10-23 08:24:04 -04:00
Christian Pfeiffer
e058766953 Help: Correct <LANG>_STANDARD help w.r.t. MSVC
Fixes: #17380
2017-10-23 08:23:53 -04:00
Brad King
f86f3e21d0 Merge branch 'release-3.10' 2017-10-23 08:21:50 -04:00
Brad King
9ded2fad79 Merge topic 'flang-remove-boundscheck'
3aeff21d Flang: Remove unsupported fbounds-check flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1393
2017-10-23 08:21:23 -04:00
Kitware Robot
685d69ad29 CMake Nightly Date Stamp 2017-10-23 00:01:03 -04:00