Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not mark generated files as GENERATED #397

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

tmadlener
Copy link
Collaborator

@tmadlener tmadlener commented Mar 23, 2023

BEGINRELEASENOTES

  • Remove the GENERATED property from generated files in CMake to avoid inconsistent removal of headers and source files with the clean target. Fixes #396

ENDRELEASENOTES

@andresailer do you have any better idea for this? There was quite some discussion already in #143 but nothing too specific about the GENERATED property.

@DraTeots could you give this a go and check whether this indeed solves your issue?

Keep them in place even if the clean target is specified. See AIDASoft#396
@tmadlener tmadlener requested a review from andresailer March 23, 2023 08:33
@DraTeots
Copy link
Contributor

DraTeots commented Mar 24, 2023

Tested. It fully fixes my issue. Thank you!!!

@tmadlener
Copy link
Collaborator Author

@jmcarcell just to make sure, this also doesn't break any of your workflows?

@jmcarcell
Copy link
Member

jmcarcell commented Mar 27, 2023

It doesn't break anything for me because I don't use clean. But with cmake 3.25.2 I can't reproduce the original issue, in my case neither the headers nor the .cc files are deleted when running clean. Also using the version in this PR nothing is deleted. There is something weird about this because the documentation says that:

The Makefile Generators will remove GENERATED files during make clean.

so it should delete both headers and .cc files (master)?. I think that anyway it's better to remove this option since it doesn't say anything for other generators so maybe there is different behaviour for make and ninja for example

@tmadlener tmadlener merged commit 9cd0373 into AIDASoft:master Apr 3, 2023
@tmadlener tmadlener deleted the no-clean-gen-files branch April 3, 2023 07:07
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.

Generated cc files are deleted on cmake --target clear
3 participants