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

Overtacking of source code from internal projects #57

Open
SimeonEhrig opened this issue Jul 1, 2021 · 3 comments
Open

Overtacking of source code from internal projects #57

SimeonEhrig opened this issue Jul 1, 2021 · 3 comments

Comments

@SimeonEhrig
Copy link
Contributor

During my work on creating a CMake installer for cupla, I looked in the Alpaka CMake and found some useful stuff, which I would overtake. Now, there the is the question, if we should cite the original author if yes, how?

@sbastrakov
Copy link
Member

I would imagine this should be done same way as for external code: according to the licence of the cited piece. Given we don't always have the same licence, so has to be done on a case-by-case basis.

@SimeonEhrig
Copy link
Contributor Author

Okay, but I also mean something like this:

# Find cupla version.
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/include/cupla/version.hpp" CUPLA_VERSION_MAJOR_HPP REGEX "#define CUPLA_VERSION_MAJOR ")
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/include/cupla/version.hpp" CUPLA_VERSION_MINOR_HPP REGEX "#define CUPLA_VERSION_MINOR ")
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/include/cupla/version.hpp" CUPLA_VERSION_PATCH_HPP REGEX "#define CUPLA_VERSION_PATCH ")

string(REGEX MATCH "([0-9]+)" CUPLA_VERSION_MAJOR  ${CUPLA_VERSION_MAJOR_HPP})
string(REGEX MATCH "([0-9]+)" CUPLA_VERSION_MINOR  ${CUPLA_VERSION_MINOR_HPP})
string(REGEX MATCH "([0-9]+)" CUPLA_VERSION_PATCH  ${CUPLA_VERSION_PATCH_HPP})

set(PACKAGE_VERSION "${CUPLA_VERSION_MAJOR}.${CUPLA_VERSION_MINOR}.${CUPLA_VERSION_PATCH}")

Should I mentioned, that I copied it from alpaka?

@sbastrakov
Copy link
Member

I am not sure. I probably would, but also can see the case for not doing it

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

No branches or pull requests

2 participants