summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Restore implicit include directory extraction for adaptive relative pathsBrad King2023-01-122-4/+4
| | | | | | | | | | | | | | Update the logic added by commit ef41d49812 (Fix implicit include directory extraction for adaptive relative paths, 2019-04-08, v3.14.2~5^2) to account for the new `try_compile` work directory used for the ABI check since commit 2edf0fc6d7 (Modules: Use new keyword-dispatched try_compile signature, 2022-09-13, v3.25.0-rc1~144^2). Paths relative to the work directory will now have one more `../` in them, so update the test data to match. Fixes: #24279
* Merge topic 'try_compile-copy-config' into release-3.25Brad King2022-11-232-0/+9
|\ | | | | | | | | | | | | | | | | 80fc564dd7 try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Merge-request: !7948
| * try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATIONBrad King2022-11-222-0/+9
| | | | | | | | | | | | | | | | | | Since commit 0c141b0393 (try_compile: Record output location instead of reverse computing it, 2022-08-31, v3.25.0-rc1~154^2) we always look for the "Debug" configuration's output binary from the test project. Restore looking for the `CMAKE_TRY_COMPILE_CONFIGURATION`. Fixes: #24180
* | XCode: ensure LINK_LIBRARY genex is usable with XCODE_LINK_BUILD_PHASE_MODEMarc Chevrier2022-11-224-8/+74
|/ | | | Fixes: #24176
* CMP0141: Fix PCH REUSE_FROM when MSVC_DEBUG_INFORMATION_FORMAT is emptyBrad King2022-11-152-0/+7
| | | | | | | | | | | | Under the policy's NEW behavior, `[CMAKE_]MSVC_DEBUG_INFORMATION_FORMAT` may be explicitly set to an empty string to tell CMake not to add any flags for this abstraction. In this case, fall back to checking the language-wide flags as we do in the OLD behavior. This revises commit 183b9a9eca (CMP0141: Fix PCH REUSE_FROM under policy NEW behavior, 2022-10-31, v3.25.0-rc3~4^2). Issue: #24106
* msvc: bless MSVC 19.34 support for C++ modules as experimentalBen Boeckel2022-11-112-1/+3
| | | | Visual Studio 17.4 now contains official support for what CMake needs.
* block: Fix variable scope protection from modification by subdirectoriesBrad King2022-11-074-2/+34
| | | | | | | | | | | | | | | | | | | | | | When `cmStateSnapshot::RaiseScope` raises a variable in to a parent directory scope, it uses `GetBuildsystemDirectoryParent` to find the current top-most scope on the directory's stack. Since commit 3f4e5e8c3d (cmState: Return end snapshot for GetBuildsystemDirectoryParent., 2015-09-01, v3.4.0-rc1~100^2~1), that depends on the `DirectoryEnd` field in the directory's state. However, when variable-only scopes were added by commit 6954c8936f (cmState: Add a VariableScope snapshot type., 2015-08-01, v3.4.0-rc1~179^2~1), we neglected to account for the addition of that field by commit 52dbe654de (cmState: Record the end position of each directory., 2015-08-01, v3.4.0-rc1~251^2~1). Prior to commit 44a2f3f332 (Add new flow-control commands for variables and policies scopes management, 2022-08-05, v3.25.0-rc1~257^2) this problem went unnoticed because there was no way to have a variable scope at the top of a directory's stack while processing a subdirectory. Now the `block()/endblock()` commands enable the behavior, so fix tracking of a variable scope as the top-most scope in a directory. Fixes: #24138
* CMP0141: Fix PCH REUSE_FROM under policy NEW behaviorBrad King2022-10-314-1/+6
| | | | | | | | | | | Under the CMP0141 NEW behavior added by commit 0e96a20478 (MSVC: Add abstraction for debug information format, 2022-08-25, v3.25.0-rc1~142^2~1), the `-Zi` and `-ZI` flags do not appear in `CMAKE_<LANG>_FLAGS_<CONFIG>` anymore. Teach the PCH REUSE_FROM implementation to recognize the `EditAndContinue` and `ProgramDatabase` debug information formats through the policy's new abstraction. Fixes: #24106
* Tests: Drop redundant project init from RunCMake.PrecompileHeaders casesBrad King2022-10-3113-29/+19
| | | | | The `CMakeLists.txt` file already calls `cmake_minimum_required` and `project` before including each case's code.
* Merge topic 'vs-dotnetsdk-arm64' into release-3.25Brad King2022-10-311-2/+8
|\ | | | | | | | | | | | | 9a0ca7df67 Tests: Fix RunCMake.VsDotnetSdk with VS >= 17.3 on ARM64 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7842
| * Tests: Fix RunCMake.VsDotnetSdk with VS >= 17.3 on ARM64Anthony Roberts2022-10-281-2/+8
| | | | | | | | | | VS 17.3 provides an arm64-native version of the tool, but the test was looking for the x64 version.
* | Merge topic 'ninja-showIncludes-encoding' into release-3.25Brad King2022-10-3112-0/+104
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | a0d4e3bf34 cmGeneratedFileStream: Drop unused WriteRaw method 2e5af30ce0 Ninja: Match showIncludes dependencies using console output code page e1c1679148 cm_codecvt: Add support for the Windows console output code page 328c15189d cmGeneratedFileStream: Add support for a temporary alternate encoding Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7845
| * | Ninja: Match showIncludes dependencies using console output code pageBrad King2022-10-3012-0/+104
| |/ | | | | | | | | | | | | | | | | Generalize the fix from commit 37a279f8d1 (Ninja: Write msvc_deps_prefix as UTF-8 when console codepage is UTF-8, 2020-07-31, v3.19.0-rc1~349^2). `cl /showIncludes` output is encoded using the console output code page, so this is the byte sequence that Ninja must use to match its lines. Fixes: #24068
* | Xcode: Put object files in a place that Xcode cleansBrad King2022-10-287-8/+19
|/ | | | | | | | | 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
* Merge topic 'cmake-presets-workflow-arguments' into release-3.25Brad King2022-10-276-3/+46
|\ | | | | | | | | | | | | | | | | | | | | 7ecbe324b0 cmake --workflow: add --fresh option 7d9aa0f00c cmake::Workflow: Refactor to use enum class argument 322193afcd cmake --workflow: print usage and exit on unrecognized argument 70aef29427 cmake --workflow: print usage message Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7825
| * cmake --workflow: add --fresh optionKyle Edwards2022-10-263-3/+37
| | | | | | | | Fixes: #24073
| * cmake --workflow: print usage and exit on unrecognized argumentKyle Edwards2022-10-264-0/+9
| | | | | | | | Issue: #24073
* | Merge topic 'ninja-intl-paths' into release-3.25Brad King2022-10-274-0/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | a12050666c Tests: Add case for ninja with non-ascii chars 02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7833
| * | Tests: Add case for ninja with non-ascii charsBrad King2022-10-264-0/+22
| | | | | | | | | | | | Issue: #24089
* | | Merge topic 'try_compile-CMP0128' into release-3.25Brad King2022-10-251-4/+5
|\ \ \ | |/ / | | / | |/ |/| | | | | 90287792b6 Tests: Avoid running C++11 test on GNU < 4.7 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7821
| * Tests: Avoid running C++11 test on GNU < 4.7Brad King2022-10-241-4/+5
| | | | | | | | | | | | The test added in commit 50e90e2828 (try_compile: Honor CMP0128 setting in test project, 2022-10-18, v3.25.0-rc2~4^2) requires that the compiler support C++11 mode, so do not run it on GNU compilers that are too old.
* | Merge topic 'cmake-presets-output-junit' into release-3.25Brad King2022-10-1910-2/+66
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bea4ed5430 CTest: Add support for outputJUnitFile in presets 9270a02003 CMakePresets.json: Add outputJUnitFile to test presets schema 757786bb73 Tests: Add test for outputLogFile in CMakePresets.json b68c3596e7 CMakePresets.json: Disallow extra properties in test output schema Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !7806
| * | CTest: Add support for outputJUnitFile in presetsKyle Edwards2022-10-186-2/+34
| | | | | | | | | | | | Fixes: #22400
| * | Tests: Add test for outputLogFile in CMakePresets.jsonKyle Edwards2022-10-183-1/+12
| | |
| * | CMakePresets.json: Disallow extra properties in test output schemaKyle Edwards2022-10-184-0/+21
| | | | | | | | | | | | And add test for testOutputTruncation being unsupported.
* | | Merge topic 'try_compile-CMP0128' into release-3.25Brad King2022-10-195-0/+66
|\ \ \ | |/ / |/| / | |/ | | | | | | | | 50e90e2828 try_compile: Honor CMP0128 setting in test project Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !7803
| * try_compile: Honor CMP0128 setting in test projectBrad King2022-10-185-0/+66
| | | | | | | | | | | | | | | | | | Some projects pass a raw `-std=` flag to the compiler in the `try_compile` project. If they do not set CMP0128 to NEW, we should not append a `-std=` flag where we did not before the policy was added. Fixes: #24063
| * cmake: In -P mode ignore extra paths on the command lineRobert Maynard2022-07-223-0/+13
| | | | | | | | Fixes: #23748
* | Xcode: ensure framework with custom output directory can be consumedMarc Chevrier2022-10-142-0/+27
| | | | | | | | Fixes: #24046
* | Merge topic 'flang-implicit-link-info' into release-3.25Brad King2022-10-123-0/+46
|\ \ | | | | | | | | | | | | | | | | | | | | | 0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7781
| * | LLVMFlang: Add support for mixed-language linking with FortranBrad King2022-10-113-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parse implicit link information for this compiler to support mixed-language linking. This was missed by commit 85749766df (LLVMFlang: Add support for LLVM Flang, 2021-07-07, v3.24.0-rc1~86^2). Also activate mixed-language test cases that would have caught this. Issue: #22387
* | | Merge topic 'test-RunCMake.install'Brad King2022-10-111-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | e73470991f Tests: Loosen RunCMake.install directory symlink expected output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7775
| * | | Tests: Loosen RunCMake.install directory symlink expected outputBrad King2022-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The case added by commit 85f01a1ec2 (file(INSTALL): Improve formatting of symlink creation error, 2022-10-06) may print `Up-to-date:` or `Installing:` for the file inside a symlinked directory based on filesystem timestamp granularity. Since that output is not what the test intends to cover, simply accept either possibility.
* | | | Merge topic 'verify-header-sets-iwyu'Brad King2022-10-101-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6942234bf5 VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification file Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7762
| * | | | VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification fileDaniel Hannon2022-10-071-1/+1
| |/ / /
* | | | Merge topic 'cuda_sanitizer_false_positives'Brad King2022-10-101-0/+9
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 59fcbba65e ctest_memcheck: ignore false-positives in CUDA's compute-sanitizer Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7760
| * | | ctest_memcheck: ignore false-positives in CUDA's compute-sanitizerTobias Ribizel2022-10-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a list of false-positive messages from CUDA's compute-sanitizer to the CTest memcheck. Fixes: #24001
* | | | Merge topic 'clang-tidy-prefer-p-option'Brad King2022-10-073-0/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3f4e0839c4 clang-tidy: Don't append compiler commands if using -p Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7753
| * | | | clang-tidy: Don't append compiler commands if using -pCraig Scott2022-10-073-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the -p option is given to clang-tidy, it doesn't need the compile command line to be appended. It can get everything it needs from the compile_commands.json file in the directory specified with the -p option. When the compiler being used is not the system default compiler, clang-tidy has been observed to pick up the wrong headers when the compiler command line is given, but not if only the -p option is used. Therefore, don't append the compiler command line if -p is present in the <LANG>_CLANG_TIDY target property. Fixes: #24017
* | | | | Merge topic 'improve-symlink-error-reporting'Brad King2022-10-075-0/+40
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 569fb1893e file(INSTALL): Report "Installing:" for a symlink to a directory 1461ae4933 file(INSTALL): Clarify symlink vs dir conflict errors 85f01a1ec2 file(INSTALL): Improve formatting of symlink creation error aba48bd6ac cmSystemTools: Provide quiet link creation methods Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7706
| * | | | | file(INSTALL): Report "Installing:" for a symlink to a directoryJohn Parent2022-10-061-1/+1
| | | | | |
| * | | | | file(INSTALL): Clarify symlink vs dir conflict errorsJohn Parent2022-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify error reporting in scenario creating a symlink where a directory previously exists.
| * | | | | file(INSTALL): Improve formatting of symlink creation errorBrad King2022-10-065-0/+40
| | |/ / / | |/| | | | | | | | | | | | | Avoid printing two error messages. Format paths without wrapping.
* | | | | Merge topic 'automoc-skip-pch'Brad King2022-10-072-0/+33
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 681714ce20 AUTOMOC: Skip PCH when all sources files skip the PCH file too Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7759
| * | | | | AUTOMOC: Skip PCH when all sources files skip the PCH file tooCristian Adam2022-10-062-0/+33
| |/ / / / | | | | | | | | | | | | | | | Fixes: #23464
* | | | | Tests: Move TryCompile check module cases to RunCMake.Check*Brad King2022-10-0613-0/+226
| | | | | | | | | | | | | | | | | | | | The latter already have similar checks for similar modules.
* | | | | Tests: Clarify RunCMake.Check* case namesBrad King2022-10-0634-30/+30
|/ / / / | | | | | | | | | | | | | | | | | | | | Cases for `CheckSource{Compiles,Runs}` and `Check{Compiler,Linker}Flag` cover the modules with the language as a parameter, not the language-specific modules.
* | | | try_compile: Report build dir with --debug-trycompileMatthew Woehlke2022-10-063-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `--debug-trycompile` is enabled, issue a log (with trace) for every `try_compile` noting what directory is being used for the compilation. This will make it easier to find the corresponding artifacts. Closes: #24022
* | | | Tests: Remove stray debugging flag from RunCMake.CheckCompilerFlag caseBrad King2022-10-051-1/+1
|/ / /
* | | Merge topic 'ci-intel-compiler'Brad King2022-10-041-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | f391c1c269 gitlab-ci: add jobs testing Intel 2022.2.0 compilers on Linux 29e45a94b0 Tests: Teach RunCMake to ignore Intel Classic compiler deprecation warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7742