Commit Graph

7475 Commits

Author SHA1 Message Date
Craig Scott 800e29ab8f Merge topic 'fetchcontent-externalproject-empty-args'
8dca6bd04b FetchContent: Preserve empty string arguments
cbf2daeed0 ExternalProject: Preserve empty string arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4729
2020-05-25 17:20:48 -04:00
Brad King 3ed8b663a9 Merge topic 'gitlab-ci-regular-builders'
b566f0b308 gitlab-ci: add windows builder
5b564c371e gitlab-ci: add Windows infrastructure
809f9a9916 gitlab: add powershell scripts for utilities
02c56b71a1 gitlab-ci: add a macos builder
a1b1fc611b gitlab-ci: add Linux makefiles and ninja builders
3e1a1ba92d ci: add dependencies for the test suite to the Fedora image
d5438f783a ci: add make to the CI image
0ed7e424ab gitlab-ci: use the cmake_build_unix anchor
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4723
2020-05-25 11:10:06 -04:00
Brad King a354b7f21e Merge topic 'CheckLinkerFlag-module'
af96c0f4fa CheckLinkerFlag: Add module to check validity of linker flags
3c4cc77d55 Tests: Extend Fortran compiler information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4777
2020-05-25 10:59:01 -04:00
Marc Chevrier af96c0f4fa CheckLinkerFlag: Add module to check validity of linker flags
Fixes: #15934
2020-05-25 10:57:14 -04:00
Marc Chevrier 3c4cc77d55 Tests: Extend Fortran compiler information
Fill variable `CMake_Fortran_COMPILER_ID`.
2020-05-25 10:57:06 -04:00
Brad King b82bdbf44a Merge topic 'ep-git-update-strategy'
0aea435aa1 ExternalProject: Provide choice of git update strategies
ea410414c5 ExternalProject: factor out gitupdate step to separate file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4239
2020-05-25 10:53:26 -04:00
Brad King 15b9b41d72 Merge topic 'fileApiAddPrecompileHeadersBacktrace'
9f6d40ee23 fileapi: Extend codemodel targets with PRECOMPILE_HEADERS
b698764a31 Tests: Add a PCH example to RunCMake.FileAPI codemodel-v2
b3812c0e54 Tests: Fix indentation in RunCMake.FileAPI cxx_exe.json
9c48804b69 PCH: Fix source group of per-architecture PCH headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4684
2020-05-25 10:40:56 -04:00
Brad King 99ab9212f0 Merge topic 'ninja-multi-install'
dddb4f02f7 Ninja Multi-Config: Make "install" targets depend on default configs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4778
2020-05-25 10:33:26 -04:00
Craig Scott 8dca6bd04b FetchContent: Preserve empty string arguments
Fixes: #20579
2020-05-23 23:42:43 +10:00
Craig Scott cbf2daeed0 ExternalProject: Preserve empty string arguments 2020-05-23 23:41:53 +10:00
Craig Scott 0aea435aa1 ExternalProject: Provide choice of git update strategies
Fixes: #16528

Co-Authored-By: Michael Wake <macwake@gmail.com>
2020-05-23 22:27:38 +10:00
Kyle Edwards dddb4f02f7 Ninja Multi-Config: Make "install" targets depend on default configs
And add an "install:all" target.

Fixes: #20713
2020-05-22 13:15:50 -04:00
Ben Boeckel 165e56950a Tests/CPackWiXGenerator: support suppressing verification
Verification requires access to an active Windows session which may not
be the case in all testing environments.
2020-05-22 11:34:14 -04:00
Ben Boeckel 28f2ad9419 Tests/CPackWiXGenerator; support non-interactive sessions 2020-05-22 11:34:14 -04:00
Ben Boeckel 9d5e32b79b Tests/RunCMake/export: handle collapsed newlines
When the build path is long with a space near the line length, a newline
is lost.
2020-05-22 11:34:14 -04:00
Justin Goshi 9f6d40ee23 fileapi: Extend codemodel targets with PRECOMPILE_HEADERS 2020-05-22 11:26:55 -04:00
Justin Goshi b698764a31 Tests: Add a PCH example to RunCMake.FileAPI codemodel-v2 2020-05-22 11:23:33 -04:00
Brad King 62816ff88c Merge topic 'fortran-preprocess-property'
3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
66c4e87282 Ninja: Add helper functions to generate Fortran build
5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule
b0a6161190 Fortran: Add Fortran_PREPROCESS property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4659
2020-05-22 10:35:10 -04:00
Craig Scott 1b0049680b Merge topic 'cmake_language-rename-from-cmake_command'
94c1e4fdb3 cmake_language: Rename command from cmake_command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4774
2020-05-22 10:25:29 -04:00
Brad King b3812c0e54 Tests: Fix indentation in RunCMake.FileAPI cxx_exe.json 2020-05-22 10:07:30 -04:00
Brad King a7b3102e00 Merge topic 'support_conda_env'
50879ce412 Conda: Add CONDA_PREFIX as an acceptable system prefix path
cd9c3c000f Tests: Update QtAutogen codeeditor test only include headers needed
d806bd2e8c Tests: Update test suite to run in an Anaconda environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4773
2020-05-22 08:12:24 -04:00
Brad King b54280beb7 Merge topic 'cuda-default-runtime'
d8eee80e30 Merge branch 'backport-cuda-default-runtime' into cuda-default-runtime
e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile
a4ea293153 Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4762
2020-05-22 06:55:37 -04:00
Brad King d8eee80e30 Merge branch 'backport-cuda-default-runtime' into cuda-default-runtime 2020-05-22 06:50:19 -04:00
Brad King 94c1e4fdb3 cmake_language: Rename command from cmake_command
Also rename the `INVOKE` signature to `CALL`.

Fixes: #20732
2020-05-21 13:36:52 -04:00
Peter Hill 3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
If `Fortran_PREPROCESS` is explicitly turned off for a source file then
we know it does not need to be preprocessed.  Teach the Ninja generator
to skip preprocessing in this case.  Otherwise we still must preprocess
just in case.

Fixes: #18870
2020-05-21 11:46:32 -04:00
Peter Hill b0a6161190 Fortran: Add Fortran_PREPROCESS property
Issue: #18870
2020-05-21 11:44:14 -04:00
Brad King 3c5d52579b Merge topic 'cmake_command_invoke_expand_function_name'
aa55587094 cmake_command: Expand INVOKE function name argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4750
2020-05-21 11:38:32 -04:00
Robert Maynard cd9c3c000f Tests: Update QtAutogen codeeditor test only include headers needed 2020-05-21 11:32:01 -04:00
Robert Maynard d806bd2e8c Tests: Update test suite to run in an Anaconda environment 2020-05-21 11:31:23 -04:00
Robert Maynard e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime
selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library
selection flags by default.

To maintain backwards compatibility the default CUDA runtime
library needs to be computed based on what libraries are found
on the initial compiler invocation. For example a toolchain
could establish initial flags that have all CUDA compilations
using the runtime version, and if we don't detect this we will
try to link to both the static and shared runtime.

Co-Author: Brad King <brad.king@kitware.com>
Fixes: #20708
2020-05-21 11:15:03 -04:00
Brad King 345d707cf0 Merge topic 'cuda-test-nvcc-restore'
4c7cc264af Tests: Restore NVCC-specific CUDA tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4768
2020-05-20 10:54:05 -04:00
Brad King 4c7cc264af Tests: Restore NVCC-specific CUDA tests
In commit a653ca9504 (Tests: Update CUDA tests to work with Clang,
2020-03-27) some tests were conditioned using `CMAKE_CUDA_COMPILER_ID`.
That is not defined when configuring CMake itself, so it accidentally
turned off NVCC-specific CUDA tests altogether.  Convert the conditions
to check `CMake_TEST_CUDA` for `Clang` instead.  That option is added
explicitly to builds where we want the tests to run, so we can set it to
a value indicating the CUDA compiler vendor.

In commit a653ca9504 (Tests: Update CUDA tests to work with Clang,
2020-03-27) the NVCC-specific `CudaOnly.GPUDebugFlag` test was
accidentally broken by removing a space when appending `-G` to the CUDA
flags.  This was covered by the test not running.  Restore the space.

Fixes: #20727
2020-05-20 10:48:20 -04:00
Brad King 00d6e41a07 Merge topic 'ctest-log-environment'
a1612af749 CTest: Log environment variables as a test measurement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4760
2020-05-20 09:11:03 -04:00
Cristian Adam aa55587094 cmake_command: Expand INVOKE function name argument
Fixes: #20707
2020-05-19 19:14:10 +02:00
Kyle Edwards a1612af749 CTest: Log environment variables as a test measurement 2020-05-19 10:26:57 -04:00
Brad King 2f3a356ea8 Merge topic 'src-named-for-config'
70c85c1d6f Tests: Add case for source files named with CONFIG genex
3b547e2e4b VS: Simplify logic adding source file C/C++ language flag to MSVC
27ead9d4b7 VS: Compute managed type from an existing configuration
1222327c89 VS: Write custom commands for sources from all configurations
65fe58a4b4 cmVisualStudio10TargetGenerator: Adopt Windows Store and Phone infrastructure
3fa3b7a402 cmGeneratorTarget: Remove default config from Get* methods
d6a88d2158 cmTarget: Replace "perConfig" constructor boolean with enum

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4761
2020-05-19 09:56:48 -04:00
Brad King 80e93984c7 Merge topic 'add_test-special-chars-in-name'
f84af8e270 add_test: Allow special characters in test name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4754
2020-05-19 09:48:38 -04:00
Brad King 70c85c1d6f Tests: Add case for source files named with CONFIG genex
This is now expected to work on all generators where the test runs.
Recent ancestors of this commit fix the Visual Studio generator.

Fixes: #20648
2020-05-18 15:34:18 -04:00
Brad King d7e82a11d5 Merge topic 'fetchcontent-SOURCE_SUBDIR'
592085b94b FetchContent: Add support for SOURCE_SUBDIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4757
2020-05-18 12:31:54 -04:00
Brad King b246dee7db Merge topic 'cuda-clang'
a653ca9504 Tests: Update CUDA tests to work with Clang
5df21adf46 CUDA: Add support for Clang compiler
dc2eae1f91 FindCUDAToolkit: Factor out discovery code into a separate file
70be10cbf4 CUDA: Remove toolkit include dirs from implicit include dirs only with NVIDIA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Artem Belevich <tra@google.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Acked-by: friendnick <ikoval67@gmail.com>
Acked-by: Patrik Huber <patrikhuber@gmail.com>
Merge-request: !4442
2020-05-18 12:29:44 -04:00
Brad King ca699e9d69 Merge topic 'fix-CheckTargetsForMissingSources'
25995b2b30 cmGlobalGenerator: Fix CheckTargetsForMissingSources after refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4747
2020-05-18 12:20:50 -04:00
Deniz Bahadir f84af8e270 add_test: Allow special characters in test name
Fixes: #19391
2020-05-17 10:53:14 +02:00
Craig Scott 592085b94b FetchContent: Add support for SOURCE_SUBDIR
Fixes: #19875
2020-05-16 17:01:10 +10:00
Craig Scott cb8f7e3aad FindDoxygen: Prevent tests from interfering with each other
When doing something like ctest -j8, the FindDoxygen.SimpleTest
test case would execute multiple doxygen sub-tests that then try
to create/write to the same output directory.
2020-05-16 12:20:36 +10:00
Raul Tambre a653ca9504 Tests: Update CUDA tests to work with Clang 2020-05-15 18:12:39 +03:00
Brad King eb93b50be9 Merge topic 'source_file_scopes'
3d4b70ea64 set_source_files_properties: Allow specification of directory scope

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4661
2020-05-15 09:58:03 -04:00
Brad King 25995b2b30 cmGlobalGenerator: Fix CheckTargetsForMissingSources after refactoring
Refactoring in commit 01b2d6ab74 (Modernize: Use ranged for-loops when
possible, 2019-02-07, v3.15.0-rc1~575^2) accidentally changed a loop
condition in this method from "keep iterating if srcs.empty()" to
"stop iterating if srcs.empty()".  Switch it back.

The bug could only manifest in very subtle conditions in a multi-config
generator.  Add one such case to the test suite.

Fixes: #20706
2020-05-15 05:39:25 -04:00
Alexandru Croitor 3d4b70ea64 set_source_files_properties: Allow specification of directory scope
Both set_source_files_properties() and set_property(SOURCE) now accept
two new optional arguments: DIRECTORY and TARGET_DIRECTORY.

The DIRECTORY option takes a list of relative or absolute paths
pointing to processed source directories (add_subdirectory was
already called on them).

These paths specify directory scopes where the source file properties
will be set. Previously the scope was always the currently processed
source directory.

Similarly TARGET_DIRECTORY takes a list of targets, whose source
directories will be used as the list of scopes where to set the
source file properties.

get_property() and get_source_file_property() also get the same
new arguments, except only one value can be specified instead
of a list.

Fixes: #20128
2020-05-14 16:31:22 +02:00
Brad King ae9614a22d Merge topic 'tests-Wstrict-prototypes'
4150a18910 Tests: Fix -Wstrict-prototypes warnings in some C sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4744
2020-05-14 08:08:45 -04:00
Brad King 73be779091 Merge topic 'cmake_command_preserve_args'
549599bf32 cmake_command: Preserve arguments to INVOKE function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4741
2020-05-14 07:54:11 -04:00