summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetSourcesCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* target_*: Fix cross-directory call backtracesBrad King2022-08-221-3/+6
| | | | | | | Record the call-site backtrace, not the current backtrace of the target's directory. Fixes: #23873
* cmArgumentParser: Model maybe-empty and non-empty lists with wrapper typesBrad King2022-07-071-2/+3
| | | | | | | | Previously bindings to `std::vector<std::string>` required at least one value. Some clients have been filtering `keywordsMissingValue` to support keywords followed by empty lists. Instead, require clients to specify whether a keyword's list can be empty as part of the binding type.
* cmTargetSourcesCommand: allow `INTERFACE` C++ modules when importedBen Boeckel2022-07-061-1/+2
| | | | | `PUBLIC` filesets become `INTERFACE` upon installation. Allow `INTERFACE` scopes for C++ modules when the target is imported.
* cmArgumentParser: Require callers to consider unparsed argumentsBrad King2022-07-051-1/+1
|
* cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-4/+26
| | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-onlyBen Boeckel2022-04-111-9/+0
| | | | | | There is no reason to allow these properties to be manipulated by user code. Instead, use the stored visibility on the fileset objects to derive what these properties should contain.
* cmFileSet: store visibility with the filesetBen Boeckel2022-04-111-33/+10
| | | | | The visibility is intrinsic to the fileset, so store it with it. This avoids recalculating it on every addition to the fileset.
* FILE_SET: Forbid adding header sets to Apple FRAMEWORK librariesKyle Edwards2022-04-071-0/+4
| | | | | | | | The feature needs a specialized implementation to place headers in the right place inside frameworks. To avoid silently doing the wrong thing, make this case an error for the 3.23 series. Issue: #23386
* Merge topic 'file-set-name-requirements' into release-3.23Brad King2022-03-041-3/+4
|\ | | | | | | | | | | | | | | b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7037
| * target_sources(): Enforce stricter requirements for FILE_SET nameKyle Edwards2022-03-031-3/+4
| | | | | | | | Fixes: #23286
* | target_sources(): Process multiple FILE_SET arguments per blockKyle Edwards2022-03-031-5/+28
|/ | | | Fixes: #23287
* target_sources(): Prohibit FILE_SET on custom targetsKyle Edwards2022-02-281-0/+6
| | | | Fixes: #23262
* target_sources(): Add FILE_SET modeKyle Edwards2021-10-271-0/+164
|
* cmTargetSources: Refactor to add enum class parametersKyle Edwards2021-10-271-28/+46
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-3/+5
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* cmTarget: add std::string overloadsVitaly Stakhovsky2019-12-141-2/+1
|
* 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