Commit Graph

1010 Commits

Author SHA1 Message Date
Markus Ferrell 6c77ccec51 Tutorial: Move step 8 to step 5. Shift steps 5-7 to 6-8. 2022-07-19 15:32:42 -04:00
Niyas Sait 190e3b93cd Tests: Exclude win/arm64 tests with CMAKE_VS_PLATFORM_NAME 2022-07-05 20:12:09 +01:00
makise-homura 22a2b9c49f Tests: Fix Java tests on multi-config generators
Java.NativeHeaders test was not passing on
t:fedora36-ninja-multi pipeline. This is due to
paths being not set because of $<CONFIG> being used
at --test-command, but not being used at the actual
CTest invocation.
Now the correct variable is used there.
2022-06-28 11:12:41 -04:00
makise-homura b05d297964 Tests: handle a case when hg executable is broken
OS Elbrus 6.0-rc1 to rc3 have hg executable broken
because of python2 and python3 module directories conflict.
Here, we avoid hg related tests if such case is detected.
2022-06-28 11:12:04 -04:00
makise-homura 2faabab644 Tests: don't fail tests on broken E2K Java RVM
Java RVM on E2K architecture is known to be broken
prior to RVM version 3.5.2 (they crash with SIGILL
in some circumstances). That disallows tests like
Java.Javah, Java.Jar, and Java.NativeHeaders to pass.
Now, if such RVM is detected, these test are not being run.
2022-06-28 11:12:04 -04:00
makise-homura 1462a1e15d Tests: check for shlibdeps symbols/shlibs before testing it
OS Elbrus 6.x has totally broken dpkg-shlibdeps; 7.1 has
a working one, but still no symbols/shdibdeps files, so
generated dependencies are also empty. Since this commit,
we're checking if these files exist, and if not, we skip
the CPackComponentsDEB-components-depend2 test.
2022-06-28 11:12:04 -04:00
makise-homura 070e217399 Tests: enable Java tests if javac is a recurse symlink
There are distros (OS Elbrus 6.x, 7.x, Ubuntu 21.x)
where javac is a recurse symlink, like /usr/bin/javac ->
/etc/alternatives/javac -> /usr/lib/jvm/.../bin/javac.
On these distros, Java tests were not run, because
Tests/CMakeLists.txt was not able to handle this case
correctly. Now an additional stage of resolving symlinks
is added, and these distros have Java tests running.
2022-06-28 11:12:04 -04:00
makise-homura 7545d1ca9f Tests: don't use broken makensis
Some distros (OS Elbrus less than 7.0) have unrunnable
makensis. While performing tests, this condition is now
checked, and NSIS CPack generator test is not performed.
2022-06-28 11:12:04 -04:00
Sam V 927e091949 FindOpenAL: Add imported target
Fixes: #20026
2022-06-22 09:16:19 -04:00
Craig Scott fdeb237934 Tests: Use Java_JAVAC_EXECUTABLE variable consistently
In certain specific scenarios, it is possible to end up with JAVA_COMPILE
being unset, but Java_JAVAC_EXECUTABLE being set. This typically occurs
when running different versions of CMake in the same build directory
without deleting the CMakeCache.txt each time. This can result in an
obscure error about the wrong number of arguments to the
get_filename_component() command, but the real cause is the
JAVA_COMPILE variable being unset.

The JAVA_COMPILE variable is only set by the FindJava module, and it
is a legacy variable that has been superceded by Java_JAVAC_EXECUTABLE.
The latter is what the if() expression tests, so use that same variable in
the body of the if() block for consistency and to avoid the above problem.
2022-06-04 19:47:50 +10:00
Brad King fdc9e9e4fa Merge topic 'vs-arm64-tests'
834422e075 Tests: Fix test failures for Windows Arm64 platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7251
2022-05-12 09:25:37 -04:00
Niyas Sait 834422e075 Tests: Fix test failures for Windows Arm64 platforms 2022-05-11 18:13:25 +01:00
Cameron Cawley 33da5824ac OpenWatcom: Allow specifying the runtime library
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the
runtime library selection.  Add policy CMP0136 to switch to
in place of the old hard-coded default flags.

Fixes: #23178
2022-05-06 10:40:58 -04:00
Craig Scott c150f89f4d CPack: Remove the deprecated PackageMaker generator
This CPack generator has been deprecated since commit 7bf187499f
(CPack: Deprecate PackageMaker generator, 2020-01-31).

Fixes: #23344
2022-05-05 08:36:44 +10:00
Ben Boeckel 64ea1a272c messages: remove screamake from comments and errors 2022-04-25 14:29:17 -04:00
Brad King c8f912fa59 Merge topic 'FindJNI-targets'
00c4f488f2 FindJNI: support Android NDK
171d45c039 FindJNI: added components and imported targets
35e92ec619 FindJNI: improved description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !7069
2022-04-07 09:11:56 -04:00
Silvio 178cf34bdc FindMatlab: Add NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES option to matlab_add_mex 2022-04-05 08:27:09 -04:00
Sergiu Deitsch 171d45c039 FindJNI: added components and imported targets 2022-04-04 19:46:32 +02:00
Silvio 9bd659ae25 Tests: Add Matlab label to Matlab-related tests 2022-03-25 10:57:07 -04:00
Fred Baksik b3e9c72901 GHS: use INSTALL target
For consistancy use upper case install for pre-defined targets.
2022-03-17 19:11:45 -04:00
Kevin Puetz a116fd413d ctest: print WORKING_DIRECTORY property with -V 2022-03-09 13:00:01 -06:00
Brad King 6f7580c7ad Tests: Run CTest.UpdateP4 tests only if explicitly enabled
The test occasionally fails with "Gave up waiting for server to start".
Drop our heuristic so we can enable it only on specific builds.
2022-02-22 13:58:35 -05:00
Brad King 787495bb74 Tests: Preemptively create test HOME .bazaar directory
Occasionally one of the `CTest.UpdateBZR` tests fails with:

    bzr: ERROR: [...] File exists: '/.../Tests/CMakeFiles/TestHome/.bazaar'

Create the directory ahead of time to eliminate any chance of a
time-of-check-time-of-use race.
2022-02-22 10:03:38 -05:00
Brad King 7b23fd6c1b Tests: Run CTest.UpdateBZR tests only if explicitly enabled
These tests have not been automatically enabled on current
versions of `bzr` in a long time.  The recent change to
drop the `xmlplugins` heuristic caused the tests to start
running on some machines, but they do not work everywhere.
Disable the tests again pending further investigation.
2022-02-08 08:17:39 -05:00
Brad King 7cf5355d5e Tests: Add cache entries to control ExternalProject test VCS tools
Add undocumented `CMake_TEST_ExternalProject_*` cache entries to
explicitly enable or disable these tests.  If not set, compute defaults
as before.  Also consolidate the VCS default heuristics.
2022-02-07 11:53:29 -05:00
Brad King c8b29dc5b9 Tests: Add cache entries to control existence of CTest.Update* tests
Add undocumented `CMake_TEST_CTestUpdate_*` cache entries to explicitly
enable or disable these tests.  If not set, compute defaults as before.
2022-02-07 11:53:29 -05:00
Brad King a70864e300 Tests: Make condition for CTest.UpdateCVS match pattern of other tools 2022-02-07 11:53:28 -05:00
Brad King 1972a75536 Tests: Drop CTestUpdate.BZR test check for xmloutput plugin
Current `bzr` tools do not have any `bzr xmlplugins` command.
2022-02-07 11:53:28 -05:00
Brad King f2566f6416 Tests: Drop unnecessary check for FindCVS module 2022-02-07 11:53:28 -05:00
Brad King 530242576c Tests: Remove always-true condition enabling CTest.Update* tests 2022-02-07 11:53:26 -05:00
Brad King 4e88a4228e Tests: Remove unused CVS tool discovery
Since commit b819ee85c0 (BUG: Oops. Left chunk of junk at the bottom of
the main Tests CMakeLists.txt file..., 2009-07-24, v2.8.0~385) the
`do_cvs_tests` variable is not used in `Tests/CMakeLists.txt`.
2022-02-07 11:51:40 -05:00
Brad King e485dca1e8 Tests: Move CTest.BuildCommand.ProjectInSubdir into RunCMake.ctest_build
The former duplicates code that is now part of the infrastructure in the
latter.  The latter can also explicitly verify the results.
2022-02-04 08:34:27 -05:00
Brad King 9d621ceba1 Tests: Run MFC test only when explicitly enabled
Previously we used a complicated heuristic to decide whether or not to
run the MFC test, but it sometimes decided incorrectly to run the test.
Since that was first written, we have developed a convention for other
tests to enable them via undocumented cache entries that are added only
on machines known to meet the tests' requirements.  Do that for MFC.
2022-02-03 06:45:53 -05:00
Brad King f3ad061858 Add usage requirements to update direct link dependencies
Link line construction starts with `LINK_LIBRARIES` and appends
dependencies from the transitive closure of `INTERFACE_LINK_LIBRARIES`.
Only the entries of `LINK_LIBRARIES` are considered direct link
dependencies.  In some advanced use cases, particularly involving static
libraries and static plugins, usage requirements need to update the list
of direct link dependencies.  This may mean adding new items, removing
existing items, or both.

Add target properties to encode these usage requirements:

* INTERFACE_LINK_LIBRARIES_DIRECT
* INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE

Fixes: #22496
2022-01-29 06:48:13 -05:00
Brad King b3f1f568d3 Merge topic 'ci-vs-managed'
69419c5870 ci: Enable more VS tests that use managed code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6782
2021-12-06 15:16:00 -05:00
Brad King 69419c5870 ci: Enable more VS tests that use managed code
A couple of VS tests were conditioned on `NOT CMAKE_GENERATOR_TOOLSET`,
but in CI jobs with VS we always set `CMAKE_GENERATOR_TOOLSET`.  Make
the condition specific to excluding the `v90` toolset, which was its
original intention anyway.
2021-12-03 09:09:04 -05:00
Brad King 9ecb24b5a7 Merge topic 'vs-csproj-scripts'
13a7ae2194 VS: Revert "Add missing label in C# project-build events"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6781
2021-12-03 08:54:34 -05:00
Brad King 13a7ae2194 VS: Revert "Add missing label in C# project-build events"
Revert commit b284a21fee (VS: Add missing label in C# project-build
events, 2021-09-03, v3.22.0-rc1~156^2).  The change broke cases using
multiple successful custom commands.  Revert it pending further
investigation into the interaction of the generated script code with
`Microsoft.Common.CurrentVersion.targets`, and whether this is needed
for all managed projects or just C# projects.

Also add a test covering the case that was broken.

Fixes: #22964
Issue: #21440
2021-12-02 18:06:39 -05:00
Brad King 4c68a0e71a Merge topic 'envmod-test-modifying-existing'
9c4d6404eb Tests/Environment: also test modifying ambient values
7d52d48a32 cmCTestRunTest: get the default value from the environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6682
2021-11-01 09:08:11 -04:00
Ben Boeckel 9c4d6404eb Tests/Environment: also test modifying ambient values 2021-10-29 10:54:02 -04:00
Brad King d723bac01c Merge topic 'lcc-compiler'
02b2607a5c Help: Add release note for MCST LCC compiler support
e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture
0995c75301 Tests/RPM: skip tests tat rely on debugedit if it's not found
ea55ac9a51 Tests/RunCMake/CommandLine: Deal with locales that are different from English

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6608
2021-10-19 09:22:22 -04:00
Brad King 94404e912e Tests: Disable SubDirSpaces test on Open Watcom
Open Watcom 1.9 does not support spaces in the path.
2021-10-15 14:46:31 -04:00
makise-homura e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
Divert LCC compiler as a new one, instead of treating it as GNU.

Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been
passing checks for GNU compilers, so it has been identified as GNU.
Now, with intent of seriously upstreaming its support, it has been
added as a separate LCC compiler, and its version displays not a
supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead
of GNU 7.3.0).

This commit adds its support for detection, and also converts basically
every check like 'is this compiler GNU?' to 'is this compiler GNU or
LCC?'. The only places where this check is untouched, is where it
regards other platforms where LCC is unavailable (primarily non-Linux),
and where it REALLY differs from GNU compiler.

Note: this transition may break software that are already ported to
Elbrus, but hardly relies that LCC will be detected as GNU; still such
software is not known.
2021-10-15 05:05:19 +03:00
Hiroshi Miura 6e8754c625 FindJasper: Add IMPORTED target
Fixes: #20601
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-10-06 11:28:09 -04:00
Craig Scott a742088472 Tests: Add support for testing Qt6
The minimum CMake version for Qt6 is 3.16, so all the calls to
cmake_minimum_required() are updated here to enforce that
minimum. This will avoid any CMake version-related warnings
from Qt.

Avoid hard-coding Qt5 where the tests could now be using
Qt5 or Qt6.

Fixes: #22188
2021-10-04 22:10:57 +11:00
Brad King 6ea883d652 Tests: Avoid output when running symlink check
Since commit 58d10cf6f1 (Alternative symlink-creating mode for
file(INSTALL ...), 2021-08-02) we test creating a symlink during
configuration to decide whether to activate some tests.  Capture
the process output during the check to avoid leaking the error
message on failure.
2021-09-17 09:28:57 -04:00
Silvio Traversaro 161990b921 FindMatlab: Add imported targets 2021-09-13 12:12:05 -04:00
Brad King f64e8036aa Tests: Fix check to add InstallMode tests
The check added by commit 58d10cf6f1 (Alternative symlink-creating mode
for file(INSTALL ...), 2021-08-02) only works when re-running CMake in a
build tree after building `cmake`.  Use the driving CMake to check
instead.  Remove the stray link after creation.

Also remove the message on failure: we do not use that convention.
2021-08-19 13:04:47 -04:00
Brad King 8706f7a617 Merge topic 'symlinks-rebase-master'
58d10cf6f1 Alternative symlink-creating mode for file(INSTALL ...)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6396
2021-08-10 09:25:15 -04:00
Felix Lelchuk 58d10cf6f1 Alternative symlink-creating mode for file(INSTALL ...)
An new environment variable 'CMAKE_INSTALL_MODE' is introduced,
which can be used to ask CMake to create symbolic links
instead of copying files during a file(INSTALL ...).

The operation is at the file level only, directory trees are
still created using actual directories, not links.

Signed-off-by: Felix Lelchuk <felix.lelchuk@gmx.de>
2021-08-02 19:42:26 +02:00