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

Avoid rewriting test files when calling cmake #3548

Merged
merged 2 commits into from
Nov 4, 2020

Conversation

masterleinad
Copy link
Contributor

Previously, we were changing the timestamp of the generated test files every time we called cmake resulting in unnecessary rebuilds. configure_file only changes the files if they differ.

@masterleinad
Copy link
Contributor Author

Retest this please.

@kokkos kokkos deleted a comment from masterleinad Nov 2, 2020
@kokkos kokkos deleted a comment from masterleinad Nov 2, 2020
@kokkos kokkos deleted a comment from masterleinad Nov 2, 2020
Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

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

Please comment that you are writing a temporary intermediate file and calling configure_file to avoid updating timestamps which would trigger unnecessary rebuilds on subsequent cmake runs.

@masterleinad
Copy link
Contributor Author

Please comment that you are writing a temporary intermediate file and calling configure_file to avoid updating timestamps which would trigger unnecessary rebuilds on subsequent cmake runs.

See 8aedb69 (#3548).

Copy link

@jjwilke jjwilke left a comment

Choose a reason for hiding this comment

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

I can approve without the suggested change - but curious what you think.

"#include <Test${Tag}_Category.hpp>\n"
"#include <Test${Name}.hpp>\n"
)
configure_file(${dir}/dummy.cpp ${file})
Copy link

Choose a reason for hiding this comment

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

Would it be better to have a dummy.cpp.in with @test@, etc and skip the first file(WRITE?

Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

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

Your last commit invalidates the comments. You must fix it.

I do not like your implementation of the changes suggested by @jjwilke. One now has to open test.cpp.in to understand what is going on and nothing in the name of the variables indicates that they are being substituted in the file being configured.
My preference goes to revert.

@masterleinad
Copy link
Contributor Author

I don't really care one way or the other. @dalg24 seems to feel more strongly than @jjwilke so I'll just revert.

@masterleinad
Copy link
Contributor Author

Retest this please.

Copy link

@jjwilke jjwilke left a comment

Choose a reason for hiding this comment

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

Yep, I'm not going fight on this one : )

@crtrott crtrott merged commit 615f34c into kokkos:develop Nov 4, 2020
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.

None yet

4 participants