MarkSchofield / WindowsToolchain

A repository containing a CMake toolchain for using MSVC
MIT License
106 stars 19 forks source link

Cppwinrt projection will never be regenerated even if inputs change #31

Closed dfields-msft closed 2 years ago

dfields-msft commented 2 years ago

Once generate_winrt_projection has run for a given CPPWINRT_PROJECTION_ROOT_PATH, it will never regenerate headers even if the inputs change. For example, if one of the inputs is a .winmd that comes from another target (or perhaps a nuget package), even if that .winmd is updated or if a different input path is specified (e.g. to a new version of the nuget that has been installed), the projection will be stale until someone manually deletes the old one. (This may be better to address holistically as part of #27.)

https://github.com/MarkSchofield/Toolchain/blob/c789b4b58f995cb401f2f290447c3d0c4fd6c91b/Support/CppWinRT.cmake#L57

MarkSchofield commented 2 years ago

.winmd files passed to add_cppwinrt_projection will trigger a re-projection when they change.