summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'use_folders_on_by_default'Brad King2022-11-087-0/+24
|\ | | | | | | | | | | | | | | d3acd22380 USE_FOLDERS: Treat as on by default Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Amir Masoud Abdol <amirmasoudabdol@icloud.com> Merge-request: !7830
| * USE_FOLDERS: Treat as on by defaultJuan Ramos2022-11-087-0/+24
| | | | | | | | | | | | | | Add a policy to treat the `USE_FOLDERS` global property as ON by default if it is not set. Fixes: #21695
* | Merge topic 'test-intel-remarks'Brad King2022-11-081-0/+1
|\ \ | | | | | | | | | | | | | | | | | | b2d030e8fe Tests: Teach RunCMake to ignore Intel -Rdebug-disables-optimization remarks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7366
| * | Tests: Teach RunCMake to ignore Intel -Rdebug-disables-optimization remarksBrad King2022-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Intel compiler may remark: icpx: remark: Note that use of '-g' without any optimization-level option will turn off most compiler optimizations similar to use of '-O0' [-Rdebug-disables-optimization] Teach RunCMake to drop such incidental lines before matching against expected output.
* | | Merge topic 'googletest-addtests-skipped'Brad King2022-11-083-1/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | f54963e60f GoogleTest: Reports skipped test with gtest_add_tests Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7868
| * | | GoogleTest: Reports skipped test with gtest_add_testsDavidPerretSN2022-11-073-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | Skipped GTests were reported as success when tests where added with gtest_add_tests. This fixes this behaviour. Fixes: #24130
* | | | Merge topic 'find-version-vars'Brad King2022-11-081-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9e3f1723ff Find{BZip2,LibLZMA,ZLIB}: use *_VERSION as modern CMake Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Craig Scott <craig.scott@crascit.com> Merge-request: !7877
| * | | | Find{BZip2,LibLZMA,ZLIB}: use *_VERSION as modern CMakeMichael Hirsch2022-11-071-2/+2
| |/ / / | | | | | | | | | | | | The old *_VERSION_STRING is silently left set for backward compat.
* | | | Merge topic 'block-var-scope'Brad King2022-11-084-2/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 96ddcbee60 cmState: Clarify name of member tracking the active scope in a directory cb53d9309e block: Fix variable scope protection from modification by subdirectories Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7885
| * | | | 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
| * | | | Merge topic 'correct_nvptxcompiler_not_linking_to_threads' into release-3.25Brad King2022-11-034-0/+33
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 62f13ed588 FindCUDAToolkit: Restore usage from multiple directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7859
* | \ \ \ \ Merge topic 'ExternalProject-INSTALL_BYPRODUCTS'Brad King2022-11-072-0/+40
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8c6b2928f4 ExternalProject: Add `INSTALL_BYPRODUCTS` option 6d6baffb85 Tests: Fix ExternalLibraryWithSubstitution test 4bcfff2df3 ExternalProject: Clarify `BYPRODUCTS` docs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7866
| * | | | | | ExternalProject: Add `INSTALL_BYPRODUCTS` optionAlois Klink2022-11-051-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an `INSTALL_BYPRODUCTS` option to `ExternalProject_Add` that can be used to declare that files are `BYPRODUCTS` of the ExternalProject install step. This is often required by the Ninja generator to explicitly declare dependencies. Previously, many users used `BUILD_BYPRODUCTS`, even if their files were created by the install step, not the build step. This commit essentially just copies the code for `BUILD_BYPRODUCTS`. Fixes: #24120 Fixes: #23056
| * | | | | | Tests: Fix ExternalLibraryWithSubstitution testAlois Klink2022-11-032-0/+11
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalLibraryWithSubstitution test should test whether BUILD_BYPRODUCTS supports <BUILD_DIR> and other ExternalProject placeholder tokens. However, it's not hooked up correctly, and therefore isn't properly tested. This commit links it to an executable, to confirm whether it's possible to use the BUILD_BYPRODUCT in the Ninja generator. Fixes: commit 86032ae0eb (ExternalProject: Replace placeholder tokens in BYPRODUCTS, 2015-03-06)
* | | | | | Merge topic 'CheckCompilerFlag-Swift'Brad King2022-11-073-1/+27
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2d5403ecaa CheckCompilerFlag: Add Swift Support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7865
| * | | | | CheckCompilerFlag: Add Swift SupportEvan Wilde2022-11-043-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plumb through Swift `check_compiler_flag` support. Add tests to check that valid flags work and invalid flags don't.
* | | | | | Merge topic 'correct_nvptxcompiler_not_linking_to_threads'Brad King2022-11-034-0/+33
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 62f13ed588 FindCUDAToolkit: Restore usage from multiple directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7859
| * | | | | FindCUDAToolkit: Restore usage from multiple directoriesRobert Maynard2022-11-024-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #24119
* | | | | | Merge topic 'xcode-swift-include-dirs'Brad King2022-11-035-0/+8
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cb4e6702b2 Xcode: Implement Swift include directories e1ccab12d7 Xcode: Restore Swift framework search directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7858
| * | | | | Xcode: Implement Swift include directoriesBrad King2022-11-025-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Populate Xcode's `SWIFT_INCLUDE_PATHS` build setting with the target-wide include directories. Issue: #24116
* | | | | | Tests: Improve GeneratorExpression SHELL_PATH case robustness on MSYS 1.0Brad King2022-11-022-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit ca6ba3fee5 (Genex: Add a SHELL_PATH expression, 2015-09-24, v3.4.0-rc1~37^2) and commit 21da25d2a8 (Tests: Generalize GeneratorExpression MSYS path conversion workaround, 2019-03-11, v3.15.0-rc1~407^2~1) we use a prefix string to prevent the MSYS 1.0 shell from converting absolute paths of the form `/c/...` to windows-style paths. In the newer `mingw.osdn.io` distribution of MSYS 1.0, the `bash` shell now also converts paths that appear after `:`. We have no way to add a prefix string in that context, so perform the test's check of the `SHELL_PATH` genex value at generate time instead.
* | | | | | Tests: Improve RunCMake.GetPrerequisites sample executable selectionBrad King2022-11-023-3/+5
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get the runtime dependencies of an executable just built by the toolchain with which tests are running. Previously we used the `cmake` binary itself, but that might have been built for a different ABI than the tested binutils support.
* | | | | Merge topic 'compile-commands-output-field'Brad King2022-11-011-2/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 887a8874c3 EXPORT_COMPILE_COMMANDS: add `output` field Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7844
| * | | | | EXPORT_COMPILE_COMMANDS: add `output` fieldBen Boeckel2022-10-281-2/+4
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also write for all configurations from multi-config generators. This field was added in the Clang 5 documentation and not present in the Clang 4 documentation (sometime between Dec 2016 and Mar 2017 according to `web.archive.org`).
* | | | | Merge topic 'test-objc'Brad King2022-11-014-68/+57
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bb2370842f Tests: Simplify RunCMake.try_compile compiler inspection 1abcb094a7 Tests: Fix logic to enable RunCMake.try_compile OBJC/OBJCXX cases b641a80d55 Tests: Factor out a CMake_TEST_OBJC variable for OBJC/OBJCXX test conditions Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7855
| * | | | | Tests: Simplify RunCMake.try_compile compiler inspectionBrad King2022-10-313-48/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect the compiler id, version, and default standard level in the test's inspection step rather than passing it all in from the host CMake build's results. This avoids repeating details not known to older versions of CMake, and shortens the code.
| * | | | | Tests: Fix logic to enable RunCMake.try_compile OBJC/OBJCXX casesBrad King2022-10-313-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake itself does not enable the OBJC/OBJCXX languages, so the `CMAKE_OBJ{C,CXX}_STANDARD_DEFAULT` variables are never defined. Detect them inside the test instead.
| * | | | | Tests: Factor out a CMake_TEST_OBJC variable for OBJC/OBJCXX test conditionsBrad King2022-10-312-9/+17
| | | | | |
* | | | | | Merge topic 'test-eol'Brad King2022-11-012-3/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4180159758 Tests: Provide RunCMake.CommandLine compare_files data more robustly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7852
| * | | | | | Tests: Provide RunCMake.CommandLine compare_files data more robustlyBrad King2022-10-312-3/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `lf` and `crlf` files need to have exact LF and CRLF newlines, respectively. Previously we used the Git `eol` attribute for this, but occasionally the Git work tree ends up without the conversion. It is unclear why that happens, so try to avoid the problem by treating their content as binary instead.
* | | | | | Merge topic 'lcc-cleanup'Brad King2022-11-011-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a2943d9ec8 Tests: Teach CheckSourceTree test to clean up more specific known files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7850
| * | | | | | Tests: Teach CheckSourceTree test to clean up more specific known filesBrad King2022-10-311-0/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | Extend the list of files added by commit 2de1458c3c (Tests: Teach CheckSourceTree test to clean up some specific known files, 2022-10-13).
* | | | | | Merge topic 'cmp0141-pch-reuse'Brad King2022-11-0116-30/+25
|\ \ \ \ \ \ | |_|/ / / / |/| | / / / | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 183b9a9eca CMP0141: Fix PCH REUSE_FROM under policy NEW behavior 4d13f472a2 Tests: Drop redundant project init from RunCMake.PrecompileHeaders cases 2e65fe92db cmLocalGenerator: Clarify name of local PDB type variable 17096aeba8 cmLocalGenerator: Factor out helper to compute MSVC_DEBUG_INFORMATION_FORMAT Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7854
| * | | | 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
| * \ \ \ 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
* | \ \ \ \ Merge topic 'tests-FindPkgConfig'Brad King2022-10-313-31/+47
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc8f8d82f2 Tests: Disable parts of FindPkgConfig tests without wide supported 96d7b5a6d1 Tests: pkg_check_modules() doesn't allow spaces in a moduleSpec afd1b28cea Tests: Disable broken FindPkgConfig test cases for Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7847
| * | | | | | Tests: Disable parts of FindPkgConfig tests without wide supportedCraig Scott2022-10-291-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some pkg-config implementations on Windows don't return the same results as those on other platforms. They appear to be bugs in those implementations, the one that comes with Strawberry perl being one case where this was observed. The handling of Libs and Cflags entries is incomplete, resulting in some flags not being reported where they should be. These are faults in the pkg-config implementation, not in CMake or its tests, so we disable those parts of the tests on Windows to avoid reporting false positives.
| * | | | | | Tests: pkg_check_modules() doesn't allow spaces in a moduleSpecCraig Scott2022-10-291-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of pkg_check_modules() is a little ambiguous about whether spaces are allowed in a moduleSpec that includes a version constraint. All examples in the docs do not have spaces, so it could be claimed spaces are not supported. The tests fail on Windows when spaces are included, likely because some pkg-config implementations don't support that. Update the tests to not assume spaces are supported as part of a moduleSpec.
| * | | | | | Tests: Disable broken FindPkgConfig test cases for WindowsCraig Scott2022-10-291-6/+11
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows implementation of these tests have been found to not handle Windows paths and path separators properly in a number of areas. The whole approach taken in these tests appears dubious, so they may need to be significantly rewritten. Disable them until then so we don't get false positives. Issue: #22031
* | | | | | Merge topic 'ewilde/swift-output-file-map-logic'Brad King2022-10-312-0/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e88509d0e8 Swift: Omit output-file-map when used as a linker Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7835
| * | | | | | Swift: Omit output-file-map when used as a linkerEvan Wilde2022-10-282-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swift is used as the linker for non-swift files because it needs to pull files like swiftrt.o in when swift symbols are present to ensure that the swift runtime is linked. The swift driver uses clang as the underlying linker, which pulls in crtbegin.o and friends when appropriate, so using Swift as a linker for C/C++ libraries is fine. The output-file-map was getting passed to all Swift invocations, regardless of whether or not we generated one. This patch changes it so that we only include the output-file-map in the Swift compiler invocation if we have actually generated the file.
* | | | | | | Merge topic 'vs-CLRSupport'Brad King2022-10-319-0/+127
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eef13a4b33 VS: Add COMMON_LANGUAGE_RUNTIME support for "netcore" 0815329dbc Help: Format COMMON_LANGUAGE_RUNTIME values as a definition list Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7807
| * | | | | | | VS: Add COMMON_LANGUAGE_RUNTIME support for "netcore"ζeh Matt2022-10-289-0/+127
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate `CLRSupport` for Visual Studio projects. Fixes: #22054
* | | | | | | Merge topic 'vs-dotnetsdk-arm64'Brad 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'Brad 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
* | | | | | Merge topic 'xcode-obj-dir'Brad King2022-10-317-8/+19
|\ \ \ \ \ \ | |_|/ / / / |/| | | / / | | |_|/ / | |/| | | | | | | | | | | | | 024e3d2bf6 Xcode: Put object files in a place that Xcode cleans Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7843