Commit Graph

2747 Commits

Author SHA1 Message Date
Brad King 0a74d7c2b8 Merge branch 'backport-ctest-repeat-notrun' into ctest-repeat-notrun 2020-05-27 06:45:39 -04:00
Robert Maynard bbb62dcc72 CTest: Make sure NOT_RUN tests show up in the failed test log
Issue: #20543
2020-05-27 06:43:01 -04:00
Robert Maynard c503251997 Tests: Add coverage of ctest_test RETURN_VALUE and REPEAT 2020-05-27 06:39:17 -04:00
Ben Boeckel deb5194a32 tests: avoid a warning for ctresalloc
When testing an installed CMake, this executable does not exist.

Also remove the "or build" because we are expecting it to be built if
the target exists (and is a build failure if it fails there).
2020-05-26 12:50:16 -04:00
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
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
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 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
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 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
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 d806bd2e8c Tests: Update test suite to run in an Anaconda environment 2020-05-21 11:31:23 -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 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 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
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
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
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
Brad King b07bc05961 Merge topic 'fix-cache-args-file-to-dep-list' into release-3.17
0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4710
2020-05-13 12:12:28 -04:00
Brad King 0d8aec412a Merge topic 'fix-cache-args-file-to-dep-list'
0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4710
2020-05-13 12:12:28 -04:00
Brad King 4150a18910 Tests: Fix -Wstrict-prototypes warnings in some C sources
Some RunCMake tests fail with this warning due to extra stderr content:

    warning: this old-style function definition is not preceded by a prototype

Convert `foo()` to `foo(void)` in `.c` sources of affected tests.
2020-05-13 08:11:59 -04:00
Cristian Adam 549599bf32 cmake_command: Preserve arguments to INVOKE function
Fixes: #20630
2020-05-12 22:25:29 +02:00
Ben Boeckel 0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller
This is needed so that the caller can add a dependency on the cache
file.

Fixes: #20668
2020-05-12 10:34:23 -04:00
Brad King fe19df49d4 Initialize CMAKE_EXPORT_COMPILE_COMMANDS only if not set already
Also de-duplicate its initialization code.

Fixes: #16588
2020-05-12 08:08:20 -04:00
Brad King 44ae68d976 Merge topic 'vs-pch-compile-opts' into release-3.17
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
2020-05-12 06:53:41 -04:00
Brad King eb2a554b12 Merge topic 'vs-pch-compile-opts'
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
2020-05-12 06:53:41 -04:00
Brad King 6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS
If a source file gets per-source flags from both PCH and custom
`COMPILE_OPTIONS`, combine them correctly.

Fixes: #20694, #20456
2020-05-11 11:58:41 -04:00
Brad King cee7eb8b3a Merge topic 'unity_explicit_groups'
9f4eb352fe Unity Builds: Support explicit specification of sources to groups
b00585adcc Unity: Refactor implementation to make it easier to extend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4716
2020-05-11 10:08:12 -04:00
Brad King 171bf5fa92 Merge topic 'third-parties-layout'
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
75e87e3db4 bootstrap: update list of problematic files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4705
2020-05-08 08:18:17 -04:00
Robert Maynard 9f4eb352fe Unity Builds: Support explicit specification of sources to groups
Instead of having CMake determine which files should go into each
unity file, the user can now use explicitly state the mapping.
2020-05-07 11:13:34 -04:00
Craig Scott b743ffbfa2 Merge topic 'script-mode-and-arbitrary-args'
e4f1b301fe cmake: Allow arbitrary args passed to CMake script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4707
2020-05-07 09:09:52 -04:00
Marc Chevrier 2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00