Commit Graph

9825 Commits

Author SHA1 Message Date
Vasiliy Koyrev 9da542d5c1 string(TIMESTAMP): Add %z and %Z for adding time zone string
Fixes: #24056
2022-10-27 11:13:46 -04:00
Brad King ab88011579 Merge topic 'cmake-presets-workflow-arguments'
7ecbe324b0 cmake --workflow: add --fresh option
7d9aa0f00c cmake::Workflow: Refactor to use enum class argument
322193afcd cmake --workflow: print usage and exit on unrecognized argument
70aef29427 cmake --workflow: print usage message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7825
2022-10-27 09:43:39 -04:00
Brad King ca80e8bdf6 Merge topic 'xcode-swift-defs'
c0dd3dd2c1 Xcode: Evaluate Swift compile definitions separately

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7826
2022-10-27 09:42:03 -04:00
Brad King fa040cedad Merge topic 'ninja-intl-paths'
a12050666c Tests: Add case for ninja with non-ascii chars
02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7833
2022-10-27 09:26:36 -04:00
Brad King a12050666c Tests: Add case for ninja with non-ascii chars
Issue: #24089
2022-10-26 15:25:45 -04:00
Kyle Edwards 7ecbe324b0 cmake --workflow: add --fresh option
Fixes: #24073
2022-10-26 12:01:25 -04:00
Kyle Edwards 322193afcd cmake --workflow: print usage and exit on unrecognized argument
Issue: #24073
2022-10-26 12:00:57 -04:00
Brad King eab9ddb744 Merge topic 'try_compile-CMP0128'
90287792b6 Tests: Avoid running C++11 test on GNU < 4.7

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7821
2022-10-25 14:26:18 -04:00
Brad King c0dd3dd2c1 Xcode: Evaluate Swift compile definitions separately
Xcode has a separate setting for Swift compile definitions, so we can
compute a dedicated value for it.  Therefore we can:

* Support the COMPILE_LANGUAGE generator expression for Swift-specific
  filters.

* Avoid passing the `=value` part of definitions, which Swift does
  not support.

This revises commit 5cb625eb2f (Xcode: Pass compile definitions to
Swift, 2022-06-19, v3.25.0-rc1~493^2) and reverts commit 12c6fec6b4
(Xcode: Drop CMAKE_INTDIR= definition in Swift targets, 2022-09-30,
v3.25.0-rc1~60^2~2), as the latter is no longer needed.

Fixes: #24086
2022-10-25 14:09:28 -04:00
Brad King 765d8eda88 Merge topic 'CheckSourceCompiles-Swift'
3fc971c38b CheckSourceCompiles: For Swift executable, name source 'main.swift'
2345139ab5 CheckSourceCompiles: Add support for Swift
4451a1f54f Tests: Factor out a CMake_TEST_Swift variable for Swift test conditions
f78ad6223a Tests: Provide Apple inspection results to CMakeOnly and RunCMake tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Saleem Abdulrasool <compnerd@compnerd.org>
Merge-request: !7783
2022-10-25 10:29:36 -04:00
Evan Wilde 2345139ab5 CheckSourceCompiles: Add support for Swift
Plumb through swift `check_source_compiles` support.  Add tests to check
that valid swift sources compile and invalid sources don't.
2022-10-24 12:39:21 -04:00
Brad King 4451a1f54f Tests: Factor out a CMake_TEST_Swift variable for Swift test conditions 2022-10-24 12:37:50 -04:00
Brad King c2ec949a05 Merge topic 'set_environment_generator'
3c3bce133d cmake: Honor CMAKE_GENERATOR env var in --help output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !7808
2022-10-24 12:35:33 -04:00
Brad King 90287792b6 Tests: Avoid running C++11 test on GNU < 4.7
The test added in commit 50e90e2828 (try_compile: Honor CMP0128 setting
in test project, 2022-10-18, v3.25.0-rc2~4^2) requires that the compiler
support C++11 mode, so do not run it on GNU compilers that are too old.
2022-10-24 12:04:57 -04:00
Brad King f78ad6223a Tests: Provide Apple inspection results to CMakeOnly and RunCMake tests
Re-order logic to make `CMake_TEST_XCODE_VERSION` and friends available
to the `Tests/CMakeOnly` and `Tests/RunCMake` directories.
2022-10-21 10:38:54 -04:00
Brad King 479635bd04 Merge topic 'test-git-protocol-file'
79ce0f434e Tests: Explicitly allow usage of git file-based protocol in test cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7812
2022-10-21 10:05:19 -04:00
Brad King 32c0f964bc Merge topic 'test-git-protocol-file' into release-3.25
79ce0f434e Tests: Explicitly allow usage of git file-based protocol in test cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7812
2022-10-21 10:05:18 -04:00
Juan Ramos 3c3bce133d cmake: Honor CMAKE_GENERATOR env var in --help output 2022-10-20 19:53:14 -06:00
Brad King 79ce0f434e Tests: Explicitly allow usage of git file-based protocol in test cases
Due to CVE-2022-39253, Git 2.30.6 sets `protocol.file.allow=user` by
default.  The change has also been backported to other Git versions by
distros.  This breaks some of our test cases that use the file-based
protocol locally to simulate real workflows without requiring network
access.  In these cases the file protocol is safe, so explicitly enable
it in the tests.
2022-10-20 13:45:01 -04:00
Brad King 1cbf176b97 Merge topic 'cmake-presets-output-junit'
bea4ed5430 CTest: Add support for outputJUnitFile in presets
9270a02003 CMakePresets.json: Add outputJUnitFile to test presets schema
757786bb73 Tests: Add test for outputLogFile in CMakePresets.json
b68c3596e7 CMakePresets.json: Disallow extra properties in test output schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !7806
2022-10-19 10:04:30 -04:00
Brad King 6fa189f716 Merge topic 'cmake-presets-output-junit' into release-3.25
bea4ed5430 CTest: Add support for outputJUnitFile in presets
9270a02003 CMakePresets.json: Add outputJUnitFile to test presets schema
757786bb73 Tests: Add test for outputLogFile in CMakePresets.json
b68c3596e7 CMakePresets.json: Disallow extra properties in test output schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !7806
2022-10-19 10:04:29 -04:00
Brad King 188305800e Merge topic 'try_compile-CMP0128'
50e90e2828 try_compile: Honor CMP0128 setting in test project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7803
2022-10-19 09:57:09 -04:00
Brad King 177c56e3fa Merge topic 'try_compile-CMP0128' into release-3.25
50e90e2828 try_compile: Honor CMP0128 setting in test project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7803
2022-10-19 09:57:08 -04:00
Kyle Edwards bea4ed5430 CTest: Add support for outputJUnitFile in presets
Fixes: #22400
2022-10-18 16:52:23 -04:00
Kyle Edwards 757786bb73 Tests: Add test for outputLogFile in CMakePresets.json 2022-10-18 15:20:44 -04:00
Kyle Edwards b68c3596e7 CMakePresets.json: Disallow extra properties in test output schema
And add test for testOutputTruncation being unsupported.
2022-10-18 14:40:11 -04:00
Brad King 588c9c4145 Merge branch 'try_compile-CMP0128' into release-3.24
Merge-request: !7803
2022-10-18 14:25:52 -04:00
Brad King b3cf2da514 Merge topic 'revert_nvcc_marking_include_as_system'
d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7798
2022-10-18 13:45:57 -04:00
Brad King 599e49cf9b Merge topic 'revert_nvcc_marking_include_as_system' into release-3.25
d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7798
2022-10-18 13:45:56 -04:00
Brad King 50e90e2828 try_compile: Honor CMP0128 setting in test project
Some projects pass a raw `-std=` flag to the compiler in the
`try_compile` project.  If they do not set CMP0128 to NEW,
we should not append a `-std=` flag where we did not before
the policy was added.

Fixes: #24063
2022-10-18 13:38:00 -04:00
Robert Maynard d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"
We need to revert this change as it can disable error messages
when compiling invalid CUDA code.

This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system
include, 2022-06-27, v3.25.0-rc1~269^2).
2022-10-17 10:17:33 -04:00
Brad King c6fa5f7a70 Merge topic 'trace-try_compile'
5ba51621af try_compile: Propagate --trace through try_compile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7757
2022-10-17 10:09:43 -04:00
Brad King 37fc2176dd Merge topic 'UseSWIG-perl5-language'
989b469f1c UseSWIG: Add support of perl5 language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7794
2022-10-17 10:08:37 -04:00
Brad King c41d05215e Merge topic 'more-cpp-module-tests'
52e82dbb23 Tests/RunCMake/CXXModules: add a test with duplicate modules
e67f5d41af Tests/RunCMake/CXXModules: add a test with circular imports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7776
2022-10-17 10:06:47 -04:00
Brad King d72912cac2 Merge topic 'xcode-framework-consumption'
4aa86da827 Xcode: ensure framework with custom output directory can be consumed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !7791
2022-10-17 10:03:58 -04:00
Marc Chevrier 989b469f1c UseSWIG: Add support of perl5 language 2022-10-14 16:46:42 +02:00
Marc Chevrier 4aa86da827 Xcode: ensure framework with custom output directory can be consumed
Fixes: #24046
2022-10-14 09:13:37 -04:00
Brad King 2de1458c3c Tests: Teach CheckSourceTree test to clean up some specific known files
Some nightly builds occasionally leave some log files behind due to
local configuration.  Remove them before checking the source tree since
they are known to not be CMake bugs leaving behind source tree
modifications in the test suite.
2022-10-13 10:49:41 -04:00
Brad King c0e8bb5150 Add deprecation warnings for policies CMP0108 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.18 and below to encourage projects to port
away from setting policies to OLD.
2022-10-12 12:40:52 -04:00
Brad King 37d99bbe13 Merge topic 'flang-implicit-link-info'
0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7781
2022-10-12 09:17:49 -04:00
Brad King f3bb1c8d7f Merge topic 'flang-implicit-link-info' into release-3.25
0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7781
2022-10-12 09:17:47 -04:00
Brad King 0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran
Parse implicit link information for this compiler to support
mixed-language linking.  This was missed by commit 85749766df
(LLVMFlang: Add support for LLVM Flang, 2021-07-07, v3.24.0-rc1~86^2).
Also activate mixed-language test cases that would have caught this.

Issue: #22387
2022-10-11 15:38:48 -04:00
Ben Boeckel 52e82dbb23 Tests/RunCMake/CXXModules: add a test with duplicate modules
Not in the same executable (as that is IFNDR), but in the same project.
This tests to make sure that there's not some project-wide cache that
gets confused.
2022-10-11 12:51:33 -04:00
Ben Boeckel e67f5d41af Tests/RunCMake/CXXModules: add a test with circular imports
The build should fail. However, the error message is completely
generator-dependent as it is the build tool which (should) eventually
detect this case.
2022-10-11 12:51:32 -04:00
Matthew Woehlke 5ba51621af try_compile: Propagate --trace through try_compile
Add ability to specify another cmake instance from which to get the
trace output target. Use this during try_compile.
2022-10-11 12:10:18 -04:00
Brad King 2905210999 Merge topic 'test-RunCMake.install'
e73470991f Tests: Loosen RunCMake.install directory symlink expected output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7775
2022-10-11 09:52:33 -04:00
Brad King 4507237960 Merge topic 'verify-header-sets-iwyu'
6942234bf5 VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7762
2022-10-10 10:21:09 -04:00
Brad King 1fea40c85a Merge topic 'cuda_sanitizer_false_positives'
59fcbba65e ctest_memcheck: ignore false-positives in CUDA's compute-sanitizer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7760
2022-10-10 10:19:56 -04:00
Brad King e73470991f Tests: Loosen RunCMake.install directory symlink expected output
The case added by commit 85f01a1ec2 (file(INSTALL): Improve formatting
of symlink creation error, 2022-10-06) may print `Up-to-date:` or
`Installing:` for the file inside a symlinked directory based on
filesystem timestamp granularity.  Since that output is not what the
test intends to cover, simply accept either possibility.
2022-10-10 09:55:43 -04:00
Brad King 1912d50a70 Tests: Run CheckSourceTree test using just-built CMake
Update the change from commit 8d453ee751 (Tests: Improve CheckSourceTree
test, 2022-10-05) to drive the test script using the tested CMake
instead of the host CMake, following the convention of other tests.
2022-10-08 07:07:59 -04:00