Commit Graph

27 Commits

Author SHA1 Message Date
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Brad King
9e3b559b6a Tests: Update cmake_minimum_required versions to 3.10 2024-10-03 14:18:16 -04:00
Kyle Edwards
495d0da36b Tests: Use real directory in TestsWorkingDirectory 2024-02-27 14:36:40 -05:00
David Lindauer
531b4fe643 OrangeC: Add support for OrangeC compiler
Add compiler information modules.  Update the test suite.

Fixes: #25032
Co-authored-by: Brad King <brad.king@kitware.com>
2023-09-25 12:27:29 -04:00
Brad King
f53bd6f450 Tests: Bump CMake minimum required in tests to 3.5
CMake 3.27 deprecates compatibility with CMake < 3.5.  Update tests that
do not cover older interfaces to avoid the deprecation warning.

Follow the pattern from:

* commit 7b07ccdd2b (Tests/*Only: Update cmake_minimum_required versions,
                     2020-06-15, v3.19.0-rc1~629^2~1)

* commit 72e7c45e98 (Tests: Bump CMake minimum required in tests to 2.8.12,
                     2020-12-22, v3.20.0-rc1~224^2)

* commit f6b4db365a (Tests: bump cmake_minimum_required version to 2.8.12,
                     2021-04-04, v3.21.0-rc1~372^2)

Also remove explicit `cmake_policy` settings made redundant by the
version.
2023-03-01 16:36:54 -05:00
Rolf Eike Beer
f6b4db365a Tests: bump cmake_minimum_required version to 2.8.12
This needlessly produces warnings during the test runs that no-one
sees but that are distracting when actually inspecting the logs.
2021-04-05 09:53:07 -04:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2018-06-01 09:53:42 -04:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
Brad King
5e871f7089 Tests: Sort includes of sys/types.h as clang-format would 2016-05-03 10:08:41 -04:00
Brad King
e1c7747253 Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first).  First
run `clang-format` with the config file:

    ---
    SortIncludes: false
    ...

Commit the result temporarily.  Then run `clang-format` again with:

    ---
    SortIncludes: true
    IncludeCategories:
      - Regex:    'sys/types.h'
        Priority: -1
    ...

Commit the result temporarily.  Start a new branch and cherry-pick the
second commit.  Manually resolve conflicts to preserve indentation of
re-ordered includes.  This cleans up the include ordering without
changing any other style.

Use the following command to run `clang-format`:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
      egrep -z -v '^Source/cm_sha2' |
      egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
      egrep -z -v '^Utilities/(KW|cm).*/' |
      egrep -z -v '^Tests/Module/GenerateExportHeader' |
      egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
      xargs -0 clang-format -i

This selects source files that do not come from a third-party.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
Sean McBride
a27edd8a05 Fix XCode -> Xcode typos, notably in man page (#12231) 2011-05-31 09:13:00 -04:00
Ben Boeckel
0594287606 Add more tests for WorkingDirectory for tests 2011-01-20 13:47:53 -05:00
Ben Boeckel
6529d7f67e Pass the expected value as the first argument
When the path has regular expression special characters, the
PASS_REGULAR_EXPRESSION value can fail to compile.
2011-01-03 08:39:22 -05:00
Ben Boeckel
96309fc6e2 Make TestsWorkingDirectory test a C file 2010-12-17 12:34:20 -05:00
Ben Boeckel
a4a5e37568 Use iostream to make Borland happy
It seems as though cstdio doesn't bring in stdio.h with the Borland
compilers.
2010-12-17 11:07:40 -05:00
Ben Boeckel
cfe53cddbd Fully specify the path to old-signature add_test 2010-12-17 11:07:19 -05:00
Ben Boeckel
017d4e9d2c Group adding tests with its properties 2010-12-17 11:06:59 -05:00
Ben Boeckel
561cc3359c Only test the default cwd with Makefiles
XCode and Visual Studio generators can run from
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE} and determining this at
testing time is not feasible without adding in more
PASS_REGULAR_EXPRESSION's which may create false positives.

Since the parsing code is in cross-platform, generator-agnostic  code,
if it passes with Makefiles, it should work with other generators on
other platforms.
2010-12-17 10:24:14 -05:00
Ben Boeckel
d87bae7f74 Simplify the _default_cwd derivation 2010-12-17 10:23:54 -05:00
Ben Boeckel
992c74f3e0 Use --><-- markers to denote the path 2010-12-17 10:23:24 -05:00
Ben Boeckel
5249551f9f Flip slashes around on Windows 2010-12-17 09:45:39 -05:00
Ben Boeckel
0a014dab5c Add ctype.h include for toupper() 2010-12-17 09:23:59 -05:00
Ben Boeckel
af12f83d80 Fix header includes for C++ and Visual Studio 2010-12-17 09:14:25 -05:00
Ben Boeckel
5597aa24f1 Rename the project to match the test 2010-12-16 17:29:19 -05:00
Ben Boeckel
9bf4165437 Add tests for WORKING_DIRECTORY arg to add_test 2010-12-16 16:50:48 -05:00
Ben Boeckel
7679f9fab0 Rename WorkingDirectory test 2010-12-16 16:50:47 -05:00