summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | | ExternalProject: Quote each git --config option to handle spacesCraig Scott2020-02-151-1/+3
| | | | | | | | | Fixes: #20354
* | | Tests: Add missing ExternalProject smoke testsCraig Scott2020-02-151-0/+8
| | |
* | | Tests: Fix test_clean target missing some test directoriesCraig Scott2020-02-153-11/+16
|/ /
* | Merge topic 'ninja-multi-default-configs-fix' into release-3.17Brad King2020-02-123-0/+45
|\ \ | | | | | | | | | | | | | | | | | | 46c836644d Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4349
| * | Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGSKyle Edwards2020-02-113-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | Prior to this fix, CMAKE_NMC_DEFAULT_CONFIGS would inherit "all" from the union of CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG and CMAKE_NMC_CROSS_CONFIGS. This is inconsistent with the behavior of the "all" target signifying CMAKE_NMC_CROSS_CONFIGS. Update "all" in CMAKE_NMC_DEFAULT_CONFIGS to inherit only from CMAKE_NMC_CROSS_CONFIGS.
* | | Merge topic 'file-CONFIGURE_DEPENDS-verify-CMP0009' into release-3.17Brad King2020-02-125-2/+30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 818ec34bdd file: GLOB_RECURSE VerifyGlobs.cmake should have CMP0009 set to new b620dc566d file: Fix GLOB_RECURSE LIST_DIRECTORIES documentation regarding CMP0009 715f90bdd9 Tests: Perform minor cleanups in RunCMake.file test Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !4342
| * | | file: GLOB_RECURSE VerifyGlobs.cmake should have CMP0009 set to newShane Parris2020-02-115-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain cases, rebuilds with CMake using the CONFIGURE_DEPENDS flag with GLOB_RECURSE could result in a reconfigure loop due to CMP0009 not being propogated to the generated VerifyGlobs.cmake script. During the inital configuration phase, RecurseThroughSymlinksOn() is called for recursive glob operations either by having the CMP0009 status not set to NEW or by explicitly providing the FOLLOW_SYMLINKS flag. At the end when the VerifyGlobs script is created, the FOLLOW_SYMLINKS flag is written according to the final resolved form through a call to GetRecurseThroughSymlinks(). Thus, setting CMP0009 to NEW in the generated file is safe and allows correct behavior whether or not the end user sets the policy status to NEW or OLD.
| * | | Tests: Perform minor cleanups in RunCMake.file testShane Parris2020-02-111-2/+2
| | | |
* | | | Merge topic 'install-default-fix' into release-3.17Brad King2020-02-126-12/+12
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | 9442ae5083 install: Fix regression when using default destinations Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4340
| * | install: Fix regression when using default destinationsKyle Edwards2020-02-116-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 9fc20a4f3e (install: Add sane set of defaults for DESTINATION and file type parameters, 2018-11-02, v3.14.0-rc1~410^2~1), a regression was introduced, in which an `install(TARGETS)` with a RUNTIME/LIBRARY/ARCHIVE DESTINATION but no PUBLIC_HEADER/PRIVATE_HEADER DESTINATION would then install the headers. The old behavior did not do this. Restore the old behavior. Fixes: #20326
* | | Merge topic 'FindPython-reduce-resources-comsumption' into release-3.17Brad King2020-02-111-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 3dab4682f6 FindPython: reduces consumption of resources Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4338