summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetSourcesCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmTarget*: Port away from cmCommandRegina Pfeifer2019-09-261-33/+48
|
* Refactor: Use cmStrCat to construct error stringsAsit Dhal2019-09-181-5/+4
| | | | | Replace string construction using std::stringstream with cmStrCat and cmWrap.
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-1/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-4/+4
| | | | Reduce the number of files relying on `cmake.h`.
* Merge topic 'mk-directory'Brad King2018-08-281-3/+2
|\ | | | | | | | | | | | | c8fd23ec6f cmMakefile: return directories as const std::string& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2311
| * cmMakefile: return directories as const std::string&Vitaly Stakhovsky2018-08-271-3/+2
| |
* | Maint: misc. typosluz.paz2018-08-241-1/+1
|/ | | | Found via `codespell`.
* target_sources: Interpret relative paths as relative to the calling directoryPatrick Stotko2018-06-181-1/+86
| | | | | | | | | | Previously the command considered non-absolute source file paths relative to the associated target on the LHS. This causes problems in incremental builds where files are added from subdirectories and forces users to workaround by manually converting to absolute paths. Change this to enable more intuitive usage by projects. Fixes #17981
* Teach target_* commands to set INTERFACE properties of IMPORTED targetsDeniz Bahadir2017-10-261-8/+1
| | | | | | | | | | | Now, several `INTERFACE_*` properties can be set on `IMPORTED` targets, not only via `set_property` and `set_target_properties` but also via `target_compile_definitions`, `target_compile_features`, `target_compile_options`, `target_include_directories`, `target_sources` and `target_link_libraries`. Fixes: #15689 Issue: #17197
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-1/+0
|
* Separate compilation for commands included in cmCommandsDaniel Pfeifer2016-10-211-1/+9
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-14/+11
| | | | | | | | | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Merge topic 'join-algorithm'Brad King2015-01-121-9/+1
|\ | | | | | | | | | | | | 55a73e6b Use the cmJoin algorithm where possible. 8dc8d756 cmStandardIncludes: Add a join algorithm for string containers. b5813cee cmInstallCommand: Remove unused variable.
| * Use the cmJoin algorithm where possible.Stephen Kelly2015-01-081-9/+1
| |
* | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-2/+2
|/ | | | All compilers hosting CMake support the std class.
* cmTargetPropCommandBase: Change the interface to return bool.Stephen Kelly2014-04-071-1/+2
| | | | | This is needed for the target_compile_features command, which may fail at configure time if an invalid feature is specified.
* target_sources: New command to add sources to target.Stephen Kelly2014-04-021-0/+64