summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'backport-4.0-fileapi-instrumentation-initial-cache'Brad King8 days4-0/+14
|\
| * Merge branch 'backport-3.31-fileapi-initial-cache'Brad King8 days4-0/+14
| |\
| | * fileapi: Fix crash on cmake_file_api() call in initial cacheMartin Duffy8 days4-0/+14
| | |
* | | fileapi: Handle unused imported libraries with missing IMPORTED_IMPLIBCraig Scott14 days5-2/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake 4.1 and earlier did not issue an error if an imported shared library target was missing an IMPORTED_IMPLIB property and nothing used that imported library. There was no code path checking for the CMP0111 NEW behavior. Since b626843d71 (fileAPI: Output all INTERFACE and IMPORTED targets, 2025-09-13), we now include all imported targets in the file API replies, and that does trigger that check. We need to tolerate such imported targets to preserve backward compatibility, and to avoid issuing errors for problems in targets likely to be coming from outside the project and beyond the developer's control. Fixes: #27496
* | | cmake_file_api: Improve error message consistencyMatthew Woehlke2025-12-011-6/+6
| | | | | | | | | | | | | | | | | | Remove literal text "subcommand" from error messages. This addresses the other use of this and improves consistency (see preceding commit). Also, omit some unnecessary articles, which also improves consistency.
* | | Tests/RunCMake: Match dots more precisely, part 3AJIOB2025-10-201-1/+1
| | |
* | | Tests/RunCMake: Match xxx.cmake file name more preciselyAJIOB2025-10-165-5/+5
| | |
* | | fileAPI: Add direct dependencies to target codemodel filesCraig Scott2025-10-0780-67/+2200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the following new arrays, which together capture all direct dependencies and interface dependencies of a target: - linkLibraries - interfaceLinkLibraries - compileDependencies - interfaceCompileDependencies - objectDependencies - orderDependencies Fixes: #21995, #25213
* | | fileAPI: Add test coverage for interface direct and genex contextsCraig Scott2025-10-0721-24/+1040
| | |
* | | fileAPI: Fix wrong linking relationship in symbolic library testCraig Scott2025-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit 62a1d3e7f1 (FileAPI: Add symbolic property to targets, 2025-09-30) contained an error in added test code where a wrong library was linked. The naming of the targets involved make clear the intended linking relationship, but nothing in the test was actually testing or relying on that relationship so it went undetected.
* | | MSVC: Always define a character setAJIOB2025-10-0748-125/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When targeting the MSVC ABI, define `_MBCS` by default if the project does not define `_SBCS` or `_UNICODE`. Visual Studio has long defined one of the three character set macros automatically. For consistency, define it when compiling for the MSVC ABI with other generators. Add policy CMP0204 for compatibility. Fixes: #27275
* | | FileAPI: Add symbolic property to targetsTaylor Sasser2025-10-0277-5/+273
| | |
* | | MSVC: Define _WINDLL consistently for shared librariesAJIOB2025-09-2917-40/+68
| | | | | | | | | | | | | | | | | | | | | | | | Visual Studio defines this automatically for `.dll` targets. For consistency, define it when compiling for the MSVC ABI with other generators. Add policy CMP0203 for compatibility. Fixes: #27253
* | | Tests/RunCMake/FileAPI: Fix whitespace in codemodel-v2 expectation dataAJIOB2025-09-292-46/+46
| | |
* | | fileAPI: Output all INTERFACE and IMPORTED targetsCraig Scott2025-09-2694-22/+722
| | | | | | | | | | | | Fixes: #27248
* | | Tests: Refactor RunCMake.FileAPI check script to support more argumentsBrad King2025-09-184-8/+15
| | |
* | | FindJsonCpp: Add JsonCpp_VERSIONPeter Kokot2025-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This also removes the JsonCpp_VERSION_STRING result variable, which doesn't need to be deprecated and further provided by the module as this is internal module. Issue: #27088
* | | Tests: choose an explicit FULL strategy in tests expecting itBen Boeckel2025-07-2912-39/+41
| | | | | | | | | | | | | | | | | | Since it can be set in the environment when running the test suite, guard tests which are sensitive to intermediate directory strategy changes with explicit settings.
* | | file API: Add JSON schema filesCraig Scott2025-07-268-1/+128
| | | | | | | | | | | | Fixes: #26987
* | | fileapi: Add codemodelVersion fields to target and directory objectsCraig Scott2025-07-131-14/+28
| | | | | | | | | | | | | | | | | | | | | This will allow JSON schemas for these two types of files to describe the version-specific content without requiring any outside information. Fixes: #27031
* | | FileAPI: Ignore unresolved FileSet generatorsVito Gamberini2025-07-093-2/+5
| | | | | | | | | | | | Fixes: #27054
* | | find_package: generate `find_package-v1` configure log eventsBen Boeckel2025-05-093-3/+3
| | | | | | | | | | | | | | | | | | | | | Since `find_package` is far more complex than other `find_*` commands, it gets its own event. Closes: #24833
* | | cmFindBase: Create `find-v1` configure log eventsBen Boeckel2025-04-284-3/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Record `find_` command events in the configure log, except `find_package` as it is far more complicated (and will have its own event kind). Note that testing only generates the events of interest, there is no verification. Also note that testing that the "found" to "notfound" transition causes an event is not testable because a truthy value in the variable skips any kind of verification or other logic beyond normalization. Co-Authored-by: Ryan Krattiger <ryan.krattiger@kitware.com> See: #24833
* | | fileapi: Generate partial reply when buildsystem generation failsBrad King2025-04-1437-0/+512
| | | | | | | | | | | | | | | | | | | | | In particular, the `configureLog` reply is useful for IDEs to read `CMakeFiles/CMakeConfigureLog.yaml` when configuration fails. Fixes: #26621
* | | Tests/RunCMake/FileAPI: Explicitly specify expected reply index prefixBrad King2025-04-1423-24/+24
|/ /
* | fileapi: Restrict reply object file path lengthsStefan Wüthrich2025-01-277-1/+24
| | | | | | | | Fixes: #23389
* | fileapi: Report DEBUGGER_WORKING_DIRECTORY in codemodel-v2 target objectsGarrett Campbell2024-12-1023-79/+98
| | | | | | | | Closes: #16478
* | Tests/RunCMake/FileAPI: Improve error on unexpected line numbersBrad King2024-12-062-1/+2
| |
* | Tests: Explicitly disable AIX_SHARED_LIBRARY_ARCHIVE in some casesBrad King2024-11-2312-39/+41
| | | | | | | | | | We do not want AIX shared library archives in test cases that rely on cross-platform appearance of `.so` files.
* | macOS: Do not pass any SDK/-isysroot to compilers by defaultBrad King2024-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On modern macOS, compiler wrappers like `/usr/bin/cc` automatically choose a SDK to pass via `-isysroot` to an underlying compiler from Xcode or the CommandLineTools. Other toolchains like Homebrew's `gcc-*` come with a default SDK too. Therefore, when targeting macOS, we no longer need to choose any SDK or pass an `-isysroot` flag by default. Update initialization of `CMAKE_OSX_SYSROOT` to be empty by default when targeting macOS. Fixes: #19180
* | Add support of "LINKER:" prefix for Windows executable creationMarc Chevrier2024-11-044-28/+4
|/ | | | | | The following variables now support the LINKER: prefix: * CMAKE_<LANG>_CREATE_WIN32_EXE * CMAKE_<LANG>_CREATE_CONSOLE_EXE
* fileapi: Add CONFIGURE_DEPENDS glob info to cmakeFiles objectArctic Lampyrid2024-03-192-2/+52
| | | | | Fixes: #25668 Co-authored-by: Brad King <brad.king@kitware.com>
* Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATORBrad King2024-01-292-3/+3
| | | | | | | | Evaluate generator expressions in these properties, as they apply to `add_test`, `add_custom_command`, and `add_custom_target`. The `CMAKE_CROSSCOMPILING_EMULATOR` variable's `try_run` behavior occurs at configure time and so cannot support generator expressions.
* fileapi: Add test launcher to codemodel-v2Ralf Habacker2023-12-1310-1/+244
| | | | | We do not need to bump the minor version because it was recently bumped by addition of the cross-compiling emulator as another kind of launcher.
* fileapi: Make launcher attribute 'arguments' optionalRalf Habacker2023-12-132-7/+9
| | | | | This was missed in commit 80a64c9ce5 (fileapi: Add cross-compiling emulator to codemodel-v2, 2023-11-11).
* fileapi: Add cross-compiling emulator to codemodel-v2Ralf Habacker2023-12-0110-3/+287
| | | | Fixes: #25408
* Merge topic 'fileapi-file-sets-base-dirs-relative'Brad King2023-11-202-5/+5
|\ | | | | | | | | | | | | | | | | a3a85524cd fileapi: Fix file sets' base directories relative to top source Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8977
| * fileapi: Fix file sets' base directories relative to top sourceKyle Edwards2023-11-172-5/+5
| | | | | | | | | | | | | | | | This field was added by commit b3e9fb67bb (file-api: support exporting file set information, 2022-11-03, v3.26.0-rc1~389^2) but the relative path convention used elsewhere was accidentally left out. Fixes: #25422
* | cmExperimental: remove the flag for C++ modulesBen Boeckel2023-10-022-0/+102
| | | | | | | | | | | | | | All the major compilers now have scheduled releases with support for scanning, so remove the experimental gate. Fixes: #18355
* | OrangeC: Add support for OrangeC compilerDavid Lindauer2023-09-2514-24/+24
| | | | | | | | | | | | | | Add compiler information modules. Update the test suite. Fixes: #25032 Co-authored-by: Brad King <brad.king@kitware.com>
* | CrayClang: Add support for this compilerRyan Krattiger2023-09-221-1/+1
| | | | | | | | | | | | Add `CrayClang` compiler ID for newer Cray compilers. Fixes: #25102
* | macOS: GNU toolchain: ensure framework, marked as SYSTEM, can be linkedMarc Chevrier2023-09-211-1/+1
| | | | | | | | Fixes: #25263
* | Tests: Fix FileAPI interface_exe testKyle Edwards2023-09-012-1/+42
| |
* | VS: Revert "Add CMake input files to ZERO_CHECK"Brad King2023-08-021-229/+0
| | | | | | | | | | | | | | | | | | | | | | Since commit df58dbb0e9 (VS: Add CMake input files to ZERO_CHECK, 2023-03-19, v3.27.0-rc1~157^2), projects that specify the same file both as input to `configure_file` and as the `MAIN_DEPENDENCY` of a custom command fail to configure. Revert the change pending further investigation. Add a test case demonstrating the problem. Issue: #24557 Fixes: #25149
* | cmake_file_api: New project commandCraig Scott2023-06-056-0/+100
| | | | | | | | | | | | | | | | Projects can use the new command to request file API replies for the current run. No query files are generated, the query is tracked internally. Replies are created in the file system at generation time in the usual way. Fixes: #24951
* | fileapi: Extend codemodel targets/compileGroups with Apple frameworksMarc Chevrier2023-05-1950-23/+802
| | | | | | | | Fixes: #19897
* | VS: Add CMake input files to ZERO_CHECKAlexander Neundorf2023-04-251-0/+214
|/ | | | | | | | | Add all cmake input files to the `ZERO_CHECK` project. Place files under `CMAKE_SOURCE_DIR` in a folder structure matching the directory structure. This way they are easier to find, and Visual Studio does not close them when reloading the project. Fixes: #24557
* 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