| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Helpers functions related to cmValue semantic are now part of
cmValue.h header.
|
|
|
| |
Fixes: #21276
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
INTERFACE libraries were created with the intention of collecting usage
requirements for use by other targets via `target_link_libraries`.
Therefore they were not allowed to have SOURCES and were not included in
the generated buildsystem. In practice, this has become limiting:
* Header-only libraries do have sources, they just do not compile.
Developers should be able to edit those sources (the header files)
in their IDE.
* Header-only libraries may need to generate some of their header
files via custom commands.
Some projects work around these limitations by pairing each interface
library with an `add_custom_target` that makes the header files and
custom commands appear in the generated buildsystem and in IDEs.
Lift such limitations by allowing INTERFACE libraries to have SOURCES.
For those with sources, add a corresponding build target to the
generated buildsystem.
Fixes: #19145
|
|
|
|
| |
Fixes: #20641
|
|
|
|
| |
Fixes: #19616
|
| |
|
|
|
|
|
| |
Replace string construction using std::stringstream with cmStrCat and
cmWrap.
|
|
|
|
|
|
| |
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators. Leave new expressions and cast
expressions for later.
|
|
|
|
|
|
|
| |
This replaces `std::ostringstream`, when it is written to only once.
If the single written argument was numeric, `std::to_string` is used instead.
Otherwise, the single written argument is used directly instead of the
`std::ostringstream::str()` invocation.
|
|
|
|
|
|
|
|
|
| |
This replaces invocations of
- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
|
|
|
|
| |
Ref: #19499
|
| |
|
|
|
|
| |
Fixes #18327
|
|
|
|
| |
Reduce the number of files relying on `cmake.h`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
In commit v3.11.0-rc1~433^2~1 (Add support for IMPORTED GLOBAL targets
to be aliased, 2017-09-14) we accidentally dropped the error on calling
`add_library` to alias an imported target that is not globally visible.
The `add_executable` command's equivalent check was properly updated.
Restore the check in `add_library` with the same update. Also fix the
test case accordingly.
Fixes: #17982
|
|
|
|
|
|
|
|
|
|
| |
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ae5f4069 CMP0037: Allow test and package targets when features are not enabled
409527a0 CMP0037: De-duplicate check and message generation
a2611d81 Tests: Add RunCMake.CMP0037 case for WARN on reserved targets
103501c4 Tests: Do not enable languages in all cases of RunCMake.CMP0037
2d0b3e6e cmGlobalGenerator: Refactor test and package target conditions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !1417
|
| | |
|
|/
|
|
|
| |
Issue: #15569
Issue: #17197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `add_library` and `add_executable` commands can now be called with
no source-files and won't generate a warning or error message, as long
as source-files will be added later via the `target_sources` command.
If during the generation step still no sources are associated with
targets created by such calls a useful error message will be generated
and generation fails.
Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
excluded from this check because we do not need sources for these target
types during generation.
Fixes: #16872
|
| |
|
|
|
|
|
|
|
|
| |
Teach install() and export() to handle the actual object files.
Disallow this on Xcode with multiple architectures because it
still cannot be cleanly supported there.
Co-Author: Brad King <brad.king@kitware.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Clang-tidy reports some issues only from the currently compiled source
file and its associated header file. Separating the compilation of
commands exposed some clang-tidy issues that were not reported previously.
Fix them.
|
| |
|
|
|
|
|
| |
Include it in dependents which have previously relied on it
transitively.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Remove mapping to cmTarget.
|
|
|
|
|
|
|
| |
Mostly automated:
values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType")
for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
|
| |
|
| |
|
| |
|
|
|
|
| |
All compilers hosting CMake support the std class.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When checking target types for TARGET_SUPPORTS_SHARED_LIBS == false,
enumerate exactly the library types not supported rather than trying to
maintain a list of all the types that are supported. Otherwise
add_library(SomeImportedLib UNKNOWN IMPORTED)
warns on platforms that do not support shared libraries.
Reported-by: Kelly Thompson <kgt@lanl.gov>
|
|\
| |
| |
| |
| | |
77b581c2 Policies: omit warnings about unset policies when they are actually set to NEW
|
| | |
|
|/
|
|
|
|
| |
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
|
| |
|
|
|
|
|
|
|
|
| |
Most callers already have a std::string, on which they called c_str() to pass it
into these methods, which internally converted it back to std::string. Pass a
std::string directly to these methods now, avoiding all these conversions.
Those methods that only pass in a const char* will get the conversion to
std::string now only once.
|
|
|
|
|
| |
Document the valid signatures. Add a test for the IMPORTED GLOBAL
signature.
|
|
|
|
|
|
|
|
| |
Teach add_custom_target to check the policy too. Extend the policy to
disallow reserved target names that we use for builtin targets like
"all".
Extend the RunCMake.CMP0037 test to cover these cases.
|
| |
|
|
|
|
|
| |
Exclude Borland and NMake from the CMP0037 test. They do not accept
the colon in a target name.
|