summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchainRobert Maynard2020-05-213-0/+21
| | | | | | | | | | | | | | | | Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library selection flags by default. To maintain backwards compatibility the default CUDA runtime library needs to be computed based on what libraries are found on the initial compiler invocation. For example a toolchain could establish initial flags that have all CUDA compilations using the runtime version, and if we don't detect this we will try to link to both the static and shared runtime. Co-Author: Brad King <brad.king@kitware.com> Fixes: #20708
* Merge topic 'fix-cache-args-file-to-dep-list' into release-3.17Brad King2020-05-137-0/+48
|\ | | | | | | | | | | | | 0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4710
| * ExternalProject: expose _ep_cache_args_script to the callerBen Boeckel2020-05-127-0/+48
| | | | | | | | | | | | | | This is needed so that the caller can add a dependency on the cache file. Fixes: #20668
* | Merge topic 'vs-pch-compile-opts' into release-3.17Brad King2020-05-121-0/+3
|\ \ | | | | | | | | | | | | | | | | | | 6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4734
| * | VS: Fix using PCH from source with COMPILE_OPTIONSBrad King2020-05-111-0/+3
| | | | | | | | | | | | | | | | | | | | | If a source file gets per-source flags from both PCH and custom `COMPILE_OPTIONS`, combine them correctly. Fixes: #20694, #20456
* | | FindPython: ensure any specified version is correctly handledMarc Chevrier2020-05-072-0/+149
| | | | | | | | | | | | Fixes: #20674
* | | Merge topic 'FindPkgConfig-isystem' into release-3.17Brad King2020-05-061-1/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e9d93c3731 Help: Add 3.17 release note for FindPkgConfig '-isystem' fix dfaaae67a3 Merge branch 'backport-3.16-FindPkgConfig-isystem' 4d446c68d1 FindPkgConfig: also handle "-isystem" prefixes for include directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4693
| * \ \ Merge branch 'backport-3.16-FindPkgConfig-isystem'Brad King2020-05-061-1/+21
| |\ \ \ | | |_|/ | |/| |
| | * | FindPkgConfig: also handle "-isystem" prefixes for include directoriesRolf Eike Beer2020-05-051-1/+21
| | |/ | | | | | | | | | Fixes: #20652
* | | Merge topic 'CheckLanguage-cuda-host' into release-3.17Brad King2020-05-061-9/+9
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !4711
| * | CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILERBrad King2020-05-051-9/+9
| |/ | | | | | | | | | | | | | | | | | | | | Fix the condition added by commit fada8cbfd6 (CheckLanguage: Report CMAKE_CUDA_HOST_COMPILER if needed for compilation, 2019-05-31, v3.15.0-rc1~12^2) to activate CUDA-specific logic. The old condition had worked in our test suite only by accident because the loop variable used in the test happened to be the name and value that the old condition used! Update the test to use a different name. Fixes: #19013
* | Merge topic 'pch-genex-absolute' into release-3.17Brad King2020-04-284-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | b204bae261 target_precompile_headers: Fix documented example using genex Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Cristian Adam <cristian.adam@gmail.com> Merge-request: !4678
| * | target_precompile_headers: Fix documented example using genexBrad King2020-04-274-2/+6
| |/ | | | | | | | | | | | | | | When the path to a header file is specified using a generator expression, evaluation of the genex must produce an absolute path. Update our documented example and add a test covering the case. Fixes: #20617
| * target_link_libraries: Fix regression in case of $<CONFIG> genexBrad King2020-03-304-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit b8626261e9 (Precompile headers: Add methods to generate PCH sources, 2019-07-13, v3.16.0-rc1~182^2~4) we look up source files for a target using an upper-case configuration even though an original-case name is sufficient. Since commit 36ded610af (PCH: Generate sources during Compute step, 2019-10-05, v3.16.0-rc1~2^2) the source file lookup is the first time we compute many on-demand structures that depend on the configuration name. This caused the `$<CONFIG>` generator expression to evaluate to the upper-case configuration name in some cases where we used original-case before. Fix this by switching the source file lookup to the original-case config name. Add a test covering the symptom that led to the discovery of this problem. Fixes: #20517
* | Merge topic 'FindPython-fix-python-compiler-validation' into release-3.17Brad King2020-04-244-4/+113
|\ \ | | | | | | | | | | | | | | | | | | f39da773ee FindPython: fix python compiler validation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4655
| * | FindPython: fix python compiler validationMarc Chevrier2020-04-234-4/+113
| | | | | | | | | | | | | | | | | | | | | Ensure also the cache of properties is erased in case of multiple searches. Fixes: #20626, #20627
* | | Ninja: Remove config suffix from order-only targetKyle Edwards2020-04-232-0/+21
|/ / | | | | | | Fixes: #20621
* | Merge topic 'llvm-rc-include-path' into release-3.17Brad King2020-04-071-8/+8
|\ \ | | | | | | | | | | | | | | | | | | 35a29ec827 llvm-rc: Restore include path for data after explicit preprocessing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4570
| * | llvm-rc: Restore include path for data after explicit preprocessingThomas Bernard2020-04-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) with llvm-rc we explicitly preprocess RC source files and then compile separately without -I flags. This broke cases where the RC source references data files adjacent to itself or in the include path. This change adds the expansion of the include paths when calling the llvm-rc in order for the resource files to be picked up correctly by llvm-rc. Since the RC compiled file is first preprocessed, the file being compiled by llvm-rc resides in the build directory. In order for llvm-rc to find the resource data specified relative to the .rc file being compiled, the source file path is preppended in the include list so that the original source path takes priority over all the other includes paths specified. A space was added in the CMAKE_INCLUDE_FLAG_RC to make the include directive work properly for llvm-rc. Checks on the rc.exe showed that the syntax change doesn't affect it's proper operation. Fixes: #20529
* | | Merge topic 'ExternalProject-no-extract-bool' into release-3.17Brad King2020-04-031-0/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 2c4bb705e8 ExternalProject: allow `DOWNLOAD_NO_EXTRACT OFF` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4562
| * | | ExternalProject: allow `DOWNLOAD_NO_EXTRACT OFF`Ben Boeckel2020-04-021-0/+9
| | | | | | | | | | | | | | | | Fixes: #20531
* | | | Merge topic 'link-libs-config-case' into release-3.17Brad King2020-03-314-0/+28
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 2af18704fd Merge branch 'backport-3.16-link-libs-config-case' 3f976bf201 target_link_libraries: Fix regression in case of $<CONFIG> genex 5a95b5e091 target_link_libraries: Fix regression in case of $<CONFIG> genex Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4544
| * | | target_link_libraries: Fix regression in case of $<CONFIG> genexBrad King2020-03-304-0/+28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit b8626261e9 (Precompile headers: Add methods to generate PCH sources, 2019-07-13, v3.16.0-rc1~182^2~4) we look up source files for a target using an upper-case configuration even though an original-case name is sufficient. Since commit 36ded610af (PCH: Generate sources during Compute step, 2019-10-05, v3.16.0-rc1~2^2) the source file lookup is the first time we compute many on-demand structures that depend on the configuration name. This caused the `$<CONFIG>` generator expression to evaluate to the upper-case configuration name in some cases where we used original-case before. Fix this by switching the source file lookup to the original-case config name. Add a test covering the symptom that led to the discovery of this problem. Fixes: #20517
* | | Merge topic 'ctest-timeout-report' into release-3.17Brad King2020-03-272-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 7fda917fa4 CTest: Fix reported duration on timeout when grindchild keeps pipes open Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4530
| * | | CTest: Fix reported duration on timeout when grindchild keeps pipes openBrad King2020-03-262-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d1976cd1f2 (CTest: Fix timeout when grandchild keeps pipes open, 2020-01-13, v3.17.0-rc1~169^2) we no longer hang, but the test duration we report after the timeout is the amount of time the immediate child ran before exiting. Fix the logic to instead report the actual amount of time we spent monitoring the test before the timeout. Fixes: #20509
* | | llvm-rc: Print stderr output when calling tools through cmake_llvm_rcThomas Bernard2020-03-263-3/+4
|/ / | | | | | | | | | | The stored error pipe is output if the program fails. Fixes: #20494
* | Merge topic 'export-repeat' into release-3.17Brad King2020-03-203-0/+8
|\ \ | | | | | | | | | | | | | | | | | | 8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4494
| * | export: Fix use-after-free on multiple calls overwriting same FILEBrad King2020-03-193-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake 3.16 and below allow multiple `export()` calls with the same output file even without using `APPEND`. The implementation worked by accident by leaking memory. Refactoring in commit 5444a8095d (cmGlobalGenerator: modernize memrory managemenbt, 2019-12-29, v3.17.0-rc1~239^2) cleaned up that memory leak and converted it to a use-after-free instead. The problem is caused by using the `cmGlobalGenerator::BuildExportSets` map to own `cmExportBuildFileGenerator` instances. It can own only one instance per output FILE name at a time, so repeating use of the same file now frees the old `cmExportBuildFileGenerator` instance and leaves the pointer in the `cmMakefile::ExportBuildFileGenerators` vector dangling. Move ownership of the instances into `cmMakefile`'s vector since its entries are not replaced on a repeat output FILE. In future work we should introduce a policy to error out on this case. For now simply fix the use-after-free to restore CMake <= 3.16 behavior. Fixes: #20469
* | | FindPython: fix regression on version validationMarc Chevrier2020-03-172-15/+67
|/ / | | | | | | | | | | | | | | | | | | In commit 3dab4682f6 (FindPython: reduces consumption of resources, 2020-02-10, v3.17.0-rc1~11^2) we accidentally broke the python executable version validation when the "LOCATION" strategy is used with the plain `FindPython` module. Fix the logic and add test cases covering those combinations. Fixes: #20465
* | Merge topic 'rename-macho-version-properties' into release-3.17Craig Scott2020-03-121-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 14732d3f30 macOS: Rename OSX_*_VERSION properties to MACHO_*_VERSION Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4452
| * | macOS: Rename OSX_*_VERSION properties to MACHO_*_VERSIONBrad King2020-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The properties added by commit 4a62e3d97c (macOS: Add OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties, 2020-01-24, v3.17.0-rc1~80^2~1) are general-purpose for all platforms using Mach-O formats and not just on OS X. Rename them accordingly. The properties are new to the CMake 3.17 release so we can rename them without compatibility concerns. Fixes: #20442
* | | Swift: support Ninja Multi-ConfigSaleem Abdulrasool2020-03-093-0/+9
| | | | | | | | | | | | | | | Enable support for multi-configuration builds using Ninja when building Swift.
* | | Merge topic 'ninja-multi-custom-command-deps' into release-3.17Brad King2020-03-053-6/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 081c4679f7 Ninja Multi-Config: Don't build target dependencies for custom commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4423
| * | | Ninja Multi-Config: Don't build target dependencies for custom commandsKyle Edwards2020-03-033-6/+3
| |/ / | | | | | | | | | | | | | | | | | | If cross-config mode is used, and a target depends on another target as well as a custom command, we don't want the custom command to also depend on the depended target, as that would build targets unnecessarily. Fix this behavior.
* | | Merge topic 'FindPython-manage-SOABI-suffix' into release-3.17Brad King2020-03-041-0/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4420
| * | | FindPython: python_add_library can now manage SOABI suffix.Marc Chevrier2020-03-031-0/+10
| |/ / | | | | | | | | | Fixes: #20408
* | | Ninja Multi-Config: Fix spurious unused variable warningKyle Edwards2020-03-032-2/+13
|/ / | | | | | | Fixes: #20381
* | Merge topic 'ninja-multi-variable-shuffle-again' into release-3.17Brad King2020-02-2817-34/+70
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | c794b70f19 Ninja Multi-Config: Always generate build.ninja 9590c3a400 Generator: Don't allow Ninja Multi-Config variables on other generators 7a63dafafb Ninja Multi-Config: Remove "NMC" from variable names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4403
| * | Ninja Multi-Config: Always generate build.ninjaKyle Edwards2020-02-274-12/+3
| | | | | | | | | | | | | | | If CMAKE_DEFAULT_BUILD_TYPE is not specified, use the first item from CMAKE_CONFIGURATION_TYPES instead.
| * | Generator: Don't allow Ninja Multi-Config variables on other generatorsKyle Edwards2020-02-2710-0/+45
| | | | | | | | | | | | | | | | | | We may want to enable these variables later on with specific semantics. To avoid breaking backwards compatibility, make it an error to use them for now.
| * | Ninja Multi-Config: Remove "NMC" from variable namesKyle Edwards2020-02-276-27/+27
| | | | | | | | | | | | | | | | | | Also rename `..._DEFAULT_BUILD_FILE_CONFIG` to `..._DEFAULT_BUILD_TYPE`. These name changes make the variables meaningful for future use by other generators.
* | | foreach: Set fatal error on invalid rangeKyle Edwards2020-02-274-0/+8
| | | | | | | | | | | | Fixes: #20394
* | | foreach: Fix crash when parsing invalid integerKyle Edwards2020-02-2719-0/+48
|/ / | | | | | | Fixes: #20393
* | Merge topic 'RunCMake-test-lang' into release-3.17Brad King2020-02-261-0/+3
|\ \ | | | | | | | | | | | | | | | | | | 95dbcf0598 Tests: fix RunCMake.Make test when run on systems with non-english locale Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4389
| * | Tests: fix RunCMake.Make test when run on systems with non-english localeRolf Eike Beer2020-02-261-0/+3
| | | | | | | | | | | | | | | | | | Set `LANG=C` in the environment so the output of `make` is predictable. Fixes: #19689
* | | Tests: Fix CFBundleTest for Ninja Multi-ConfigKyle Edwards2020-02-251-1/+1
| | |
* | | Tests: Fix CustComDepend test for Ninja Multi-ConfigKyle Edwards2020-02-251-2/+2
| | |
* | | CTest: Provide more detailed information on resource allocation errorKyle Edwards2020-02-243-3/+37
|/ /
* | Merge topic 'ninja-multi-framework-dependency-autogen-fix' into release-3.17Brad King2020-02-182-0/+27
|\ \ | | | | | | | | | | | | | | | | | | 7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4363
| * | Ninja Multi-Config: Fix issue with framework dependencies and AutogenKyle Edwards2020-02-172-0/+27
| | | | | | | | | | | | Fixes: #20345