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

Fix perftests CMake target being empty: https://github.com/GridTools/gridtools/issues/1551 #1724

Merged
merged 7 commits into from
Aug 16, 2022
Merged

Conversation

petiaccja
Copy link
Contributor

@petiaccja petiaccja commented Jul 26, 2022

Fixes #1551. You cannot make a CMake target with no sources and no linker input, so this adds a dummy source file to the perftests target for when there are no linker inputs either.

@gridtoolsjenkins
Copy link
Collaborator

Hi there, this is jenkins continuous integration...
Do you want me to verify this patch?

Copy link
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

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

Just a minor thing: let's put it in the current build dir, i.e. in /tests/regression.

tests/regression/CMakeLists.txt Outdated Show resolved Hide resolved
"${CMAKE_BINARY_DIR}/perftests_dummy.cpp"
"// This file is needed in some cases because CMake targets must have at least one .cpp source."
)
target_sources(perftests PRIVATE "${CMAKE_BINARY_DIR}/perftests_dummy.cpp")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
target_sources(perftests PRIVATE "${CMAKE_BINARY_DIR}/perftests_dummy.cpp")
target_sources(perftests PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/perftests_dummy.cpp")

Co-authored-by: Hannes Vogt <hannes@havogt.de>
Copy link
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

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

Thanks. Looks good (as good as CMake allows).

@petiaccja
Copy link
Contributor Author

launch jenkins

@havogt
Copy link
Contributor

havogt commented Aug 9, 2022

add to whitelist

@havogt
Copy link
Contributor

havogt commented Aug 9, 2022

launch jenkins

@petiaccja
Copy link
Contributor Author

launch jenkins

@petiaccja
Copy link
Contributor Author

launch jenkins

@petiaccja
Copy link
Contributor Author

launch jenkins

@petiaccja
Copy link
Contributor Author

launch jenkins

@petiaccja
Copy link
Contributor Author

launch perftest

@petiaccja petiaccja merged commit 397094d into GridTools:master Aug 16, 2022
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.

CMake: errors out on perftest if neither OpenMP nor CUDA was found
3 participants