Skip to content

Ignore run-msbuild.bat - #4875

Merged
vitaut merged 1 commit into
fmtlib:mainfrom
illusionyy:patch-1
Aug 3, 2026
Merged

Ignore run-msbuild.bat#4875
vitaut merged 1 commit into
fmtlib:mainfrom
illusionyy:patch-1

Conversation

@illusionyy

Copy link
Copy Markdown
Contributor

Only for visual studio generator, when adding as subdir, this file is created and breaks submodule tracking until this file is ignored.

@illusionyy
illusionyy requested a review from vitaut as a code owner August 1, 2026 18:30

@vitaut vitaut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

I think it would be better to fix the source of the problem rather than ignore the generated file. run-msbuild.bat is created by file(WRITE run-msbuild.bat ...), which writes it into the source directory. I suggest writing it to ${CMAKE_CURRENT_BINARY_DIR} instead.

Also, could you elaborate on what you mean by "breaks submodule tracking"?

@illusionyy

illusionyy commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Also, could you elaborate on what you mean by "breaks submodule tracking"?

When I add this as submodule, cmake generates this file and diff will show in git.

diff --git a/external/formatter/fmt/fmtlib b/external/formatter/fmt/fmtlib
--- a/external/formatter/fmt/fmtlib
+++ b/external/formatter/fmt/fmtlib
@@ -1 +1 @@
-Subproject commit abb66c1f3576489ac3bdcee47c19a3fba6dddb07
+Subproject commit abb66c1f3576489ac3bdcee47c19a3fba6dddb07-dirty

@illusionyy

Copy link
Copy Markdown
Contributor Author

I suggest writing it to ${CMAKE_CURRENT_BINARY_DIR} instead.

This is a better fix and does work. I updated PR with this change

@vitaut
vitaut merged commit a245c6d into fmtlib:main Aug 3, 2026
63 of 64 checks passed
@vitaut

vitaut commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Merged, thanks!

@illusionyy
illusionyy deleted the patch-1 branch August 3, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants