Commit Graph

47352 Commits

Author SHA1 Message Date
Ryan Thornton
2ba8ac07ed GoogleTest: Fix CTest not failing if gtest_discover_tests fails
Fixes regression introduced dac201442d (GoogleTest: Optimize gtest_discover_tests, 2020-02-18).

The generated CTest include files has the form:

    if(EXISTS "foo_tests.cmake")
      include("foo_tests.cmake")
    else()
      add_test(foo_NOT_BUILT foo_test_NOT_BUILT)
    endif()

Starting in dac201442d, an empty discovery_timeout_test[1]_tests.cmake was written
as soon as GoogleTestAddTests was processed.

This meant, that even if test discovery would fail (due to a crash or timeout in the executable),
we would always produce an empty CTest file.

So instead of reporting:
   Unable to find executable: foo_NOT_BUILT
   Errors while running CTest

We instead get:
   No tests were found!!!

To fix the problem, we WRITE the file on the first call to flush_script,
thus creating the file once we know we have valid output
and the call to gtest_discover_tests hasn't failed.

After creating the file, we then set the mode to APPEND
and append to the file for every subsequent call.
2020-03-11 15:11:00 -05:00
Ryan Thornton
2c9680eec5 GoogleTest: Add missing test case for gtest_discover_tests failure
Discovery timeout test needs split out into two components:
- build
- test

Building the project should result in a failure due to the timeout
when executing gtest discovery as a post build step.

Likewise, if you ran CTest after this build failure,
we should *also* detect that the discovery_timeout_test has not been built
because no discovery_timeout_test[1]_tests.cmake has been created
due to the test discovery failure (caused by the timeout).
2020-03-11 15:10:23 -05:00
Raul Tambre
f75bea1071 CUDA: Abstract language flag to compiler modules
Separate this detail out into compiler-specific modules.
Required for Clang support, as it uses slightly different language flags.
2020-03-11 21:30:09 +02:00
Julien Marrec
e672db628b FindRuby: Rename variables to match case of module name
Use recommended case for variable names, i.e. matching name of the
module as passed to `find_package`.

For backwards compatibility, the upper case versions of both input and
output variables are used and defined when appropriate.  Skip this for
the _FOUND variable because FPHSA already does it.

This follows the approach from commit a7b09e7f43 (FindProtobuf: Rename
variables to match case of module name, 2016-03-01, v3.6.0-rc1~273^2).

Issue: #20370
2020-03-11 13:56:10 -04:00
Betsy McPhail
7a1cce210b CTest: Fix our internal CURL_DEBUGFUNCTION to conform to CURL docs
The curl debug callback function must return ``0``.

Fixes: #20449
2020-03-11 13:36:58 -04:00
Bo Anderson
1044776472 FindPython: Convert env CMAKE_FRAMEWORK_PATH to CMake path 2020-03-11 13:35:33 -04:00
Bo Anderson
c841d43d70 CMakeFindFrameworks: Search CMAKE_FRAMEWORK_PATH 2020-03-11 12:54:26 -04:00
Marc Chevrier
f964739ead cmCTestRunTest: modernize memory management 2020-03-11 17:46:11 +01:00
Vitaly Stakhovsky
36a5b3d1d1 cmMakefile::AddCacheDefinition: Add overload that accepts std::string value 2020-03-11 09:40:43 -04:00
Brad King
c7c6e103d1 Merge topic 'loops-improve'
cbbca9ee2a Convert more loops to range-based for-loops
9296cd0551 GHS: Name range-based for-loop variable types explicitly
db17de2438 GHS: Use cm::erase in place of loop

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4446
2020-03-11 09:27:24 -04:00
Brad King
38072787d5 Merge topic 'std-string-cleanup'
a6cd48ac41 Source: use std::string overloads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4453
2020-03-11 09:26:31 -04:00
Brad King
dd45b7b429 Merge topic 'FindCUDAToolkit-reduce-verbosity' into release-3.17
a7cf574417 CUDAToolkit: Mark find queries as advanced variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4455
2020-03-11 08:56:40 -04:00
Brad King
e3571773ce Merge branch 'release-3.17' 2020-03-11 08:56:40 -04:00
Brad King
c22c17eff0 Merge topic 'FindCUDAToolkit-reduce-verbosity'
a7cf574417 CUDAToolkit: Mark find queries as advanced variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4455
2020-03-11 08:56:40 -04:00
Saleem Abdulrasool
f481b3a947 Swift: repair RPATH handling for macOS
The configuration previously handled Linux properly but did not function
on macOS as `ld64` does not support `:` delimited paths.  Account for
that by setting it to the empty string which will use multiple
invocations of the `-Xlinker -rpath -Xlinker ...` pattern to compute the
correct RPATH.
2020-03-11 08:45:47 -04:00
Kitware Robot
86580c2b92 CMake Nightly Date Stamp 2020-03-11 00:01:10 -04:00
Vitaly Stakhovsky
cbbca9ee2a Convert more loops to range-based for-loops 2020-03-10 14:25:56 -04:00
Vitaly Stakhovsky
9296cd0551 GHS: Name range-based for-loop variable types explicitly
In general we avoid using `auto` except in cases of hard-to-name types
like iterators.
2020-03-10 14:25:53 -04:00
Vitaly Stakhovsky
db17de2438 GHS: Use cm::erase in place of loop 2020-03-10 14:25:36 -04:00
Robert Maynard
a7cf574417 CUDAToolkit: Mark find queries as advanced variables
Fixes #20435
2020-03-10 13:27:16 -04:00
Vitaly Stakhovsky
a6cd48ac41 Source: use std::string overloads 2020-03-10 10:55:09 -04:00
Brad King
c06e035601 Merge topic 'cuda_toolkit_dirs'
0703e5fb6f CUDA: Perform CUDA toolkit include directory detection only on nvcc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4443
2020-03-10 10:30:49 -04:00
Brad King
637948ca3a Merge branch 'release-3.17' 2020-03-10 10:30:08 -04:00
Brad King
7b7170a584 Merge topic 'release-notes-minor-cleanups' into release-3.17
d5e6fedd7b Help: Cleanup minor typos and grammar in 3.17 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4449
2020-03-10 10:30:07 -04:00
Brad King
0290ba83ad Merge topic 'release-notes-minor-cleanups'
d5e6fedd7b Help: Cleanup minor typos and grammar in 3.17 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4449
2020-03-10 10:30:07 -04:00
Brad King
5428fa025d Merge branch 'release-3.17' 2020-03-10 10:29:15 -04:00
Brad King
c35af2583a Merge topic 'doc-3.17-relnotes'
6b925d0536 Help: Fix 3.17 release notes for Xcode scheme settings
e0409b8bca Help: Fix toctree order of Xcode scheme variable and property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4447
2020-03-10 10:29:15 -04:00
Brad King
51c8ac8e89 Merge topic 'doc-3.17-relnotes' into release-3.17
6b925d0536 Help: Fix 3.17 release notes for Xcode scheme settings
e0409b8bca Help: Fix toctree order of Xcode scheme variable and property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4447
2020-03-10 10:29:14 -04:00
Kyle Edwards
e49a21cff0 Merge branch 'release-3.17' 2020-03-10 10:16:17 -04:00
Kyle Edwards
2427bbf01c Merge topic 'swift-ninja-multiconfig' into release-3.17
65b3848de0 Swift: support Ninja Multi-Config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4440
2020-03-10 10:16:17 -04:00
Kyle Edwards
228232d454 Merge topic 'swift-ninja-multiconfig'
87819db28d Merge branch 'backport-swift-ninja-multiconfig' into swift-ninja-multiconfig
65b3848de0 Swift: support Ninja Multi-Config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4440
2020-03-10 10:16:17 -04:00
Brad King
6b925d0536 Help: Fix 3.17 release notes for Xcode scheme settings
In commit 730a53ef1d (Help: Organize and revise 3.17 release notes,
2020-02-04, v3.17.0-rc1~21^2) we accidentally combined the release notes
for `CMAKE_XCODE_SCHEME_ENVIRONMENT` and `XCODE_SCHEME_WORKING_DIRECTORY`.
Split them up again.  Also mention `CMAKE_XCODE_SCHEME_WORKING_DIRECTORY`.

Fixes: #20439
2020-03-10 08:51:53 -04:00
Brad King
e0409b8bca Help: Fix toctree order of Xcode scheme variable and property
In commit 92c4c852db (Xcode: Add custom working directory property,
2019-11-18, v3.17.0-rc1~400^2) the toctree links to the new properties
were not added in sorted order.  Move them.

Issue: #20439
2020-03-10 08:51:53 -04:00
Brad King
268909518f Merge topic 'file-CONFIGURE'
a6fee09484 file: Add CONFIGURE subcommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4436
2020-03-10 08:27:21 -04:00
Brad King
16ad4e5ce6 Merge topic 'modernize-memory-management'
44867a8c01 Modernize memory management

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4444
2020-03-10 08:26:27 -04:00
Brad King
30e67e752c Merge topic 'std-string-genex'
b0dc52704b cmGeneratorExpression: remove const char* overloads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4445
2020-03-10 08:25:18 -04:00
Craig Scott
d5e6fedd7b Help: Cleanup minor typos and grammar in 3.17 release notes 2020-03-10 23:24:59 +11:00
Brad King
1ba7225480 Merge topic 'TI-C'
5a0fc68312 TI: Fix C toolchain command-lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4422
2020-03-10 08:24:13 -04:00
Brad King
d3d0358009 Merge branch 'release-3.17' 2020-03-10 08:22:58 -04:00
Brad King
058972b16f Merge topic 'cuda_warning'
6ebc6cec41 cm_cxx_features: Filter out CUDA installation warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4437
2020-03-10 08:22:58 -04:00
Brad King
cb84575b0d Merge topic 'cuda_warning' into release-3.17
6ebc6cec41 cm_cxx_features: Filter out CUDA installation warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4437
2020-03-10 08:22:57 -04:00
Brad King
6a7c614a7e Merge branch 'release-3.17' 2020-03-10 08:22:00 -04:00
Brad King
d11a5d8f2b Merge topic 'invalid_alias' into release-3.17
a54d96b722 cmAlgorithms: Fix -Wnon-c-typedef-for-linkage warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4438
2020-03-10 08:22:00 -04:00
Brad King
e154c70e48 Merge topic 'invalid_alias'
a54d96b722 cmAlgorithms: Fix -Wnon-c-typedef-for-linkage warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4438
2020-03-10 08:22:00 -04:00
Kitware Robot
df4acef151 CMake Nightly Date Stamp 2020-03-10 00:01:10 -04:00
Oliver Blasius
5a0fc68312 TI: Fix C toolchain command-lines
Fix `armar` arguments.  Fix the linker `--map_file=` argument.
Enable response files.
2020-03-09 12:02:20 -04:00
Leander Beernaert
a6fee09484 file: Add CONFIGURE subcommand
Extend the `file()` command with a new `CONFIGURE` subcommand that
behaves the same as `string(CONFIGURE)` except that it writes the
resulting output immediately to a file.

Fixes: #20388
2020-03-09 11:54:02 -04:00
Raul Tambre
a54d96b722 cmAlgorithms: Fix -Wnon-c-typedef-for-linkage warnings
In commit bf1e73305a (cmAlgorithms: Refactor cmRemoveDuplicates,
2019-03-03, v3.15.0-rc1~414^2) we added `union X = struct {}`.
C++ had a rule change whereby only C-compatible unnamed typedefs are
allowed. Clang 11 warns about this by default.  See
https://reviews.llvm.org/D74103.  The aliases don't seem to be
necessary, so simply define as structs.
2020-03-09 09:21:25 -04:00
Raul Tambre
6ebc6cec41 cm_cxx_features: Filter out CUDA installation warnings
Clang always outputs these if it doesn't recognize the installed CUDA version.
They don't affect compiling C++.

Fixes #20434.
2020-03-09 09:17:41 -04:00
Brad King
efa30023b4 Merge topic 'required_find_commands'
dc00809596 find_*: Add support for REQUIRED keyword
cc070e66cd cmFindBase: Use in-class member initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4435
2020-03-09 09:15:38 -04:00