Commit Graph

1732 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
98a10290a8 cmSystemTools: Fix 'ErrorOccurred' spelling
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.

Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
2022-06-13 09:05:24 -04:00
Ben Boeckel
b89c085237 clang-tidy: fix readability-static-definition-in-anonymous-namespace lints 2022-05-24 09:09:44 -04:00
Ben Boeckel
6ff03d463f clang-tidy: address google-readability-casting lints
At least those involving `static_cast`.
2022-05-24 09:09:43 -04:00
Ben Boeckel
9409e5c04f clang-tidy: address readability-container-data-pointer lints 2022-05-24 09:09:43 -04:00
Ben Boeckel
a5f8cbe8b1 clang-tidy: address modernize-use-default-member-init lints 2022-05-24 09:09:43 -04:00
Ben Boeckel
97220f5b3f cmCTestSubmitHandler: avoid double fetching envvars
Technically, they can change between these two calls, so use the
verified pointer to assign to strings. Discovered by `clang-analyzer`.
2022-05-21 17:23:19 -04:00
Ben Boeckel
f1d55ff7e9 style: use cmStrCat in some more locations 2022-05-19 15:54:28 -04:00
Martin Duffy
30336dab66 cmJSONHelpers: Restructure cmJSONHelpers
Restructure cmJSONHelpers to prevent SunPro errors when passing context.
2022-05-05 12:12:12 -04:00
Brad King
75e8173322 Source: Fix clang -Wunused-but-set-variable warnings 2022-04-06 16:02:05 -04:00
Brad King
ab5baa32ad Merge topic 'ctest-WORKING_DIRECTORY'
a116fd413d ctest: print WORKING_DIRECTORY property with -V

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7060
2022-03-10 08:39:33 -05:00
Kevin Puetz
a116fd413d ctest: print WORKING_DIRECTORY property with -V 2022-03-09 13:00:01 -06:00
Frank Winklmeier
140704d443 ctest: add option for output truncation
Add `--test-output-truncation` to `ctest`. This option can be used to
customize which part of the test output is being truncated. Currently
supported values are `tail`, `middle` and `head`.

Also add equivalent `CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variable.

Fixes: #23206
2022-03-08 08:18:02 -05:00
Frank Winklmeier
4634de335b cmCTestTestHandler: refactor CleanTestOutput method
Refactor the code to skip over UTF-8 multi-bytes into its own lambda
function so it can more easily be re-used.
2022-03-08 08:08:20 -05:00
Carsten Rudolph
b2f8f0bb87 cmGlobalVisualStudio10Generator: Auto restore NuGet packages. 2022-01-22 06:35:41 -05:00
Carsten Rudolph
193b8fca52 cmBuildOptions: Split build arguments into separate object. 2022-01-22 06:35:38 -05:00
Brad King
78c20892bf Merge topic 'ctest-add_subdirectory'
7c5a120c38 Tests: Add case covering both ctest subdirectory commands
04deda1d2a CTest: Extract common implementation of add_subdirectory and subdirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6795
2021-12-09 10:39:20 -05:00
friendlyanon
04deda1d2a CTest: Extract common implementation of add_subdirectory and subdirs
The two functions have basically the same functionality in a CTest
context, however the add_subdirectory implementation was missing code
for changing the current working directory similarly to how it was done
for subdirs. This commit extracts the common code and also fixes that
bug.

Issue: #22921
2021-12-08 11:36:43 -05:00
Brad King
7b677dbb92 cmListFileBacktrace: Remove unused "bottom" entry
All uses of `GetBottom` by clients have been removed, so drop the
method and its supporting infrastructure.
2021-12-08 10:03:48 -05:00
Rose
b86b6aaa4a Source: Cleanup and simplify some code 2021-11-04 09:20:48 -04:00
Rose
6f4727aaa0 Source: Replace C headers with C++ ones
In applicable areas only, of course.
2021-11-02 14:45:29 -04: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
7d52d48a32 cmCTestRunTest: get the default value from the environment
This only works due to some assumptions about how the `ENVIRONMENT`
property is processed. Comments have been added to notify anyone
modifying the behavior about where to look.

Fixes: #22819
2021-10-29 10:54:02 -04:00
Brad King
a956be4847 Merge topic 'warnings-cleanup'
7e4e192ce2 Source: fix clang-tidy modernize-redundant-void-arg warning
8d671dd94c Source: fix more -Wmissing-prototypes warnings
1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static
319944b3d2 Source: fix some -Wunused-macros warnings
5257d9e71a Source: fix only -Wshorten-64-to-32 warning with explicit cast

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6648
2021-10-27 09:24:54 -04:00
Brad King
9bb7982a15 Merge topic 'purge-sprintf'
b7e9cd05cd Replace the only non-standard _snprintf with snprintf
5ba6e8ac59 Source: Replace most calls to sprintf with snprintf

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6649
2021-10-27 09:23:17 -04:00
Brad King
ede11598ba Merge topic 'simplify-boolean-expressions'
dd918c517d Source: Simplify some boolean expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6654
2021-10-27 09:22:04 -04:00
Brad King
b33c67a6f7 Merge topic 'envmod-support-mod-to-new-variables'
69f95cf1d9 cmCTestRunTest: fix modifying non-existent envvars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6663
2021-10-27 09:20:46 -04:00
Ben Boeckel
69f95cf1d9 cmCTestRunTest: fix modifying non-existent envvars
When appending or modifying to a variable that has not been modified
before, the iterator was not valid, but it was used to insert into the
map again. Instead, just use indexing into the map since we know it will
exist by the end of the function anyways.

Fixes: #22796
2021-10-26 12:51:44 -04:00
Sean McBride
b7e9cd05cd Replace the only non-standard _snprintf with snprintf 2021-10-25 18:23:13 -04:00
Sean McBride
5ba6e8ac59 Source: Replace most calls to sprintf with snprintf 2021-10-25 18:23:13 -04:00
Sean McBride
8d671dd94c Source: fix more -Wmissing-prototypes warnings 2021-10-25 12:27:10 -04:00
Sean McBride
1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static 2021-10-25 12:27:09 -04:00
Sean McBride
319944b3d2 Source: fix some -Wunused-macros warnings
- deleted one unused define
- moved define into #if block where it is used
2021-10-25 12:27:08 -04:00
Rose
dd918c517d Source: Simplify some boolean expressions 2021-10-23 11:30:27 -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
e495f360b2 Merge topic 'ctest_submit-inactivity-timeout'
5d178fcc53 CTest: Add CTEST_SUBMIT_INACTIVITY_TIMEOUT variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6584
2021-10-18 09:27:14 -04:00
Sean McBride
e2a4718d18 Source: Fix Clang -Wdeprecated warnings
Applied C++ 'rule of three'.
2021-10-15 11:23:12 -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
Nikhil Reddy Ramolla
5d178fcc53 CTest: Add CTEST_SUBMIT_INACTIVITY_TIMEOUT variable
Fixes: #22617
2021-10-14 11:41:44 -04:00
Marc Chevrier
59ad7a1c24 Move helpers functions from cmStringAlgorithms.h to cmValue.h
Helpers functions related to cmValue semantic are now part of
cmValue.h header.
2021-09-21 18:11:00 +02:00
Marc Chevrier
cc56dc7468 Rename cmProp in cmValue 2021-09-21 17:14:04 +02:00
Marc Chevrier
8f52451682 Use new SetOption signatures 2021-09-15 18:08:19 +02:00
Marc Chevrier
8d0ae460de cmCTestGenericHandler::SetOption accepts cmProp or std::string 2021-09-15 18:08:19 +02:00
Marc Chevrier
f9bcde974e cmCTestGenericHandler::GetOption returns cmProp 2021-09-13 11:29:07 +02:00
Ben Boeckel
ce44c2cec3 ctest_memcheck: generate DynamicAnalysis-Test.xml as well
This is useful so that memcheck results also show up as test results on
CDash. It will be submitted with the other `MemCheck` parts.

Fixes: #22190
2021-09-08 21:04:46 -04:00
Marc Chevrier
e5cd39ca80 cmProp: refactoring: transform alias in class
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
2021-08-08 16:19:08 +02:00
Kyle Edwards
d2515f77e1 Merge branch 'master' into ctest-test-changing-labels 2021-07-28 09:59:23 -04:00
Kyle Edwards
26170ea306 CTest: Reset multi-options to persistent multi-options
44ad3f0b added multi-options to CTest, but didn't reset them,
causing ctest_test() to fail if it was run multiple times with
different label arguments. Reset the multi-options.

Fixes: #22485
2021-07-28 09:58:28 -04:00
Brad King
3265fa51cd Merge topic 'ctest-environment-modifications'
de4f1f26b0 CTest: add an ENVIRONMENT_MODIFICATION property
4c757fa3c8 Help/prop_test/ENVIRONMENT: clarify the scope of the changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6299
2021-07-13 08:24:36 -04:00
Brad King
2065bd73cb cmState: Construct with mode 2021-07-12 12:21:44 -04:00
Ben Boeckel
de4f1f26b0 CTest: add an ENVIRONMENT_MODIFICATION property
This property allows projects to modify environment variables at test
time rather than trying to guess what the state should be based on what
is present at configure time. Of particular interest is the ability to
use a `PATH` present at test time while adding entries known to be
necessary for the test itself.

There are multiple operations provided to modify variables, including:

  - setting and unsetting
  - appending and prepending as:
    - strings
    - path lists
    - CMake lists

Additionally, a `reset` action is provided to cancel any prior
modifications to that particular variable in the case of incremental
additions to the test property.
2021-07-09 08:45:18 -04:00