Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | codespell: Avoid escape sequence that looks like misspelled "nodes" | Brad King | 2023-05-22 | 1 | -1/+1 |
| | |||||
* | Tests: Avoid duplicate custom commands for Xcode "new build system" | Brad King | 2020-09-18 | 1 | -0/+7 |
| | |||||
* | Tests: Avoid duplicate rules in ExternalData test | Brad King | 2018-04-13 | 2 | -3/+4 |
| | | | | | | | | | | | | | In commit v3.7.0-rc1~158^2 (ExternalData: Tolerate files duplicated across multiple targets, 2016-07-07) we added a test case for repeating the same data file reference in three different targets in the same directory in order to exercise its corresponding fix. However, we re-used the top-level `Data.dat` file which is already produced by an unrelated test case. `ninja` diagnoses the duplicate rule. Update the test to use a dedicated data file name for the three-times repeated case to avoid this conflict. It still covers the original purpose of the test. | ||||
* | ExternalData: Tolerate files duplicated across multiple targets | Brad King | 2016-09-07 | 2 | -0/+26 |
If multiple ExternalData_Target_Add calls generate the same output file then we need to avoid calling add_custom_command multiple times with that output. This was already done within a single target by setting a variable in the local function scope. This will not be visible in other calls though so we need to use a directory property instead to prevent adding a custom command multiple times for one output in a directory. Normally it is not safe to have multiple custom commands that produce the same output file across multiple independent targets, but since we use atomic replacement of outputs the resulting races should not be a problem. For the convenience of projects, tolerate this instead of diagnosing it. In particular, we previously allowed up to two copies of the custom command in one directory because CMake has a fallback from MAIN_DEPENDENCY to an `<output>.rule` file. While at it, add a note to the documentation that typically only one external data target should be needed for a project. Reported-by: David Manthey <david.manthey@kitware.com> |