summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/target_sources
Commit message (Collapse)AuthorAgeFilesLines
* cmTarget: Don't allow setting read-only propertiesRobert Maynard2024-01-232-2/+2
| | | | | Ensure that all documented read-only target properties now produce errors when trying to set.
* cmExperimental: remove the flag for C++ modulesBen Boeckel2023-10-029-40/+2
| | | | | | | All the major compilers now have scheduled releases with support for scanning, so remove the experimental gate. Fixes: #18355
* cmExperimental: recycle the C++ modules API UUIDBen Boeckel2023-08-172-2/+2
| | | | Supporting modules on IMPORTED targets is worth an update.
* cmExperimental: recycle the C++ modules API UUIDBen Boeckel2023-07-312-2/+2
| | | | `try_compile` and `try_run` now support C++ modules.
* cmExperimental: refresh the C++ modules UUIDBen Boeckel2023-07-132-2/+2
| | | | | The transitive support for Clang is a change in support for the ecosystem.
* File set: Allow absolute CMAKE_INSTALL_INCLUDEDIRKyle Edwards2023-06-203-0/+26
| | | | | | | | | When install(TARGETS) and install(EXPORT) were called with file sets and an absolute CMAKE_INSTALL_INCLUDEDIR, "${_IMPORT_PREFIX}/" was still being prepended to the base directory and files, resulting in incorrect paths. Don't prepend this when absolute paths are used. Fixes: #25010
* cxxmodules: update the experimental UUIDBen Boeckel2023-05-312-2/+2
| | | | | Syntactic support for C++ header units has been removed, so a new UUID is warranted.
* cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesetsBen Boeckel2023-05-312-4/+2
| | | | | There's no backing implementation for header units anyways, so just remove it for now.
* Tests/RunCMake: Match 'Tried extensions' output more robustlyBrad King2023-03-092-6/+6
|
* target_sources: Fix backtrace on missing sourceBrad King2023-02-283-3/+3
| | | | | | | | | If a source file is not found, the error message reports a backtrace. Previously the backtrace pointed at where the target was created. In the case of `target_sources`, the missing source may have been named elsewhere. Fixes: #24538
* Tests: Add RunCMake.target_sources case covering missing sourceBrad King2023-02-285-1/+12
|
* target_sources: give a hint when a file named `FILE_SET` is not foundBen Boeckel2023-02-247-0/+35
| | | | | | | | | `FILE_SET` is only supported within `target_sources()` and only directly after a visibility keyword or another `FILE_SET`. Give a hint as to what might be wrong if a file named `FILE_SET` cannot be found for any reason. Fixes: #24539
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-113-10/+5
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* cxxmodules: support new round of Clang patchesBen Boeckel2022-12-152-2/+2
| | | | | | | | | | These patches now support the `-MF` output, so remove the `none` support added just for the old patchset which did not use it. Also update the flag name to `-fmodule-output=`. Due to the new Clang module mapper flag, use a new experimental support UUID as well.
* cmExperimental: recycle C++20 module support UUIDBen Boeckel2022-12-012-2/+2
| | | | Visual Studio support warrants a new ID.
* cmExperimental: update `CXX_MODULE_CMAKE_API` UUIDBen Boeckel2022-07-062-2/+2
| | | | The set of features available has been expanded, so update the UUID.
* Merge topic 'file-set-crash'Brad King2022-06-307-0/+28
|\ | | | | | | | | | | | | 3fee5398bd install(EXPORT): Check for missing file sets at generate time Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7420
| * install(EXPORT): Check for missing file sets at generate timeKyle Edwards2022-06-297-0/+28
| | | | | | | | | | | | | | | | | | | | Missing file sets were originally checked at configure time in install(TARGETS ... EXPORT), but were not checked at generate time. If a file set was added after install(TARGETS ... EXPORT) was called, an abortion error was thrown. Check again at generate time to gracefully display an error message instead of crashing. Fixes: #23680
* | cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-167-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: factor out fileset type handlingBen Boeckel2022-04-252-4/+4
| | | | | | | | | | This allows for new fileset types to be added more easily by factoring out the declarative information into a structure.
* | RunCMake/target_sources: test `HEADERS` file sets via generic propsBen Boeckel2022-04-252-0/+9
|/
* cmExportBuildFileGenerator: handle genex-wrapped source pathsBen Boeckel2022-04-181-11/+45
| | | | | | | Previously a fileset with `$<$<CONFIG:Debug>:some_file>` would show up as-is (with escaping) in the build directory export. Instead, evaluate all fileset entries as generator expressions and list them as they are similar to the installation information.
* cmInstallCommand: tweak error messageBen Boeckel2022-04-161-2/+2
| | | | | Not all filesets need to be installed; just those that are visible on the target's interface. Clarify the error message.
* FILE_SET: Make INTERFACE libraries with HEADER_SETS participate in buildsystemKyle Edwards2022-04-144-0/+28
| | | | | | | | If an INTERFACE library has HEADER_SETS, and its header sets contain files generated by a custom command, the library needs to participate in the buildsystem so that the files will be generated. Fixes: #23422
* cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-onlyBen Boeckel2022-04-1115-36/+20
| | | | | | 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.
* FILE_SET: Forbid adding header sets to Apple FRAMEWORK librariesKyle Edwards2022-04-074-0/+15
| | | | | | | | 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-044-0/+12
|\ | | | | | | | | | | | | | | 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-034-0/+12
| | | | | | | | Fixes: #23286
* | target_sources(): Process multiple FILE_SET arguments per blockKyle Edwards2022-03-031-5/+9
|/ | | | Fixes: #23287
* target_sources(): Prohibit FILE_SET on custom targetsKyle Edwards2022-02-284-0/+8
| | | | Fixes: #23262
* install(): Properly ignore FILE_SETs that don't existKyle Edwards2022-02-172-0/+5
| | | | Fixes: #22960
* Tests: Add tests for target_sources(FILE_SET) and associated functionalityKyle Edwards2021-10-2765-0/+436
|
* Tests/RunCMake: Merge TargetSources into target_sourcesKyle Edwards2021-10-1959-3/+364
|
* cmTargetPropCommandBase: check keywords after parsingBen Boeckel2018-10-262-5/+0
| | | | | | | | | | | | | The following was disallowed: add_library(iface INTERFACE) target_link_libraries(iface PUBLIC) just due to the mention of the `PUBLIC` keyword. Instead, only error if there are actually `PUBLIC` dependencies specified (and analogously for other restrictions). Update tests to expect this new behavior.
* Tests: add tests for empty-value keyword arguments in target_*Ben Boeckel2018-10-265-0/+18
Not all of these commands accept non-compilable (i.e., IMPORTED) targets, so those calls are currently just commented out. If they ever do start to accept them, the tests should be enabled.