summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI
Commit message (Collapse)AuthorAgeFilesLines
* message: Add CONFIGURE_LOG mode to record a message in the configure logBrad King2023-01-181-1/+1
| | | | | | | Provide a replacement for `file(APPEND .../CMake{Output,Error}.log)` that records messages in the configure log. Issue: #23200
* FileAPI: Add "configureLog" object kindBrad King2022-12-179-0/+63
| | | | | | | Provide clients with a way to get a known set of configure log event versions. Issue: #23200
* file-api: support exporting file set informationBen Boeckel2022-11-0853-1/+198
| | | | | | | This includes listing the filesets themselves as well as which file set (if any) each source file is associated with. Fixes: #24128
* Xcode: Put object files in a place that Xcode cleansBrad King2022-10-284-6/+6
| | | | | | | | | Since commit dc5fc898f6 (Xcode: Set object file locations using TARGET_TEMP_DIR, 2022-09-29, v3.25.0-rc1~64^2~1), `xcodebuild clean` does not remove the object files in our explicit `TARGET_TEMP_DIR` because it is not under the `SYMROOT`. Put it there. Fixes: #24096
* target_*: Fix cross-directory call backtracesBrad King2022-08-221-47/+11
| | | | | | | Record the call-site backtrace, not the current backtrace of the target's directory. Fixes: #23873
* Tests: Add FileAPI case for cross-directory target_* commandsBrad King2022-08-2222-33/+247
| | | | | | | | | | | The backtraces for some of the commands incorrectly come from the target's directory instead of the caller's directory. Expect the incorrect backtraces in test results for now. Increase the minimum required version of CMake in the test case to enable policy CMP0079 to support cross-directory calls. Issue: #23873
* Tests: Fix RunCMake.FileAPI test with jsoncpp < 1.7.5Brad King2022-08-182-1/+9
| | | | | | | Prior to jsoncpp commit `126bdc2b05` (Reject extra chars if strictRoot, 2016-08-21, 1.7.5~2), it did not diagnose trailing characters in the input after a JSON value. Teach our corresponding test case to tolerate the old behavior.
* install: support `CXX_MODULES_BMI` installation bitsBen Boeckel2022-07-061-0/+10
|
* cmInstallExportGenerator: expose the temporary directoryBen Boeckel2022-04-281-1/+1
| | | | | | | | | | | | This needs to be known so that C++ module properties for the install can be staged beside the other files. Always perform the MD5 transformation (in non-bootstrap builds) so that the path can be computed prior to generation (where it used the longest configuration name to detect too-long paths). Update tests to expect the always-present MD5 value. Note that this improves robustness of the test suite as testing in a too-long path may have triggered the MD5 conversion anyways.
* CMake: Use FindPython instead of FindPythonInterp to build CMake itselfKyle Edwards2022-04-211-2/+2
| | | | Fixes: #23444
* IBMClang: Add support for IBM Open XL C/C++Aaron Liu2022-01-271-1/+1
| | | | Fixes: #22929
* FileAPI: Add information on file set installersKyle Edwards2021-10-2718-24/+631
|
* LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Divert LCC compiler as a new one, instead of treating it as GNU. Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been passing checks for GNU compilers, so it has been identified as GNU. Now, with intent of seriously upstreaming its support, it has been added as a separate LCC compiler, and its version displays not a supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead of GNU 7.3.0). This commit adds its support for detection, and also converts basically every check like 'is this compiler GNU?' to 'is this compiler GNU or LCC?'. The only places where this check is untouched, is where it regards other platforms where LCC is unavailable (primarily non-Linux), and where it REALLY differs from GNU compiler. Note: this transition may break software that are already ported to Elbrus, but hardly relies that LCC will be detected as GNU; still such software is not known.
* FileAPI: Add integration for runtime dependency installersKyle Edwards2021-06-044-2/+209
|
* FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTSKyle Edwards2021-05-313-3/+71
|
* install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTSNils Gladitz2021-05-195-0/+63
| | | | | | | | | | | In a per-component installation the generated installation scripts are invoked once for each component. Per default custom installation script code added by install(CODE|SCRIPT) only runs for one specific component in this context. The new ALL_COMPONENTS option allows custom script code to be run once for each component being installed.
* MSYS: Add support for running under MSYS runtime environmentOrgad Shaneh2021-04-263-8/+8
| | | | Detect MSYS as CYGWIN, with the required adaptations.
* fileapi: Add installers to codemodel-v2 "directory" objectBrad King2021-03-1611-11/+781
| | | | Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
* fileapi: Add backtraceGraph to codemodel-v2 "directory" objectBrad King2021-03-161-1/+3
| | | | Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
* fileapi: Add a "directory" object to codemodel-v2Brad King2021-03-169-10/+232
| | | | | | This object will contain more detailed directory-level information. Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
* fileapi: Re-organize backtrace infrastructureBrad King2021-03-161-3/+2
| | | | Make it available to more parts of the codemodel object.
* Tests: Update RunCMake.FileAPI for IntelLLVMBrad King2021-01-281-1/+1
|
* Tests: Add test for toolchains-v1 File API objectBen McMorran2021-01-129-0/+150
|
* Ninja Multi-Config: Add support for cross-config custom commandsKyle Edwards2020-12-151-4/+4
| | | | Co-Author: Brad King <brad.king@kitware.com>
* GENERATED prop: Set CMP0118 to NEW for some (unrelated) testsDeniz Bahadir2020-11-241-1/+1
| | | | | | * Adjusting the (unrelated) RunCMake.Ninja test to set CMP0118 to `NEW`. * Adjusting the (unrelated) RunCMake.FileAPI test to set CMP0118 to `NEW`.
* GENERATED prop: Check CMP0118 policy and warn in certain situationsDeniz Bahadir2020-11-241-0/+2
| | | | | | | | | | | | | | * Adding tests for CMP0118 being unset (aka set to `WARN`). * Adjusting the (unrelated) RunCMake.CMP0026 test to set CMP0118 to `NEW`, * Adjusting the (unrelated) RunCMake.Ninja test to set CMP0118 to `OLD`. * Adjusting the (unrelated) RunCMake.FileAPI test to set CMP0118 to `OLD`. Note: Setting CMP0118 to `NEW` and modifying the `GENERATED` property with `set_property` or `set_source_files_properties` will currently NOT set that property because the implementation is still to come.
* cmTarget: Raise error if imported target location is not setRaul Tambre2020-08-216-10/+16
| | | | | | | | Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This would then end up on the link line and cause build failures. Policy CMP0110 is added to control this behaviour. Fixes #19080, #19943.
* fileapi: Add INTERFACE libraries with SOURCES to codemodel-v2Brad King2020-08-0712-1/+260
| | | | | | | | | | | | INTERFACE libraries with SOURCES now appear in the generated buildsystem, so include them in the codemodel output too. We do not need to bump the `codemodel-v2` object kind minor version because that was already done in post-3.18 development by commit 7d6861f367 (fileapi: Extend codemodel targets with language standard, 2020-06-18). Fixes: #18608
* fileapi: Support multiple backtraces for language standardJustin Goshi2020-07-062-2/+17
|
* fileapi: Extend codemodel targets with language standardJustin Goshi2020-06-269-1/+304
|
* fileapi: Extend codemodel targets with PRECOMPILE_HEADERSJustin Goshi2020-05-225-1/+170
|
* Tests: Add a PCH example to RunCMake.FileAPI codemodel-v2Justin Goshi2020-05-227-1/+489
|
* Tests: Fix indentation in RunCMake.FileAPI cxx_exe.jsonBrad King2020-05-221-2/+2
|
* Fix dependencies on targets linked through object librariesBrad King2020-03-042-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an object library is used via `target_link_libraries`, any targets listed in the object library's `INTERFACE_LINK_LIBRARIES` closure should become direct dependencies of the consuming target. However, these were accidentally left out by `cmComputeTargetDepends::CollectTargetDepends` because object libraries are encountered through external object sources first and then added to the `emitted` set which blocks them from being processed as link dependencies. This was not noticed by the test case in commit bab24e782c (target_link_libraries: Propagate dependencies of object libraries, 2018-12-10, v3.14.0-rc1~260^2) because the relevant dependency appears transitively through the object library target itself. Re-order the logic to process link dependencies first, and then external object sources. That way object libraries used via `target_link_libraries` will be treated as such by dependency analysis. This also adds missing backtrace information for object libraries used via `target_link_libraries`. The missing information was mentioned in a FIXME comment in the RunCMake.FileAPI test added by commit ea0a060168 (fileapi: Add test for codemodel v2, 2018-11-09, v3.14.0-rc1~257^2~7). That comment itself was dropped by commit a0de350e2f (FileAPI test: Break gen_check_targets() into JSON files, 2020-02-07), but we can now update the corresponding location in the `.json` files to have the now-expected backtrace information. Fixes: #20421
* FileAPI test: Break gen_check_projects() into JSON filesKyle Edwards2020-02-078-120/+127
|
* FileAPI test: Break gen_check_targets() into JSON filesKyle Edwards2020-02-0742-4422/+4462
|
* FileAPI test: Break gen_check_directories() into JSON filesKyle Edwards2020-02-0710-148/+157
|
* FileAPI test: Add infrastructure for reading JSON test dataKyle Edwards2020-02-071-0/+6
|
* Ninja Multi-Config: Don't include MinSizeRel by defaultKyle Edwards2020-02-061-0/+4
|
* Ninja: Add multi-config variantKyle Edwards2019-12-132-13/+13
| | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* FileAPI: Add "multiConfig" parameter to index fileKyle Edwards2019-11-201-2/+3
|
* fileapi: add some source property backtracesJustin Goshi2019-09-261-4/+61
| | | | | Support backtraces for COMPILE_DEFINITIONS, COMPILE_OPTIONS, and INCLUDE_DIRECTORIES source properties.
* fileapi: add backtraces for LINK_PATH and LINK_DIRECTORIESJustin Goshi2019-09-182-2/+39
|
* fileapi: add backtraces for compile/link optionsJustin Goshi2019-09-102-4/+129
|
* Merge topic 'fileapi-install-generators'Brad King2019-08-052-1/+36
|\ | | | | | | | | | | | | d70a0f8681 fileapi: Fix codemodel target install destination for cross-dir rules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3639
| * fileapi: Fix codemodel target install destination for cross-dir rulesBrad King2019-07-312-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | Since commit e89ad0f94e (install: Allow installing targets created in another directory, 2018-06-18, v3.13.0-rc1~407^2) we support calling `install(TARGETS)` for targets created in another directory. However, install generators are associated with the directory in which the call to `install()` appears. This may not be the same directory in which the target is defined. Record in each target the list of install generators it has. Fixes: #19546
* | AIX: Create import library for executables with exportsBrad King2019-07-161-0/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, plugins meant to be loaded into executables via `dlopen` must be linked with access to a list of symbols exported from the executable in order to use them (when not using runtime linking). The AIX linker supports specifying this list as an "import file" passed on the command line either via the `-bI:...` option or (with a leading `#! .` line) as a normal input file like any other library file. The linker import file plays the same role on AIX as import libraries do on Windows. Teach CMake to enable its import library abstraction on AIX for executables with the `ENABLE_EXPORTS` target property set. Teach our internal `ExportImportList` script to optionally generate a leading `#! .` line at the top of the generated export/import list. Update our rule for linking an executable with exports to generate a public-facing "import library" implemented as an AIX linker import file. With this approach, our existing infrastructure for handling import libraries on Windows will now work for AIX linker import files too: * Plugins that link to their executable's symbols will be automatically linked using the import file on the command line. * The executable's import file will be (optionally) installed and exported for use in linking externally-built plugins. This will allow executables and their plugins to build even if we later turn off runtime linking. Issue: #19163
* fileapi: extend codemodel v2 with directory detailsBrad King2018-12-121-0/+26
| | | | | Issue: #18398 Co-Author: Kyle Edwards <kyle.edwards@kitware.com>
* fileapi: extend codemodel v2 with a project modelBrad King2018-12-122-3/+259
| | | | | | | | | Offer clients a `project()`-centric view of the build system. This is similar to the directory-centric view but consolidates subdirectories that do not call `project()` with a new project name. Issue: #18398 Co-Author: Kyle Edwards <kyle.edwards@kitware.com>
* fileapi: Add test for cmakeFiles v1Kyle Edwards2018-12-125-1/+89
|