summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* 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 '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 '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-24406-321/+4487
|\ \ \
| * | | 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.
| * Merge topic 'VS-include_external_msproject-CSharp-targets-references'Brad King2021-05-143-0/+47
| |\ | | | | | | | | | | | | | | | | | | | | | c7aa3bdefc Tests/include_external_msproject: Check C# project reference 65b58b0316 VS Generator: Properly reference included external C# projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6123
| | * Tests/include_external_msproject: Check C# project referenceDario Passet2021-05-133-0/+47
| | |
| * | Merge topic 'cmake_build_and_install_command_error_when_given_bad_arguments'Brad King2021-05-1413-0/+30
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f78b167a23 cmCommandLineArgument: Provide more information syntax error messages 5aa0dec6b0 cmake: `--build` and `--install` error out when encountering bad flags 928cdb17c5 cmCommandLineArgument: Correctly record parsing failures Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6119
| * \ \ Merge topic 'find_item-consistent-behavior-cache-variables'Brad King2021-05-1323-0/+397
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 08db1341a6 find_*: ensure consistent behavior for cache variables f5fa6d53b0 class cmake: Store working directory at cmake launch b1729200c3 find_*: refactor cache variable handling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6110
| | * | find_*: ensure consistent behavior for cache variablesMarc Chevrier2021-05-1223-0/+397
| | | | | | | | | | | | | | | | Fixes: #22121
| * | | Merge topic 'xcode-inherited-params'Brad King2021-05-123-0/+58
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | dfaf55fbfd Xcode: add extra '$(inherited)' entries using InheritBuildSettingAttribute. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6077
| | * | Xcode: add extra '$(inherited)' entries using InheritBuildSettingAttribute.Danny Parker2021-05-053-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These have been added to: GCC_PREPROCESSOR_DEFINITIONS OTHER_CFLAGS OTHER_LDFLAGS This is to allow Cocoapods to work correctly as it uses xcconfig files to alter build settings in Xcode, and requires these build settings to inherit from their parent, not overwrite.
| * | | Merge topic 'codespell'Brad King2021-05-107-8/+8
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fd02f10103 Xcode: Fix typos and spelling in error message 5950e54325 Source: Fix typos and spelling in comments 7072d83772 Help: Fix typos and spelling in documentation 03b1140ddc CONTRIBUTING: Fix typos and spelling 87f8843d8b FindMatlab: Fix spelling in warning and documentation 15cc39ed7f Modules: Fix typos and spelling in documentation f015c36c5a Modules: Fix typos and spelling in comments of generated code dad5b9d845 Modules: Fix typos and spelling in comments ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6099
| | * | | Xcode: Fix typos and spelling in error messageJosef Angstenberger2021-05-071-1/+1
| | | | |
| | * | | Tests: Fix typos and spelling in test stringsJosef Angstenberger2021-05-072-2/+2
| | | | |
| | * | | Tests: Fix typos and spelling in test error messageJosef Angstenberger2021-05-071-2/+2
| | | | |
| | * | | Tests: Fix typos and spelling in test nameJosef Angstenberger2021-05-071-1/+1
| | | | |
| | * | | Tests: Fix typos and spelling in commentsJosef Angstenberger2021-05-072-2/+2
| | | | |
| * | | | Merge topic 'install-symlink-to-directory'Brad King2021-05-105-0/+22
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d71a7cc19d install(FILES): Allow installation of symlinks to directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6098
| | * | | | install(FILES): Allow installation of symlinks to directoryJens Carl2021-05-065-0/+22
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | Allow symbolic links to a directory to be installed via install(FILES ...). Fixes: #22159
| * | | | Merge topic 'windows-symlink-errors'Brad King2021-05-105-6/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d7522b8f86 cmSystemTools: Improve CreateLink and CreateSymlink error codes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6096
| | * | | | cmSystemTools: Improve CreateLink and CreateSymlink error codesBrad King2021-05-075-6/+6
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 7f89053953 (cmSystemTools: Return KWSys Status from CreateLink and CreateSymlink, 2021-04-15) we just took the `-err` from libuv and treated it as a POSIX error. This is accurate on POSIX, but on Windows does not match the POSIX error codes. Use `uv_fs_get_system_error` to get the actual system error code. This requires libuv 1.38 or higher. Require that for Windows, but fall back to the previous approach on POSIX.
| * | | | Merge topic 'ep-update-git-hash-missing'Brad King2021-05-103-3/+20
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 5e941a545b ExternalProject: Ensure git fetch if updating to hash we don't have yet Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6109
| * | | | Tests: Fix RunCMake.CMakePresets example PATH formatBrad King2021-05-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 94c955e508 (Tests: Test the CMakePresets.json example in the documentation, 2020-10-09, v3.19.0-rc1~8^2) we transform the documented preset example for testing by replacing the generator. Extend the transformation with a step to fix `PATH` env var syntax.
| * | | | Merge topic 'generate-cmake-build-command-parallel'Brad King2021-05-054-0/+19
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d2b856bc92 ctest_build: Add the PARALLEL_LEVEL argument fc2ac46043 build_command: Add the PARALLEL_LEVEL argument 4dd4e9dd6c cmGlobalGenerator: Add parallel parameter to GenerateCMakeBuildCommand Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !6069
| | * | | | ctest_build: Add the PARALLEL_LEVEL argumentfriendlyanon2021-05-042-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #19712
| | * | | | build_command: Add the PARALLEL_LEVEL argumentfriendlyanon2021-05-042-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Issue: #19712
| * | | | | Merge topic 'extend_toolchain_flag_to_cmake_preset'Brad King2021-05-049-2/+90
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a9b968bb98 cmake-presets: Introduce `toolchainFile` preset option Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6045
| | * | | | | cmake-presets: Introduce `toolchainFile` preset optionRobert Maynard2021-04-289-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In v3 of the presets, the `--toolchain` command line argument now has a preset mapping.
| * | | | | | Merge topic 'vs-csharp-link'Brad King2021-05-043-0/+27
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 31bbcd1905 VS: Fix CSharp sources inside build directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6065
| | * | | | | | VS: Fix CSharp sources inside build directoryKinan Mahdi2021-05-033-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #22104
| * | | | | | | Merge topic 'compile-features-lang-vars'Brad King2021-05-043-0/+10
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bd16a985fc CompilerId/Features: Tolerate variables named for languages Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Timothy Brackett <brackett.tc@gmail.com> Merge-request: !6060
| | * | | | | | CompilerId/Features: Tolerate variables named for languagesBrad King2021-05-033-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a `CMakeLists.txt` or `CMAKE_TOOLCHAIN_FILE` sets a variable named `C`, `CXX`, or `CUDA`, we were previously comparing each enabled language name to the value of that variable, rather than the name itself. Double-quote the string to take advantage of policy `CMP0054`, but also add "x" prefixes to support projects that do not set the policy. Fixes: #22125
| * | | | | | | Merge topic 'ninja-multi-long-command-line-config'Brad King2021-05-033-0/+12
| |\ \ \ \ \ \ \ | | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ad08f93ee4 Ninja Multi-Config: Split long command lines by config Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6067
| * | | | | | | Merge topic 'foreach-loop-variable'Brad King2021-05-033-0/+106
| |\ \ \ \ \ \ \ | | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 46896d98bb foreach(): loop variables are only available in the loop scope Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Acked-by: Michael Hirsch <michael@scivision.dev> Merge-request: !6044