{"action":"created","issue":{"url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka/issues/183","repository_url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka","labels_url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka/issues/183/comments","events_url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka/issues/183/events","html_url":"https://github.com/ComputationalRadiationPhysics/alpaka/issues/183","id":136913161,"number":183,"title":"Support for Library Builds","user":{"login":"mxmlnkn","id":6842824,"avatar_url":"https://avatars.githubusercontent.com/u/6842824?v=3","gravatar_id":"","url":"https://api.github.com/users/mxmlnkn","html_url":"https://github.com/mxmlnkn","followers_url":"https://api.github.com/users/mxmlnkn/followers","following_url":"https://api.github.com/users/mxmlnkn/following{/other_user}","gists_url":"https://api.github.com/users/mxmlnkn/gists{/gist_id}","starred_url":"https://api.github.com/users/mxmlnkn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxmlnkn/subscriptions","organizations_url":"https://api.github.com/users/mxmlnkn/orgs","repos_url":"https://api.github.com/users/mxmlnkn/repos","events_url":"https://api.github.com/users/mxmlnkn/events{/privacy}","received_events_url":"https://api.github.com/users/mxmlnkn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-27T12:28:42Z","updated_at":"2016-02-29T06:08:20Z","closed_at":null,"body":"[imresh](https://github.com/ComputationalRadiationPhysics/imresh) makes heavy use of interim static libraries to reduce compile times and also the finished product is supposed to be a [shared] library which can be linked against. There are some things which are problematic when using alpaka. I'm not finished porting yet, so there may be still more problems:\r\n\r\n - `ALPAKA_FN_ACC` which e.g. replaces `__global__` when porting from CUDA adds a `__force_inline__` or `inline` which makes it impossible to compile a library, see commit 0564c8428bb9cfb2fb43b1d21770cee630464a1c\r\n - to compile a library in the first place explicit instantiations of the accelerator type are necessary and add boiler plate could, which maybe could be prevented with some kind of macro provided by alpaka, see [here](https://github.com/ComputationalRadiationPhysics/imresh/commit/fa703de79a3501d8c119bc23976be61561405799#diff-3bf5faeb9a2e700f0ac9de222a9fbeb4R404) and [here](https://github.com/ComputationalRadiationPhysics/imresh/blob/fa703de79a3501d8c119bc23976be61561405799/src/imresh/libs/alpaka_T_ACC.hpp)  They were necessary anyway in imresh, but now they become nested.\r\n - I couldn't find a `ALPAKA_ADD_LIBRARY` `CMake` function, only `ALPAKA_ADD_EXECUTABLE`, see commit 67e9554158212e76a895ba135b20feb1c7768f28"},"comment":{"url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka/issues/comments/190058869","html_url":"https://github.com/ComputationalRadiationPhysics/alpaka/issues/183#issuecomment-190058869","issue_url":"https://api.github.com/repos/ComputationalRadiationPhysics/alpaka/issues/183","id":190058869,"user":{"login":"BenjaminW3","id":8956583,"avatar_url":"https://avatars.githubusercontent.com/u/8956583?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjaminW3","html_url":"https://github.com/BenjaminW3","followers_url":"https://api.github.com/users/BenjaminW3/followers","following_url":"https://api.github.com/users/BenjaminW3/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminW3/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminW3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminW3/subscriptions","organizations_url":"https://api.github.com/users/BenjaminW3/orgs","repos_url":"https://api.github.com/users/BenjaminW3/repos","events_url":"https://api.github.com/users/BenjaminW3/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminW3/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T06:08:20Z","updated_at":"2016-02-29T06:08:20Z","body":"I will have a look at those multiply defined symbols. I will look for a different solution instead of compiling seperate `.cpp` files to keep the library header only.\r\n`libalpaka.a` is not currently linked because it does not contain anything at the moment as it is an empty dummy library necessary to trick CMake."}}