summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Add deprecation warnings for policies CMP0102 and belowBrad King2022-06-142-0/+20
| | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.17 and below to encourage projects to port away from setting policies to OLD.
* Tests: Add Fortran test C function prototypeWilliam R. Dieter2022-06-141-0/+1
| | | | | | | | One of three Fortran/C interface test functions is missing a prototype, which causes warnings and sometimes errors depending on compiler versions and flags. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* Utilities/Release: Add windows-arm64 package to file tableBrad King2022-06-131-0/+2
|
* Merge topic 'fetchcontent-global-targets' into release-3.24Brad King2022-06-118-0/+92
|\ | | | | | | | | | | | | | | | | f19b48e0b8 FetchContent: Honor CMAKE_FIND_PACKAGE_TARGETS_GLOBAL 1305bade56 Help: Add missing version directive for find_package() GLOBAL keyword Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7347
| * FetchContent: Honor CMAKE_FIND_PACKAGE_TARGETS_GLOBALCraig Scott2022-06-108-0/+92
| | | | | | Fixes: #23606
* | Merge topic 'xcode-14' into release-3.24Brad King2022-06-111-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 627c08e28b Tests: Teach RunCMake to ignore Xcode DVTSDK warnings ab40020b17 Xcode: Suppress "Run Script" build phase warning during compiler id 89e1113e0c Xcode: Use ad-hoc signing during compiler id on macOS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7350
| * | Tests: Teach RunCMake to ignore Xcode DVTSDK warningsBrad King2022-06-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | On some Xcode versions, `xcodebuild` may warn: ... xcodebuild[...] [MT] DVTSDK: Warning: SDK path collision for path ... Teach RunCMake to drop such incidental lines before matching against expected output.
| * | Merge branch 'ci-xcode-13.3' into release-3.22Brad King2022-04-261-0/+1
| |\ \ | | | | | | | | | | | | Merge-request: !7204
| | * | Tests: Ignore all classes in Xcode internal objc warningsGregor Jasny2022-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | Xcode on Apple Silicon warns not only about AMSupportURL classes but also many more.
| | * | Tests: Teach RunCMake to ignore Xcode extension point warningsBrad King2022-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some Xcode versions, `xcodebuild` may warn: ... xcodebuild[...] Requested but did not find extension point with identifier ... Teach RunCMake to drop such incidental lines before matching against expected output.
* | | | Merge topic 'ExternalProject-stamp-genex' into release-3.24Brad King2022-06-102-0/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c111d440ce ExternalProject: Express per-config step stamp file paths using CONFIG genex Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7341
| * | | | ExternalProject: Express per-config step stamp file paths using CONFIG genexBrad King2022-06-082-0/+16
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalProject module has long used the generator-specific placeholder in the `${CMAKE_CFG_INTDIR}` variable to express per-config stamp file paths in multi-config generators. Now that most generators support generator expressions in custom command outputs, we can use the `$<CONFIG>` genex instead. In particular, this fixes cross-config `BUILD_BYPRODUCTS` with the Ninja Multi-Config generator. Fixes: #23595
* | | | CheckIPOSupported: Compile check using flags of calling projectBrad King2022-06-109-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward `CMAKE_<LANG>_FLAGS` and `CMAKE_<LANG>_FLAGS_DEBUG` from the calling project into the test project. The set of flags may affect the availability of IPO support. Since this may change the result of the check for existing projects, add a policy for compatibility. This was discovered after commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86 and x64, 2022-05-24) introduced policy CMP0138 to switch our default for MSVC's debug info flag. The `-ZI` flag is incompatible with the `-GL` flag used for IPO, so CMP0138 was reverted pending future work on an alternative solution. Re-use the CMP0138 policy number for this change to CheckIPOSupported instead. Fixes: #23607
* | | | MSVC: Revert "Default to -ZI instead of /Zi for x86 and x64"Brad King2022-06-097-37/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86 and x64, 2022-05-24). The `-ZI` flag is incompatible with the `-GL` flag used for IPO, and so is not an unconditionally better default. Revert the change pending future design of a first-class setting for MSVC debug info format that can be automatically reconciled with IPO settings. That commit introduced policy CMP0138, but we already have later policy numbers used too. Leave placeholder text to avoid policy renumbering. Issue: #23607, #10189
* | | Merge topic 'ci-ispc'Brad King2022-06-071-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d14349c907 ci: Enable ISPC tests on Linux, Windows, and macOS nightly builds 49996faaac ci: remove ISPC from the Fedora CI image 3e791592ad gitlab-ci: init macOS and Windows jobs with per-CMAKE_CONFIGURATION scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7336
| * | | ci: remove ISPC from the Fedora CI imageBrad King2022-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 5ece12b7e4 (gitlab-ci: add ISPC to the Fedora CI image, 2020-08-18, v3.19.0-rc1~244^2). Later we will download ISPC in specific jobs. Update a `RunCMake.NinjaMultiConfig` test expectation to account for a change to the Qt deployed on Fedora 36.
* | | | Merge topic 'print-sources'Brad King2022-06-0715-0/+136
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d8dcfa7776 Tests: Add tests for CMakePrintHelpers b7ddfcfe08 cmake_print_properties(): Update grammar docs e52b9e1270 PrintHelpers: Document argument order restriction d87ed4d88f PrintHelpers: Fix indentation 5fa70e1738 PrintHelpers: Rewrite a few more error messages 2579503f45 PrintHelpers: Fix target SOURCES property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7331
| * | | | Tests: Add tests for CMakePrintHelpersFeRD (Frank Dana)2022-06-0615-0/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add three tests in Tests/RunCMake/PrintHelpers, meant to verify basic functionality of the module. Tests are: * Variables: Test the results of a cmake_print_variables() call on two variables set within the test script. * Properties: Test cmake_print_properties() calls on a pair of SOURCES and a pair of TARGETS, printing some basic properties. * PropertiesSources: Specifically verify the results of a cmake_print_properties() call for the SOURCES property of a TARGET. Prior to the fix introduced alongside these tests, it was a known bug that such a request caused a FATAL_ERROR.
* | | | | Merge topic 'tests-java-compiler-var'Brad King2022-06-071-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fdeb237934 Tests: Use Java_JAVAC_EXECUTABLE variable consistently Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7327
| * | | | | Tests: Use Java_JAVAC_EXECUTABLE variable consistentlyCraig Scott2022-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain specific scenarios, it is possible to end up with JAVA_COMPILE being unset, but Java_JAVAC_EXECUTABLE being set. This typically occurs when running different versions of CMake in the same build directory without deleting the CMakeCache.txt each time. This can result in an obscure error about the wrong number of arguments to the get_filename_component() command, but the real cause is the JAVA_COMPILE variable being unset. The JAVA_COMPILE variable is only set by the FindJava module, and it is a legacy variable that has been superceded by Java_JAVAC_EXECUTABLE. The latter is what the if() expression tests, so use that same variable in the body of the if() block for consistency and to avoid the above problem.
* | | | | | Merge topic 'ext_disabled'Brad King2022-06-071-5/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d5014741c9 Tests/CompileFeatures: Fix CMP0128OldSameStandard with default OFF Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7328
| * | | | | Tests/CompileFeatures: Fix CMP0128OldSameStandard with default OFFRaul Tambre2022-06-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With CMP0128 OLD compiler extensions are enabled by default regardless of the compiler's default. Fix the test to always check for the extension flag as it was intended to. Fixes: 4a0485be7f4ab06201c478f5a46111ab1e8e773e (cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic, 2021-04-29)
* | | | | | Merge topic 'if-command-PATH_EQUAL'Brad King2022-06-0610-0/+72
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be4b9e10af if command: Add PATH_EQUAL operator Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7321
| * | | | | if command: Add PATH_EQUAL operatorMarc Chevrier2022-06-0310-0/+72
| | |/ / / | |/| | |
* | | | | Merge topic 'test-ExternalProject-fs-delay'Brad King2022-06-041-1/+8
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | e46e4ee96a Tests: Fix RunCMake.ExternalProject filesystem delay for Borland Makefiles Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7323
| * | | | Tests: Fix RunCMake.ExternalProject filesystem delay for Borland MakefilesBrad King2022-06-031-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our 1.125s delay does not seem to be long enough to be reliable with the Borland "make" tool. Use a longer delay for Borland and Watcom. Follow the pattern from commit 67040500ea (Tests: Fix RunCMake.BuildDepends filesystem delay for Borland Makefiles, 2015-09-25, v3.4.0-rc1~38^2).
* | | | | Merge topic 'genex-PATH_EQUAL'Brad King2022-06-039-0/+92
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4d1883df11 Genex-PATH_EQUAL: path comparison Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7309
| * | | | | Genex-PATH_EQUAL: path comparisonMarc Chevrier2022-06-019-0/+92
| |/ / / / | | | | | | | | | | | | | | | To complete issue #23498
* | | | | FetchContent: Respect the CMP0135 policy settingCraig Scott2022-06-025-8/+49
|/ / / / | | | | | | | | Fixes: #23560
* | | | Genex-PATH: path handlingMarc Chevrier2022-05-3127-0/+1155
| | | | | | | | | | | | | | | | Fixes: #23498
* | | | Merge topic 'msvc-compilers-default-to-ZI'Brad King2022-05-277-0/+37
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5fcadc481e MSVC: Default to -ZI instead of /Zi for x86 and x64 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7295
| * | | | MSVC: Default to -ZI instead of /Zi for x86 and x64Glen Chung2022-05-267-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a policy for compatibility. For more information, see [1]. [1] https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170 Fixes: #10189
* | | | | VERIFY_INTERFACE_HEADER_SETS: Add property for list of header setsKyle Edwards2022-05-256-0/+33
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new property, INTERFACE_HEADER_SETS_TO_VERIFY, which contains a list of header sets that should be verified by VERIFY_INTERFACE_HEADER_SETS. Fixes: #23522
* | | | Merge topic 'dependency-providers'Brad King2022-05-2538-0/+286
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2aa83fa15b Dependency providers: Add find_package and FetchContent support 8a28368feb FetchContent: Don't discard non-empty SOURCE_DIR and BINARY_DIR 8ce9bb8a0c FetchContent: Don't leak internal variables 74a6ddc339 cmFindPackageCommand: Handle Makefile variable definitions more robustly Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com> Merge-request: !7276
| * | | Dependency providers: Add find_package and FetchContent supportCraig Scott2022-05-2438-0/+286
| | | | | | | | | | | | Fixes: #22619
* | | | Merge topic 'findvulkan-moltenvk'Brad King2022-05-242-4/+35
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d9b4264cb8 FindVulkan: Add component for `MoltenVK` 10a6bb16bb FindVulkan: Mark test target with `cxx_std_11` to avoid AppleClang warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7286
| * | | | FindVulkan: Add component for `MoltenVK`MACHIZAUD Andréa2022-05-222-4/+31
| | | | |
| * | | | FindVulkan: Mark test target with `cxx_std_11` to avoid AppleClang warningsMACHIZAUD Andréa2022-05-221-0/+4
| | | | |
* | | | | Merge topic 'ci-fedora-36'Brad King2022-05-242-2/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ef6a7921e5 gitlab-ci: use Fedora 36 images and environments 483ff3b903 ci: update Linux image to Fedora 36 13c5153ccd ci: make rvm version comments consistent 6c08dd972c clang-tidy: suppress `google-readability-casting` lint 17b7bbf2a0 clang-tidy: suppress new `readability-identifier-length` lint 16e6e4e7dd cmFileCommand: remove an unnecessary cast b89c085237 clang-tidy: fix `readability-static-definition-in-anonymous-namespace` lints c8c9d7de03 clang-tidy: fix `bugprone-exception-escape` lints ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7271
| * | | | | clang-tidy: address `google-readability-casting` lintsBen Boeckel2022-05-242-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | At least those involving `static_cast`.
* | | | | | Merge topic 'pkgconfig-static-libs'Brad King2022-05-237-91/+230
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 020976d637 FindPkgConfig: Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET. 3c5cc79adb Tests: De-duplicate some code in RunCMake.FindPkgConfig 5cfbc76371 FindPkgConfig: Fix parsing of backslash-escaped spaces in pkg-config output Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7070
| * | | | | FindPkgConfig: Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET.Alex Birch2022-05-207-72/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add LINK_LIBRARIES test to demonstrate static linking of transitive dependencies. Add STATIC_TARGET argument to pkg_check_modules() and pkg_search_module(). Influences the properties of target produced by IMPORTED_TARGET. When enabled: target's properties will be populated from <XXX>_STATIC_* variables instead of from <XXX>_* variables. Update existing tests concerning properties of targets produced via IMPORTED_TARGET, to test STATIC_TARGET variant too. Update existing tests concerning <XXX>_* variables to test <XXX>_STATIC_* variables too. Breaking changes to pkg_check_modules() and pkg_search_module(): - Variables CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES can no longer be used to influence library lookup (i.e. the internal call to find_library()), because FindPkgConfig now internally relies on these variables to differentiate between shared and static library lookup. Prefer CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX, or CMAKE_STATIC_LIBRARY_PREFIX + CMAKE_STATIC_LIBRARY_SUFFIX, depending on whether you wish to impact static or shared lookup. - <XXX>_LINK_LIBRARIES will now be populated only with libraries located via CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX match - <XXX>_STATIC_LIBRARIES now processes -framework options - <XXX>_STATIC_LDFLAGS_OTHER now processes -framework options - <XXX>_STATIC_CFLAGS_OTHER now processes -isystem options - <XXX>_STATIC_INCLUDE_DIRS now processes -isystem options Fixes: #21714
| * | | | | Tests: De-duplicate some code in RunCMake.FindPkgConfigAlex Birch2022-05-201-8/+14
| | | | | |
| * | | | | FindPkgConfig: Fix parsing of backslash-escaped spaces in pkg-config outputAlex Birch2022-05-123-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat backslash-escaped spaces as "space within argument" rather than "space delimiting arguments". Update our `FindPkgConfig_LIBRARY_PATH` test case to escape spaces in the path, and run it unconditionally.
* | | | | | Merge topic 'vs-system-include'Brad King2022-05-202-4/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7a2496daad VS: Add support for SYSTEM include directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7238
| * | | | | | VS: Add support for SYSTEM include directoriesJosiah Bills2022-05-182-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #17904
* | | | | | | Merge topic 'win_arm64_native_toolchain'Brad King2022-05-201-2/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af6928ce92 VS: ARM64 as default toolset architecture for ARM64 host Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7264
| * | | | | | | VS: ARM64 as default toolset architecture for ARM64 hostNiyas Sait2022-05-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Visual Studio 2022 17 Preview introduced a native ARM64 toolchain.
* | | | | | | | Merge topic 'findvulkan-improvements'Brad King2022-05-204-2/+92
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7974fcd1a7 FindVulkan: remove noop on CMAKE_MODULE_PATH in tests acdb5fe0e8 FindVulkan: Add component for `glslc` and `glslangValidator` 998ee49779 FindVulkan: ensure policy CMP0057 is NEW to use `IN_LIST` with `if()` 9f8720e74c FindVulkan: Add component for `glslang` 8d133f49e3 FindVulkan: Add component for `SPIRV-Tools` 6e4d20921d FindVulkan: Add component for `shaderc_combined` 2f46b8d723 FindVulkan: Move `mark_as_advanced` right after `find_*` calls. 08a420af4a FindVulkan: Factorize code for library/executable search Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7225
| * | | | | | | FindVulkan: remove noop on CMAKE_MODULE_PATH in testsMACHIZAUD Andréa2022-05-181-1/+0
| | | | | | | |