Commit Graph

1104 Commits

Author SHA1 Message Date
Brad King
fa4ac78f4a Tests/FortranModules: Simplify check for submodules support 2025-03-12 16:37:54 -04:00
Brad King
2c28321adb Tests: Combine conditions for BundleUtilities test 2025-03-12 16:37:54 -04:00
Marc Chevrier
aed9dffdc9 FindPython: migrate tests to RunCMake framework 2025-02-28 17:55:24 +01:00
Brad King
3e64c6a56e Merge topic 'msvc-runtime-checks'
2b2344b412 MSVC: Add abstraction for runtime checks
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example
2f8e643d9d CMP0141: Fix documentation copied from CMP0091

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10214
2025-01-30 08:48:01 -05:00
AJIOB
2b2344b412 MSVC: Add abstraction for runtime checks
Replace our hard-coded default for `/RTC1` with a first-class
abstraction to select runtime checks from an enumeration of logical
names.  Add a `MSVC_RUNTIME_CHECKS` target property and corresponding
`CMAKE_MSVC_RUNTIME_CHECKS` variable.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose
runtime checks under the old behavior.  Add policy CMP0184 to
provide compatibility.

Fixes: #26614
2025-01-29 13:07:41 -05:00
Peter Kokot
4e6a13f211 Use lower case style for commands
Where possible this syncs the CS for command names:

- check_c_source_compiles()
- check_cxx_compiler_flag()
- check_cxx_source_compiles()
- check_cxx_symbol_exists()
- check_include_file_cxx()
- check_include_file()
- check_include_files()
- check_library_exists()
- check_source_compiles()
- check_struct_has_member()
- check_symbol_exists()
- check_type_size()
- cmake_dependent_option()
- cmake_parse_arguments()
- feature_summary()
- file()
- find_package_handle_standard_args()
- if(), endif...
- install(FILES)
- list()
- message()
- pkg_check_modules()
- select_library_configurations()
- set_package_info()
- test_big_endian()
2025-01-28 13:51:46 -05:00
Brad King
dc0c6734d3 CMP0031: Remove support for OLD load_command command 2025-01-19 09:41:00 -05:00
Brad King
136528aa1b CMP0002: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Matthew Woehlke
91c31ada23 find_package: Actually find .cps files
Add a helper class to read CPS files. Use this to teach find_package how
to consider and accept .cps files in its search. (Note that no version
testing is performed at this time.) Add a simple test that we can find a
package from a .cps file and correctly extract the version information.

Note that this doesn't actually import anything from CPS yet.
2024-12-13 08:58:24 -05:00
Matthew Woehlke
521190a38d Tests: Rename find_package test
We are working on adding CPS support to find_package, which will
obviously require tests (ideally, and especially in the long term, a
non-trivial number thereof). While it would be possibly to lump these
into the already rather lengthy FindPackageTest, it seems likely they
can be kept separate. Therefore, rename FindPackageTest to
FindPackageCMakeTest so that the name FindPackageCpsTest will be
available.
2024-11-23 16:41:44 -05:00
Brad King
c7d11a77e4 ctest: Remove outdated optimization of tests running ctest itself
In commit 2c2291bbe0 (ENH: add new feature to ctest so that it can
cmake, build and run a test executable, 2004-01-07, v2.4.0~3483) ctest
was taught to recognize tests that run ctest itself and run them
internally instead of spawning a new process.  This optimization was
removed by commit b9daa192af (ENH: Refactored CTest test execution code
into an object, 2009-08-19, v2.8.0~276) `cmCTestRunTest` replaced
`cmCTestTestHandler::ProcessOneTest`, which was eventually removed by
commit 5a5cc52230 (Fixed conversion warning on 64 bit machines,
2009-08-31, v2.8.0~241).  Since then the optimization was only left in
`--build-and-test` mode, likely by accident, where it makes little
difference.  Remove it to simplify the code.

Also drop the `--force-new-ctest-process` option, originally added by
commit 9255e40d81 (ENH: Add a way to force ctest to be a new process,
2004-05-10, v2.4.0~3101), since it no longer does anything.
2024-10-16 14:13:46 -04:00
Daniel Pfeifer
267b42bccc CTest: Remove declarative scripting mode 2024-10-09 22:30:58 +02:00
Julien Marrec
5b8fa21512 Tests: Add a test covering the CPack IFW Generator 2024-09-11 08:44:09 -04:00
Brad King
241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Brad King
7c1b671c3a Tests: Disable VSXaml test pending update to newer VS versions
It works only with the deprecated Visual Studio 12 2013 generator,
which is about to be removed.

Issue: #26248
2024-08-28 14:13:05 -04:00
Brad King
9042aa1af5 Tests: Remove WinCE tests
These work only with the deprecated Visual Studio 12 2013 generator,
which is about to be removed.
2024-08-28 14:13:05 -04:00
Brad King
810e33f67a Tests: Simplify tests for Visual Studio generators
Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator,
2024-05-06, v3.30.0-rc1~134^2), some tests do not need to be
version-dependent.
2024-08-28 14:12:54 -04:00
Brad King
a991a5019b Tests: Isolate test suite from user-wide configuration 2024-08-22 09:59:35 -04:00
Brad King
320b81847d Tests: Remove unused cvs anonymous access credentials 2024-08-22 09:59:22 -04:00
Brad King
fd72e2b857 Merge topic 'test-xcode-command-line-tools'
369052b5d8 Tests: Restore suppression of xcodebuild error with Xcode Command-Line Tools

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9696
2024-08-01 09:58:10 -04:00
Brad King
369052b5d8 Tests: Restore suppression of xcodebuild error with Xcode Command-Line Tools
In commit 40fa2c1c90 (Tests: Cleanup CMake_TEST_XCODE_VERSION code,
2024-04-29, v3.30.0-rc1~183^2) we accidentally stopped capturing the
stderr from `xcodebuild`, causing it to appear in cmake's output.
The error is incidental and tolerated, so do not let the user see it.
2024-07-31 15:43:04 -04:00
Brad King
8f6092fc20 Tests: Move ctest --print-labels case into RunCMake.CTestCommandLine 2024-07-24 10:07:35 -04:00
Christoph Junghans
98d0f918ba LFortran: Add support for this compiler
Fixes: #25419
2024-07-22 16:50:33 -04:00
Aditya Vidyadhar Kamath
d27fe9dfba AIX: Add option to archive shared libraries
Add option `CMAKE_AIX_SHARED_LIBRARY_ARCHIVE`.

There will no versions for the shared objects when this option is used.

Closes: #26033
2024-07-17 11:52:09 -04:00
Marc Chevrier
4178ab928f FindPython: Fix spelling error 2024-06-04 16:12:55 +02:00
Deniz Bahadir
27d161eac3 CPackDeb: dpkg-shlibdeps shall consider dependency components, too
When using `dpkg-shlibdeps` to automatically determine package
dependencies it considers the RUNPATH/RPATH of executables in order to
find all required shared libraries of such executables.

If the RUNPATH/RPATH contains a verbatim `$ORIGIN` (respective
`${ORIGIN}`), it will now be substituted by the packaging-paths of other
components that are marked as dependency and those paths will then be
used as additional search directories for `dpkg-shlibdeps`.

Associated tests were added as well.

Fixes: #21838
2024-05-30 16:13:46 +02:00
Brad King
c299fd8266 Tests/CompileFeatures: Cover hip_std_## meta-features 2024-05-28 14:36:50 -04:00
Dave Abrahams
190cdce7d5 Tests: Improve documentation of ADD_TEST_MACRO 2024-05-23 08:51:52 -04:00
Brad King
b9ee79b8a1 GenEx: Add support for custom transitive compile properties
Teach the `$<TARGET_PROPERTY:...>` generator expression to check for a
new `TRANSITIVE_COMPILE_PROPERTIES` property in the target's link
closure to enable transitive evaluation of named properties through
the link closure, excluding entries guarded by `$<LINK_ONLY:...>`.

Issue: #20416
2024-05-21 09:22:51 -04:00
Brad King
b9ea0d9f12 ci: Enable CPack NuGet generator tests in a nightly job on Windows
Drop the environment-based heuristic.
2024-05-14 15:02:41 -04:00
Brad King
03c31b0395 Drop Visual Studio 9 2008 generator
This generator has been deprecated since CMake 3.27.  Remove it.
2024-05-08 10:37:34 -04:00
Juan Ramos
40fa2c1c90 Tests: Cleanup CMake_TEST_XCODE_VERSION code
- Consolidate calls to xcodebuild -version
- Handles cases where CMake_TEST_XCODE_VERSION is 0 to allow
running tests with only	command-line tools.
2024-04-29 14:46:08 -07:00
Juan Ramos
abd1b02dfa Tests/Architecture: Have test support Xcode 10+ 2024-04-29 14:46:05 -07:00
Brad King
fb0990ef04 Tests/CompileFeatures: Cover cuda_std_## meta-features 2024-04-19 08:39:15 -04:00
Brad King
1f40604421 Tests/CompileFeatures: Cover CUDA default standard level 2024-04-18 08:30:38 -04:00
Brad King
f494bbaf8f Merge topic 'FindBacktrace-imported-library'
9433755e5d FindBacktrace: Add imported library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9406
2024-04-16 08:51:59 -04:00
David Faure
9433755e5d FindBacktrace: Add imported library
This is to avoid (a future version of) Qt from having to wrap
FindBacktrace like [1].

[1] https://code.qt.io/cgit/qt/qtbase.git/tree/cmake/FindWrapBacktrace.cmake
2024-04-15 13:27:23 -04:00
Brad King
31acc90abe ci: Record expected C and CXX language standard support
Explicitly enable standard levels in the `CompileFeatures` test that are
expected to work in each job regardless of whether compiler inspection
detects support.
2024-04-05 07:38:58 -04:00
Brad King
83ceca6678 Merge topic 'ctest-resource-lock'
85745cce7a ctest: Restore enforcement of RESOURCE_LOCK test property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9394
2024-04-02 08:09:13 -04:00
Brad King
85745cce7a ctest: Restore enforcement of RESOURCE_LOCK test property
Refactoring in commit 5ff0b4ed57 (cmCTestMultiProcessHandler:
Consolidate test readiness checks, 2023-10-20, v3.29.0-rc1~378^2~4)
accidentally broke `RESOURCE_LOCK`.  Fix it and replace the previous
test with one that would have caught this.

Fixes: #25843
2024-04-01 12:22:29 -04:00
Brad King
9c472b9482 Tests: Convert CPackWiXGenerator to RunCMake.CPack_WIX 2024-03-18 15:11:49 -04:00
Brad King
b024732b19 ci: Explicitly enable CPackWiXGenerator test only in specific jobs
Drop the environment-based heuristic.
2024-03-11 12:23:18 -04:00
Brad King
89e99cca63 Merge topic 'ctest-j-default'
5de1e21659 ctest: Allow passing -j without value to choose a contextual default
bbcbcff7d9 cmCTestMultiProcessHandler: Modernize member initialization
7457b474a1 Tests: Remove unnecessary parallel suppression from CTestCoverageCollectGCOV
ae69801d96 Tests: Convert CTestTestSkipReturnCode to RunCMake.ctest_test case
30dda49416 Tests: Convert CTestTestSerialOrder to RunCMake.ctest_test case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9315
2024-03-11 10:18:50 -04:00
Brad King
7457b474a1 Tests: Remove unnecessary parallel suppression from CTestCoverageCollectGCOV
This hasn't been necessary since commit ab7eda2591 (Tests: Remove
unnecessary pass regex on CTestCoverageCollectGCOV, 2020-04-29,
v3.18.0-rc1~239^2~2).
2024-03-10 10:27:02 -04:00
Brad King
ae69801d96 Tests: Convert CTestTestSkipReturnCode to RunCMake.ctest_test case 2024-03-10 10:26:14 -04:00
Brad King
30dda49416 Tests: Convert CTestTestSerialOrder to RunCMake.ctest_test case 2024-03-10 10:24:50 -04:00
Vito Gamberini
7cf45c9e6a
ASM_NASM: Improve support for standalone usage
* Add tests for standalone NASM usage

* Change generic ASM_NASM executable linker to <CMAKE_LINKER>

* Use CMAKE_SYSTEM_PROCESSOR to determine output format when used
  without a C/CXX compiler
2024-03-04 13:09:58 -05:00
Brad King
8dd9554d24 Tests: Enable Fortran part of CompileOptions test on single-config generators 2024-01-31 14:51:56 -05:00
Brad King
0a5d29159e Tests: Add "Fortran" test label
With this, `ctest -L Fortran` will run only tests covering Fortran.
2024-01-31 11:27:53 -05:00
Mikko Lehtonen
77c4d2f9a2 Xcode: Fix PCH support with Swift & C++
Previously, when a mixed language target ends up with `Swift` as the
`LINKER_LANGUAGE`, the PCH file was not set for the target at all.

Fixes: #21224
2024-01-30 12:50:40 -05:00