| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Since 3.19, CMake generates a deprecation warning when using a minimum
version less than 2.8.12. This eliminates those warnings generated
during tests, which are typically hidden from the user and developer but
are being generated nonetheless.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This generator has been deprecated since CMake 3.3. Remove it.
Update documentation, modules, and tests to drop content specific
to this generator.
|
|
|
|
|
|
| |
Shorten the add_definitions command test directory and target names to
avoid creating really long paths that fail with some tools on Windows.
While at it, remove unnecessary project() command calls.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When $<TARGET_PROPERTY> names a build property like COMPILE_DEFINITIONS
but not the usage requirement (INTERFACE_) version of it, the value
should be that used to build the target. It should not be influenced by
a dependent 'head' target like usage requirements are.
Extend the CompileDefinitions test with a case covering the corrected
behavior.
Reviewed-by: Stephen Kelly <steveire@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It accepted an optional argument to test for equality, but no way
to get the linker language of a particular target.
TARGET_PROPERTY provides this flexibility and STREQUAL provides
the necessary API for equality test.
Extend the CompileDefinitions test to cover accessing the
property of another target.
|
|
|
|
|
|
|
|
| |
The VS 6 IDE does not like spaces in definition values so CMake drops
them and warns. The Tests/CompileDefinitions test C code that looks for
the dropped definitions already knows to skip them, but CMake still
warns. Silence the warnings by avoiding such values in the first place
on VS 6.
|
|
|
|
|
|
| |
They can't be used when evaluating link libraries, but they can be
used for include directories and compile definitions. Later they can
be used for compile options.
|
|
|
|
|
|
| |
This generator expression joins a list with a separator. The separator
may contain arbitrary content, such as commas, which is ordinarily a
delimiter in the generator expression syntax.
|
|
|
|
|
| |
Teach the CompileDefinitions test to cover evaluation of config-specific
generator expressions.
|
|
|
|
|
|
| |
We can't test this in the GeneratorExpression unit test because
the ';' chars are processed specically by the CMake function argument
parser.
|
| |
|
|
|
|
|
|
| |
Because the main file for the dummy-executable and the actual compile
test were both called main.cpp, they were overwriting each other during
in-source builds.
|
| |
|
|
|
|
| |
Avoid testing unsupported spaces in define values.
|
|
There is no need to do so. Be consistent with include directories and
ensure uniqueness.
This requires changing the API of the cmLocalGenerator::AppendDefines
method, and changing the generators to match.
The test unfortunately can't test for uniqueness, but it at least verifies
that nothing gets lost.
|