summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'compile-options-order'Brad King2021-06-088-3/+95
|\ | | | | | | | | | | | | | | | | | | 8f68bcad8f Tests: Add cases verifying flag ordering rules ccc83ce162 Help: Document order of flags from CMAKE_<LANG>_FLAGS and COMPILE_OPTIONS df79fe055b Help: Remove incorrect "versionadded" for CMAKE_<LANG>_FLAGS_<CONFIG> c48d2d8480 VS: Place per-source preprocessor definitions after target-wide ones Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6187
| * Tests: Add cases verifying flag ordering rulesBrad King2021-06-078-3/+95
| |
* | FindPkgConfig: Always create the imported targetAdam Badura2021-06-041-0/+4
| | | | | | | | Fixes: #22180
* | Tests: Add case covering FindPkgConfig creation of empty targetsBrad King2021-06-043-0/+19
| |
* | Merge topic 'env-toolchain-file'Brad King2021-06-0412-0/+55
|\ \ | | | | | | | | | | | | | | | | | | 6c34ed9b87 cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6188
| * | cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variableBrad King2021-06-0312-0/+55
| |/ | | | | | | | | When no `CMAKE_TOOLCHAIN_FILE` is explicitly specified while creating a new build tree, check for an environment variable of the same name.
* | Merge topic 'implicit-link-static'Brad King2021-06-0441-36/+289
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1d7fddca8e CMakeParseImplicitLinkInfo: Honor GNU static runtime library flags 629eb3926b Tests: Extend ParseImplicit*Info with static GNU runtime library flags 9d0f8c3e56 Tests: Teach RunCMake.ParseImplicitLinkInfo to match output by regex Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6185
| * | CMakeParseImplicitLinkInfo: Honor GNU static runtime library flagsBrad King2021-06-036-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | With flags like `-static-libstdc++` or `-static-libgfortran`, the GNU compiler driver adds `-Bstatic ... -Bdynamic` around its language runtime library. Convert the libraries in between these to absolute paths so that mixed-language linking honors the static runtime libraries.
| * | Tests: Extend ParseImplicit*Info with static GNU runtime library flagsBrad King2021-06-0311-0/+248
| | | | | | | | | | | | | | | Generate sample input data with GNU 10.2.1 compilers using flags like `-static-libstdc++` and `-static-libgfortran`.
| * | Tests: Teach RunCMake.ParseImplicitLinkInfo to match output by regexBrad King2021-06-0330-35/+35
| |/ | | | | | | | | As in commit 6bc6fc2a7f (Tests: Teach RunCMake.ParseImplicitIncludeInfo to match output by regex, 2019-04-08, v3.14.2~5^2~1).
* | clang-analyzer: Suppress warnings in intentional use-after-move casesBrad King2021-06-032-0/+6
|/
* Merge topic 'find_item-NO_CACHE'Brad King2021-06-0312-0/+599
|\ | | | | | | | | | | | | | | 87b71eec62 find_*: Add support for option NO_CACHE Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6181
| * find_*: Add support for option NO_CACHEMarc Chevrier2021-06-0212-0/+599
| | | | | | | | | | | | | | | | Request that find result is stored in a normal variable rather than a cache entry. Fixes: #20687 Issue: #20743
* | Merge topic 'ctest-coverage-no-dir'Brad King2021-06-032-0/+7
|\ \ | | | | | | | | | | | | | | | | | | 5d5610b04f CTest: Exit coverage handling early if no binary dir Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6144
| * | CTest: Exit coverage handling early if no binary dirJoseph Snyder2021-06-022-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Check for the existence of the Binary directory string before checking for coverage files. If the directory is not specified, write an error message and do not do any checking. Fixes: #22102
* | | cmake_transform_depfile: Remove unused incomplete vstlog supportBrad King2021-06-021-4/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit b2c14bc774 (cmake -E: Add cmake_transform_depfile internal command, 2020-10-02, v3.20.0-rc1~684^2~2) a partial implementation for converting MSBuild "TLog" format files was added. However, it is unused and incomplete: * Does not enforce absolute paths as TLog docs require. * Does not upper-case paths as TLog docs recommend. * The TLog format semantics are not equivalent to `out: in`. Remove the unused TLog transform infrastructure to avoid confusion. Issue: #20286
* | Merge topic 'command_target'Brad King2021-06-022-0/+27
|\ \ | | | | | | | | | | | | | | | | | | 1cb4f592a0 add_custom_command: Target-dependent generator expression support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6176
| * | add_custom_command: Target-dependent generator expression supportRaul Tambre2021-05-312-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | OUTPUT variant with a TARGET given to allow resolving target-based generator expressions wouldn't work because OUTPUT is resolved before generator targets are created, i.e. FindGeneratorTargetToUse() returns nullptr. This is a known limitation, see #21364. Implements #21336.
* | | Merge topic 'get-runtime-dependencies-file-filter'Brad King2021-06-027-55/+157
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | a12639e658 file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES arguments Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6170
| * | file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES argumentsKyle Edwards2021-06-017-55/+157
| | |
* | | Merge topic 'install-imported-runtime-artifacts'Brad King2021-06-018-10/+188
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f7ba3a0589 FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTS df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode 60e752ced8 Refactor: Move common methods into cmInstallGenerator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6162
| * | | FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTSKyle Edwards2021-05-313-3/+71
| | | |
| * | | install(): Add IMPORTED_RUNTIME_ARTIFACTS modeKyle Edwards2021-05-315-7/+117
| | |/ | |/|
* | | Merge topic 'link-objects-first'Brad King2021-06-0114-0/+151
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3941555d93 target_link_libraries: Place $<TARGET_OBJECTS> before libraries f530b3a267 OpenWatcom: Add infrastructure to link to object files 8a4ca110e4 cmComputeLinkInformation: Improve type safety of item IsPath member 83ad066ed1 cmComputeTargetDepends: Factor out helper to add object library dependency 7f506b95a7 cmGeneratorTarget: Refactor link item lookup 96809a8541 cmGeneratorTarget: Give temporary link impl item an explicit name ddffbb8adb cmMakefile: Register explicit object sources more efficiently 18e42d3e63 cmGeneratorExpressionNode: Constify local variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6166
| * | | target_link_libraries: Place $<TARGET_OBJECTS> before librariesBrad King2021-05-2914-0/+151
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Linkers always use object files explicitly specified on the command line regardless of where they appear. Move them to the front of the list of linked libraries in so that symbols required by the object files can be resolved by any library. Issue: #22149
* | | Merge topic 'linker-launcher'Brad King2021-05-2949-1/+123
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ae108418ae Launchers: Support setting linker launchers 92c8b83641 cmNinjaNormalTargetGenerator: Fix "Language" rule variable d93bfd95f8 Tests/CompilerLauncher: Fix file names and clarify comment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6092
| * | | Launchers: Support setting linker launchersBobby D Reynolds2021-05-2843-0/+122
| | | | | | | | | | | | | | | | Fixes: #18316
| * | | Tests/CompilerLauncher: Fix file names and clarify commentBobby D Reynolds2021-05-286-1/+1
| |/ /
* | | Merge topic 'fix-compile-db-crash'Brad King2021-05-291-1/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 316cbbe8d5 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6173
| * | Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile ruleBrad King2021-05-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the fix from commit 67e2130c96 (Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule, 2020-11-20, v3.19.1~8^2) to work for the `<FLAGS>` placeholder too. Also fix the test case to actually enable `EXPORT_COMPILE_COMMANDS` on the test target. Fixes: #22261
* | | Merge topic 'WriteBasicConfigVersion_support_leading_zeroes'Brad King2021-05-285-2/+927
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | e609afeb5f WriteBasicConfigVersion supports version strings such as 21.07.04 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6167
| * | WriteBasicConfigVersion supports version strings such as 21.07.04Robert Maynard2021-05-275-2/+927
| | | | | | | | | | | | Fixes #22207
* | | Merge topic 'xcode-link-TARGET_OBJECTS'Brad King2021-05-272-11/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 2ae72ef74b Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6161
| * | | Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIESBrad King2021-05-262-11/+7
| |/ / | | | | | | | | | This was an oversight in the original implementation.
* | | Merge topic 'cpack-install-opts'Craig Scott2021-05-263-0/+15
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 26e36111d3 CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6141
| * | CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLESNils Gladitz2021-05-233-0/+15
| | | | | | | | | | | | | | | | | | The new variable allows projects to define custom key=value pairs of variables to be set in CPack cmake_install.cmake script invocations. This allows install(SCRIPT|CODE) to be parameterized at runtime.
* | | Ninja: Always compile sources using absolute pathsBrad King2021-05-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ninja generator traditionally referenced source files and include directories using paths relative to the build directory if they could be expressed without a `../` sequence that leaves the build and source directories. For example, when using a `build/` directory inside the source tree, sources would be compiled as `-c ../src.c` and include directories would be referenced as `-I ../include`. This approach matches the traditional Ninja convention of using relative paths whenever possible, but has undesirable side effects such as: * Compiler diagnostic messages may not use absolute paths, making it harder for IDEs/editors to find the referenced sources or headers. * Debug symbols may not use absolute paths, making it harder for debuggers to find the referenced sources or headers. * Different results depending on the path to the build tree relative to the source tree. * Inconsistent with the Makefile generators, which use absolute paths. Switch to always using absolute paths to reference source files and include directories on compiler command lines. While alternative solutions for diagnostic messages and debug symbols may exist with specific tooling, this is the simplest and most consistent approach. Note that a previous attempt to do this in commit 955c2a630a (Ninja: Use full path for all source files, 2016-08-05, v3.7.0-rc1~275^2) was reverted by commit 666ad1df2d (Revert "Ninja: Use full path for all source files", 2017-02-24, v3.8.0-rc2~9^2) due to problems hooking up depfile dependencies on generated files. This time, the changes in commit 2725ecff38 (Ninja: Handle depfiles with absolute paths to generated files, 2021-05-19) should avoid those problems. Fixes: #13894, #17450
* | | Merge topic 'FindVulkan-add-Headers-glslangValidator-targets'Brad King2021-05-253-1/+94
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 668ba68a7a FindVulkan: add Vulkan::Headers and Vulkan::glslangValidator targets Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6154
| * | | FindVulkan: add Vulkan::Headers and Vulkan::glslangValidator targetsPCJohn2021-05-243-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Vulkan::Headers` target complements existing Vulkan::Vulkan target. It is the same except it omits the Vulkan library which supports applications that loads the Vulkan library in at runtime. The `Vulkan::glslangValidator` target provides the glslangValidator executable which is the tool for converting between shader languages (GLSL, SPIR-V, etc.).
* | | | Merge topic 'set-cache-keep-normal-variable'Brad King2021-05-257-0/+81
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d96eb55282 set(CACHE): do not remove normal variable Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6146
| * | | | set(CACHE): do not remove normal variableMarc Chevrier2021-05-207-0/+81
| | | | | | | | | | | | | | | | | | | | Fixes: #22038
* | | | | Merge branch 'master' into cmp0082-exclude-from-allKyle Edwards2021-05-24527-462/+5142
|\ \ \ \ \ | | |/ / / | |/| | / | |_|_|/ |/| | |
| * | | Framework: Fix $<TARGET_SONAME_FILE:...> for imported frameworksKyle Edwards2021-05-203-0/+23
| | |/ | |/|
| * | Merge topic 'cmake-ninja-workdir'Brad King2021-05-204-0/+50
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2725ecff38 Ninja: Handle depfiles with absolute paths to generated files bc40cd7a4e Tests: Add case covering a unity build with a generated source ae927f936d cmGlobalNinjaGenerator: Improve allocation pattern in WriteBuild 68e5f92cad cmGlobalNinjaGenerator: Factor out custom command output collection c5195193d3 cmGlobalNinjaGenerator: Reduce string copies in WriteCustomCommandBuild 8bac527b0c cmGlobalNinjaGenerator: Re-order logic in WriteCustomCommandBuild ddc030f5ca cmGlobalNinjaGenerator: Record implicit outputs as known too ceb82752ef cmLocalNinjaGenerator: Use variable for main custom command output path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6143
| | * | Ninja: Handle depfiles with absolute paths to generated filesBrad King2021-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ninja treats every (normalized) path as its own node. It does not recognize `/abs/path/to/file` in a depfile as matching `path/to/file` even when `build.ninja` and the working directory are in `/abs/`. See Ninja Issue 1251. In cases where we pass absolute paths to the compiler, it will write a depfile containing absolute paths. If those files are generated in the build tree by custom commands, `build.ninja` references them by relative path in build statement outputs, so Ninja does not hook up the dependency and rebuild the project correctly. Add infrastructure to work around this problem by adding implicit outputs to custom command build statements that reference the main outputs by absolute path. Use a `${cmake_ninja_workdir}` placeholder to avoid repeating the base path. For example: build out.txt | ${cmake_ninja_workdir}out.txt: CUSTOM_COMMAND ... Ninja will create two nodes for the output file, one with a relative path and one with an absolute path. A depfile may then mention either form of the path and Ninja will hook up the dependency. Unfortunately Ninja will also stat the file twice. Issue: #13894 Fixes: #21865
| | * | Tests: Add case covering a unity build with a generated sourceBrad King2021-05-194-0/+50
| | |/ | | | | | | | | | | | | | | | Exclude the case on generators where it does not yet work. Issue: #21865
| * | Merge topic 'install-script-all-components'Brad King2021-05-2010-0/+72
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 99ff75455e install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6140
| | * | install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTSNils Gladitz2021-05-1910-0/+72
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a per-component installation the generated installation scripts are invoked once for each component. Per default custom installation script code added by install(CODE|SCRIPT) only runs for one specific component in this context. The new ALL_COMPONENTS option allows custom script code to be run once for each component being installed.
| * | cmCommandLineArgument: OneOrMore mode supports `=` separatorRobert Maynard2021-05-191-2/+1
| | | | | | | | | | | | Fixes #22187
| * | cmCommandLineArgument: Understands which commands require partial matchingRobert Maynard2021-05-191-1/+1
| |/ | | | | | | | | Allows us to provide better error messages when commands such as `--target` are passed invalid input.