summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/BuildDepends
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Fix Fortran INCLUDE directive dependencies when not preprocessingBrad King2023-05-098-0/+36
| | | | | | | Since commit b0a6161190 (Fortran: Add Fortran_PREPROCESS property, 2020-04-24, v3.18.0-rc1~116^2~3), if `Fortran_PREPROCESS` is `OFF`, the Ninja generator does not properly detect dependencies on sources loaded via the Fortran INCLUDE directive. Fix this and add a test.
* Link step: use linker dependency linker fileMarc Chevrier2023-05-037-0/+96
| | | | | | Based on work done by @ben.boeckel (!8051) Fixes: #22217
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-111-1/+1
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* Drop Visual Studio 10 2010 generatorBrad King2022-09-261-2/+1
| | | | This generator has been deprecated since CMake 3.22. Remove it.
* Depfile parsing: enhance compatibility with GNU MakeMarc Chevrier2022-01-164-0/+19
|
* Merge topic 'lcc-compiler'Brad King2021-10-191-0/+1
|\ | | | | | | | | | | | | | | | | | | | | 02b2607a5c Help: Add release note for MCST LCC compiler support e5d9fce03f LCC: Add dedicated support for MCST LCC compiler 2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture 0995c75301 Tests/RPM: skip tests tat rely on debugedit if it's not found ea55ac9a51 Tests/RunCMake/CommandLine: Deal with locales that are different from English Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6608
| * LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Divert LCC compiler as a new one, instead of treating it as GNU. Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been passing checks for GNU compilers, so it has been identified as GNU. Now, with intent of seriously upstreaming its support, it has been added as a separate LCC compiler, and its version displays not a supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead of GNU 7.3.0). This commit adds its support for detection, and also converts basically every check like 'is this compiler GNU?' to 'is this compiler GNU or LCC?'. The only places where this check is untouched, is where it regards other platforms where LCC is unavailable (primarily non-Linux), and where it REALLY differs from GNU compiler. Note: this transition may break software that are already ported to Elbrus, but hardly relies that LCC will be detected as GNU; still such software is not known.
* | Tests: Reduce RunCMake.BuildDepends MakeDependencies case size on BorlandBrad King2021-10-131-1/+6
|/ | | | | The Borland compiler takes a long time to process a large number of include files. Sometimes the test times out. Reduce its size.
* add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILERMarc Chevrier2021-08-012-0/+13
| | | | Fixes: #22486
* VS: Add support for add_custom_command DEPFILEBrad King2021-06-091-1/+2
| | | | | | | | Transform the depfile into MSBuild `AdditionalInputs` content. Add MSBuild Targets to update `AdditionalInputs` and the `.tlog` files for future builds without actually modifying the `.vcxproj` file. Fixes: #20286
* 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
* Xcode: Add support of DEPFILE for add_custom_command, part 2Marc Chevrier2021-04-171-2/+1
| | | | | | This MR extend the support of 'DEPFILE' to buildsystem version 1. Issue: #20286
* Xcode: Add support of DEPFILE for add_custom_commandMarc Chevrier2021-04-151-1/+2
| | | | Issue: #20286
* Genex: add_custom_command: DEPFILE supports genexMarc Chevrier2021-04-121-4/+4
| | | | | | This facility is very useful for 'Ninja Multi-Config' and required as well for future support of DEPFILE in 'Xcode' and 'Visual Studio' generators (#20286).
* Ninja: add_custom_command(DEPFILE): Ensure dependencies consistencyMarc Chevrier2021-01-193-3/+3
| | | | Fixes: #21694
* Merge topic 'xcode-object-ids'Brad King2021-01-083-0/+26
|\ | | | | | | | | | | | | | | | | b8b6573db8 Xcode: Use deterministic object ids for script build phases 2892228dc9 cmGlobalXCodeGenerator: Add infrastructure for deterministic object ids d250b67722 cmGlobalXCodeGenerator: Adopt pbxproj object id generation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5671
| * Xcode: Use deterministic object ids for script build phasesBrad King2021-01-063-0/+26
| | | | | | | | | | | | | | | | | | | | The Xcode "new build system" only considers a script build phase up to date if it has run before, even if outputs are newer than inputs. Use a deterministic object id for script build phases associated with custom commands so that they do not need to re-run after CMake re-generates the project. Fixes: #21669
* | cmDepends: merge dependers of depend makefileKai Wang2021-01-054-0/+38
| | | | | | | | | | | | | | | | | | | | | | Since one depender has multiple dependees, depend makefile generated same depender line by line, to reduce file size and refine make file parse speed, merge same dependers to one. And add a testcase for large depend.make which generated source file includes 20000 header files and run build and incremental build Signed-off-by: Wangkai <wangkai86@huawei.com> Signed-off-by: Zhaoyingdong <zhaoyingdong@huawei.com>
* | Tests: Add case for DEPFILE in add_custom_commandMarc Chevrier2020-12-237-0/+123
| | | | | | | | Issue: #20286, #21415
* | Makefiles: Add support of DEPFILE for add_custom_commandMarc Chevrier2020-12-238-0/+105
| | | | | | | | | | Issue: #20286 Fixes: #21415
* | Makefiles Generators: use compiler for dependencies generationMarc Chevrier2020-11-294-0/+68
|/ | | | | | | | | | | Each source compilation generates a dependencies file. These dependencies files are consolidated in one file per target. This consolidation is done as part of command 'cmake -E cmake_depends` launched before evaluation of makefile dependency graph. The consolidation uses the same approach as `CMake` dependencies management. Fixes: #21321
* ASM: Fix preprocessor definition flags for GNU 'as' toolKyle Edwards2020-06-011-0/+1
| | | | Fixes: #20780
* Merge topic 'fix-cache-args-file-to-dep-list'Brad 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
* | ASM: Fix depfile flags for GNU 'as' toolBrad King2020-03-136-0/+25
|/ | | | | | | | The GNU `as --help` shows `--MD <file>` as an option to generate depfiles as needed by Ninja. There is no `-MT <target>` flag but fortunately the generated files automatically account for the `-o <obj>` flag. Issue: #20426
* Makefile: Fix regression in dependencies on relative includesBrad King2019-07-245-1/+35
| | | | | | | | | | | | | | Since commit a13a5c948e (Replace use of CollapseCombinedPath with CollapseFullPath, 2019-03-19, v3.15.0-rc1~361^2~1), one code path now calls `CollapseFullPath` with a base path that may be relative. Backport KWSys commit c6f8e24a3 (SystemTools: Fix CollapseFullPath with relative base path, 2019-07-24) to handle such base paths. This case occurs when a build tree is placed in a directory inside a source tree such that CMake is willing to generate a relative path from the build tree to the source tree. Add a test covering this case. Fixes: #19507
* GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in TestsCraig Scott2017-12-301-1/+1
|
* Tests: Fix RunCMake.BuildDepends on VS 2017 with v90 toolsetBrad King2017-08-251-1/+2
| | | | | The MSVC toolsets v100 and below forget to re-link when a manifest changes. Exclude this part of the test case for them.
* Tests: Use full output paths in file(GENERATE) callsBrad King2017-06-086-6/+6
| | | | | We don't define behavior for relative paths to the OUTPUT argument. Fix our tests to use full paths.
* Tests: Add case for IMPLICIT_DEPENDS in custom targetBrad King2017-04-265-0/+26
| | | | | | | | | | Use the `IMPLICIT_DEPENDS` option of `add_custom_command` and place the command in a custom target. Verify that `INCLUDE_DIRECTORIES` of that custom target are honored. This is a case that was not really designed to work but happens to work, is useful, and makes sense. Add a test case make sure it continues to work. Issue: #16830
* Tests: Split RunCMake.BuildDepends make-only conditionBrad King2017-04-261-3/+4
|
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-1/+1
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* Use string(APPEND) in TestsDaniel Pfeifer2016-07-281-4/+4
| | | | | | | Automate with: find Tests -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* Revise C++ coding style using clang-formatKitware Robot2016-05-162-2/+8
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Tests: Fix RunCMake.BuildDepends filesystem delay for Watcom WMakeBrad King2016-04-291-1/+2
| | | | | Our 1.125s delay does not seem to be long enough to be reliable with the Watcom `wmake` tool. Use a longer delay for Watcom.
* Merge topic 'test-RunCMake.BuildDepends-filesystem-workaround'Brad King2016-04-111-0/+1
|\ | | | | | | | | f5e79004 Tests: Work around filesystem timestamp bugs in RunCMake.BuildDepends
| * Tests: Work around filesystem timestamp bugs in RunCMake.BuildDependsBrad King2016-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Custom-Symbolic-and-Byproduct case fails strangely on some filesystems used by our nightly testing. Somehow on the first build the `use-byproduct` output ends up with a timestamp older than `gen-byproduct-stamp` even though the build log clearly shows them build in the correct order (and must according to build system dependencies). Work around this problem by adding an extra delay before building `use-byproduct`. Tested-by: Gerhard Grimm <gerhard.grimm@detec.com>
* | Merge topic 'ninja-restat-custom-command-byproducts'Brad King2016-04-082-0/+29
|\ \ | |/ | | | | | | | | add7abc8 Ninja: Restat custom command byproducts even with a SYMBOLIC output (#16049) ff805113 Ninja: Fix detection of custom command symbolic outputs
| * Ninja: Restat custom command byproducts even with a SYMBOLIC output (#16049)Brad King2016-04-052-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in commit v3.5.0-rc1~198^2 (Ninja: Always re-run custom commands that have symbolic dependencies, 2015-11-19) broke the byproducts feature added by commit v3.2.0-rc1~340^2~2 (Add an option for explicit BYPRODUCTS of custom commands, 2014-11-13) when SYMBOLIC outputs also appear. This case occurs with AUTORCC-generated custom targets because the output is SYMBOLIC (to always run) and the generated file is a byproduct (for restat so dependents do not run unnecessarily). The two use cases conflict because Ninja does not support per-output restat. Favor restat whenever byproducts are present because it is required for byproducts to work correctly. In use cases where we want an always-run chain we simply will not be able to also use byproducts.
* | Tests: Add test for CMAKE_DEPENDS_IN_PROJECT_ONLY variableBrad King2016-03-235-0/+29
| |
* | Merge topic 'remove-vs6-generator'Brad King2016-03-101-1/+1
|\ \ | | | | | | | | | | | | | | | b42866a3 Drop Visual Studio 6 generator cd9ba3ec cmLocalVisualStudio7Generator: Fix name of helper function
| * | Drop Visual Studio 6 generatorBrad King2016-03-091-1/+1
| |/ | | | | | | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* | Xcode: ReRunCMake even if files disappeared (#15992)Gregor Jasny2016-03-091-0/+39
|/
* Ninja: Always re-run custom commands that have symbolic dependenciesBrad King2015-11-192-0/+26
| | | | | | | | | | | | If a custom command has a SYMBOLIC output (that is never actually created) then do not mark the custom command build statement as 'restat'. Otherwise other custom commands that depend on the symbolic output may not always re-run because after running the first custom command Ninja 'restat' will detect that the output timestamp did not change and skip its dependents. This was observed with the ExternalProject BUILD_ALWAYS option where Ninja would not re-run the 'install' step each time 'build' re-runs.
* Tests: Fix RunCMake.BuildDepends filesystem delay for Borland MakefilesBrad King2015-09-251-1/+7
| | | | | 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.
* Add support for *.manifest source files with MSVC toolsBrad King2015-09-176-0/+46
| | | | | | | | Classify .manifest sources separately, add dependencies on them, and pass them to the MS manifest tool to merge with linker-generated manifest files. Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
* Tests: Add RunCMake.BuildDepends testBrad King2015-09-176-0/+78
This will allow more granular checks than the main BuildDepends test. Start with a simple single-source C program.