mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
CMP0115 requires that source files listed in CMake must include their file extension, but there are cases when projects have different source files with the same name, but one with an extension and one without. In the current state, CMake will ignore the file without the extension an always map it to the file with an extension. ```cmake add_library(foo bar.c bar) ``` In the above example, the target `foo` will only recognize and depend on `bar.c` and miss the file `bar` unless `bar` comes before `bar.c` in the source list. This issue also affects how custom commands emit files. This change adds a new policy to recognize files with and without a file extension as different files, both when building targets, and when they are being created. Fixes: #26058