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

Remove the support to build each test on its own #543

Closed
BenjaminW3 opened this issue Jun 23, 2018 · 1 comment
Closed

Remove the support to build each test on its own #543

BenjaminW3 opened this issue Jun 23, 2018 · 1 comment

Comments

@BenjaminW3
Copy link
Member

Currently each test can be build completely separate from all other tests. Each test is a new project which searches for alpaka, boost and the test common library and links them. They can be copied out of the alpaka repo and be built from anywhere as long as the ALPAKA_ROOT variable is correctly set.
This makes the CMakeLists unnecessarily complex.
The tests CMakeLists could be nearly half the size if we would only search for dependencies and apply test settings in the top-level test folders CMakeLists.txt. This is also the de-facto standard for CMake projects. I do not see a reason to extract single tests from the repo. The tests will always be built in combination with the alpaka library itself.
The examples currently have the same features. However, there I can see a reason why one would want to build them independently. Therefore I would keep everything as is for the examples.
What do you think?

@BenjaminW3 BenjaminW3 added this to the Future milestone Jun 23, 2018
@BenjaminW3 BenjaminW3 changed the title Remove the support to build each tests on its own Remove the support to build each test on its own Jun 23, 2018
@ax3l
Copy link
Member

ax3l commented Jun 24, 2018

yes, tests don't need a full project, .cmake snippets are enought

Ideally tests should just be build with the root CMakeLists.txt as long as the CMake commonly standardized variable BUILD_TESTING is ON. This is what #476 added as interface (also #478 keeps this).

Instead of adding a add_subdirectory for each test, just include() them as .cmake files that define targets that use dependencies from the root CMakeLists.txt (or a find_package(... CONFIG) of alpaka). #478 tries to unify this further, but did not yet change the include of the tests away from add_subdirectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants