| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| | |
01b2d6ab74 Modernize: Use ranged for-loops when possible
15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !2901
|
| |
| |
| |
| |
| |
| |
| | |
Replaced most manual `const_iterator`-based loops and some
reverse-iterator loops with range loops.
Fixes: #18858
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2831
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
186d9b083d cmSystemTools::Message: Add overload accepting std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2869
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use a dedicated `std::set` for implicit include directories instead
of (ab)using the emitted variable. This in combination with lambdas
makes it easier to comprehend which paths are emitted.
For the implicit include directories we used to omit the
`CMAKE_SYSROOT_COMPILE`/`CMAKE_SYSROOT` prefix. This has been changed and
the implicit paths are returned prefixed. Implicit include directory returning
is only ever used by QtAutoGen which requires prefixed paths. QtAutoGen passes
the (implicit) include paths to the `moc` which isn't aware of
`CMAKE_SYSROOT_COMPILE`/`CMAKE_SYSROOT`.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch strips the `stripImplicitDirs` and `appendAllImplicitDirs`
parameters from the `cmLocalGenerator::GetIncludeDirectories` method and makes
it a wrapper into the new `cmLocalGenerator::GetIncludeDirectoriesImplicit`
method. `cmLocalGenerator::GetIncludeDirectoriesImplicit` is the renamed old
implementation of `cmLocalGenerator::GetIncludeDirectories` and still
accepts `stripImplicitDirs` and `appendAllImplicitDirs`.
The motivation is that there's only *one* case where
`cmLocalGenerator::GetIncludeDirectories` is called with the
`stripImplicitDirs` parameter being `false` (QtAutoGen), but many other places
where it is called using the `true` default value.
QtAutoGen is modified to use `cmLocalGenerator::GetIncludeDirectoriesImplicit`
directly. In two use cases of `cmLocalGenerator::GetIncludeDirectories`
the manually set `true` value for `stripImplicitDirs` is removed.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
2993fc347a cmMakefile: GetModulesFile() accepts std::string param
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2838
|
| |/ |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
5990ecb741 Compute implicit include directories from compiler output
d751d2d2ed CMakeDetermineCompilerABI: set locale to C for try_compile()
c765ae495a CMakeDetermineCompilerABI: pass verbose flag during compilation
8c5221fb1f try_compile: Preserve special characters in COMPILE_DEFINITIONS
15ad830062 Refactor exclusion of -I/usr/include to avoid per-language values
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2716
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a `CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES` to contain the
hard-coded list of paths to be excluded from `-I` arguments so that the
values remain excluded even if the per-language
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variants change.
This is needed to preserve our historical exclusion of `-I/usr/include`
even when it is not a real implicit include directory. A policy may be
needed to remove it later.
|
|/ |
|
|
|
|
| |
Reduce the number of files relying on `cmake.h`.
|
|
|
|
| |
Fixes: #18700
|
|
|
|
| |
Fixes: #14983, #16561
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bd9bfc6449 MSVC: Respect CMAKE_RC_COMPILER and CMAKE_MT in vs_link_{dll,exe}
0033676796 CUDA: Enable RC language on Windows
02f566a559 MSVC: Factor out enable_language(RC) call into helper macro
b601bb6f1c CUDA: Find CMAKE_LINKER on Windows
3eebe28ef4 cmLocalNinjaGenerator: Simplify CreateRulePlaceholderExpander
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2424
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CMake commands vs_link_dll and vs_link_exe, performing linking on MSVC,
are responsible for calling resource compiler and manifest tool.
Before this commit, both of these tools were called directly, with the
expectation that they are available in the `PATH`. This has been fixed
by respecting CMake variables `CMAKE_RC_COMPILER` and `CMAKE_MT`
defining paths to these tools.
Fixes: #17804
|
| |
| |
| |
| | |
Accept const std::string& arguments only
|
| |
| |
| |
| |
| |
| | |
In cmGeneratorTarget and cmLocalGenerator we offer several APIs to get
build settings like include directories, compile definitions, source
files, etc. Add corresponding APIs that include backtrace information.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
8f076acdb0 cmLocalGenerator: Remove AddCompileDefinitions method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2470
|
| |/
| |
| |
| |
| |
| |
| | |
This method offers the same definitions as `GetTargetDefines` except
that it excludes the "export" macro on shared libraries. Update call
sites to use `GetTargetDefines` instead. Some of them were incorrectly
excluding the export macro.
|
|/
|
|
|
|
|
|
|
| |
Before this change, install rules created by add_subdirectory()
would be executed after all of the top-level install rules, even
if they were declared before the top-level rules. This change
adds a new policy, CMP0082, which interleaves the add_subdirectory()
install rules with the other install rules so they are run in the
correct order.
|
|
|
|
|
|
| |
Refactoring in commit f4ff60a803 (cmMakefile: Make GetSafeDefinition
return std::string const&, 2018-09-05) changed the treatment of the
empty string in CMP0018 diagnostic logic. Restore the behavior.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
fc1602456a Help: Replace occurrences of "Mac OS X" with "macOS"
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Gregor Jasny <gjasny@googlemail.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Merge-request: !2351
|
| |
| |
| |
| |
| |
| |
| |
| | |
Apple's main Operating system changed their name from OS X to macOS:
https://www.engadget.com/2016/06/13/os-x-is-now-macos/
Revise source comments accordingly.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
4d89830d71 cmMakefile: Make GetRequiredDefinition return std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2347
|
| |/
| |
| |
| |
| |
| |
| | |
In all cases the return value is converted to std::string anyway.
Also remove unnecessary `c_str()` calls in arguments to
`GetRequiredDefinition`.
|
|/
|
|
| |
Use the new IsOn(),IsOff() overloads.
|
|\
| |
| |
| |
| |
| |
| | |
50fbfee3a0 cmLocalGenerator: return directories as const std::string&
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2309
|
| | |
|
|/
|
|
| |
issue: #18251
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
69ca85cc7f Remove unnecessary c_str() in RegularExpression::find calls
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2271
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After changing the ``cmGeneratedFileStream`` methods to accept
``std::string const&`` instead of ``const char*`` we don't
need to call ``std::string::c_str`` anymore when passing
a ``std::string`` to a ``cmGeneratedFileStream`` method.
This patch removes all redundant ``std::string::c_str``
calls when passing a string to a ``cmGeneratedFileStream`` method.
It was generated by building CMake with clang-tidy enabled using
the following options:
-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
|
|
|
|
|
|
|
| |
In ``cmLocalGenerator::GetIncludeDirectories`` append the user requested
implicit include directories first, then append the remaining implicit
include directories. By By doing so we keep the user requested order of
implicit include directories.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What ``cmLocalGenerator::GetIncludeDirectories`` does
-----------------------------------------------------
In general it concatenates the
1. ``target->GetIncludeDirectories(LANG)`` and the
2. ``CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES``.
Additionally it performs some sorting and special treatment of the
- ``CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES``.
By default all ``CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`` are stripped from
the result list.
When explicitly requested (by setting ``stripImplicitInclDirs=false``) *some*
implicit directories are appended to the result list. The implicit directories
that *are* appended are those that were requested to be included by
1. ``target->GetIncludeDirectories(LANG)`` or
2. ``CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES``.
All other implicit directories are still stripped from the result list.
The reason to not simply append all implicit directories is that Qt4's moc has
problems to parse some headers that might be found in the implicit system
include directories (See commit d2536579d51e77827b8e55f39123316324314781
and
[QTBUG-28045](https://bugreports.qt.io/browse/QTBUG-28045)
).
That has been solved in Qt5's moc though.
Extension request to ``cmLocalGenerator::GetIncludeDirectories``
----------------------------------------------------------------
For Qt5's moc we like to have an option that allows to append *all* implict
include directories to the result list, not just those that were user requested.
Changes to ``cmLocalGenerator::GetIncludeDirectories``
------------------------------------------------------
- Shorten the function parameter name ``stripImplicitInclDirs`` to
``stripImplicitDirs``.
- Add new boolean function parameter ``appendAllImplicitDirs``
with a default value ``false``.
The old default behavior of the function stays the same, but a specialized
behavior can be requested by AUTOMOC for Qt4/Qt5 respectively.
|
|
|
|
|
|
| |
Code style change in ``cmLocalGenerator::GetIncludeDirectories``.
Rename a variable to reflect its purpose a little bit better.
|
|
|
|
|
|
|
| |
Code style change in ``cmLocalGenerator::GetIncludeDirectories``.
Embrace ``{}`` temporary strings and code that uses them to minimize their
lifetime.
|
|
|
|
|
|
|
| |
Code style change in ``cmLocalGenerator::GetIncludeDirectories``.
Embrace ``{}`` temporary strings and code that uses them to minimize their
lifetime.
|
|
|
|
|
|
|
| |
Code style change in ``cmLocalGenerator::GetIncludeDirectories()``.
Use the return value of ``std::set::insert`` instead of testing
if the entry already exists in the set using ``std::find``.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This family enable to manage link flags
Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS
Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties
Fixes: #16543
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|