{"action":"created","issue":{"url":"https://api.github.com/repos/jcuda/jcuda-main/issues/4","repository_url":"https://api.github.com/repos/jcuda/jcuda-main","labels_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/4/comments","events_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/4/events","html_url":"https://github.com/jcuda/jcuda-main/issues/4","id":144229329,"number":4,"title":"Jcuda on OS X with CUDA 7.5","user":{"login":"phvu","id":1087992,"avatar_url":"https://avatars.githubusercontent.com/u/1087992?v=3","gravatar_id":"","url":"https://api.github.com/users/phvu","html_url":"https://github.com/phvu","followers_url":"https://api.github.com/users/phvu/followers","following_url":"https://api.github.com/users/phvu/following{/other_user}","gists_url":"https://api.github.com/users/phvu/gists{/gist_id}","starred_url":"https://api.github.com/users/phvu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phvu/subscriptions","organizations_url":"https://api.github.com/users/phvu/orgs","repos_url":"https://api.github.com/users/phvu/repos","events_url":"https://api.github.com/users/phvu/events{/privacy}","received_events_url":"https://api.github.com/users/phvu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-29T11:03:51Z","updated_at":"2016-03-31T11:14:26Z","closed_at":null,"body":"Just a reminder, in order to build `jcuda` on OS X El Capitan with CUDA 7.5, it is crucial to set \r\n\r\n```\r\nCMAKE_EXE_LINKER_FLAGS='-Xlinker -F/Library/Frameworks -Xlinker -framework -Xlinker CUDA'\r\nCMAKE_SHARED_LINKER_FLAGS='-Xlinker -F/Library/Frameworks -Xlinker -framework -Xlinker CUDA'\r\n```\r\n\r\nThose variables can be set in `cmake-ui` after select the `Advanced` option.\r\n\r\nRef: https://github.com/dmlc/mxnet/issues/728#issuecomment-160867057\r\n\r\nMaybe adding this note into `README`?"},"comment":{"url":"https://api.github.com/repos/jcuda/jcuda-main/issues/comments/203883105","html_url":"https://github.com/jcuda/jcuda-main/issues/4#issuecomment-203883105","issue_url":"https://api.github.com/repos/jcuda/jcuda-main/issues/4","id":203883105,"user":{"login":"jcuda","id":13698062,"avatar_url":"https://avatars.githubusercontent.com/u/13698062?v=3","gravatar_id":"","url":"https://api.github.com/users/jcuda","html_url":"https://github.com/jcuda","followers_url":"https://api.github.com/users/jcuda/followers","following_url":"https://api.github.com/users/jcuda/following{/other_user}","gists_url":"https://api.github.com/users/jcuda/gists{/gist_id}","starred_url":"https://api.github.com/users/jcuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcuda/subscriptions","organizations_url":"https://api.github.com/users/jcuda/orgs","repos_url":"https://api.github.com/users/jcuda/repos","events_url":"https://api.github.com/users/jcuda/events{/privacy}","received_events_url":"https://api.github.com/users/jcuda/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T11:14:26Z","updated_at":"2016-03-31T11:14:26Z","body":"The main goal of this test/snippet was to see whether it properly detects the right OS version (and a *basic* test to see whether it might work then).  \r\n\r\nThe variable setting will not appear in the CMake GUI. But it should still be passed to the actual linker call. (At least, I added it, and it did *not* appear in the CMake GUI, but in the Visual Studio command lines). \r\n\r\n(The `CMAKE_SHARED_LINKER_FLAGS` is something that is handled internally by CMake, and filled with some values as soon as it knows the target platform. E.g. on Win64, it will automagically be filled with `/machine:x64` - some MSVC specific setting. **When** exactly it is filled (and thus *when* it may be extended with the required parameters) seems to be unspecified - at least, I couldn't figure it out yet). \r\n\r\nSo I'm not sure about the best way to integrate this. But I'll probably just put it into `JCudaCommon_CMake_flags.txt`, together with some \r\n\r\n    if (NOT CMAKE_CUDA_SHARED_LINKER_FLAGS_INITIALIZED)\r\n        ...\r\n        set(CMAKE_CUDA_SHARED_LINKER_FLAGS_INITIALIZED \"true\")\r\n    endif()\r\n\r\nguard. I'm pretty sure that this is not the best way to do it, but honestly: There are always so many options for achieving the (seemingly) same thing in CMake, and the scope of settings, override rules and caching policies is ... confusing, to say the least - so the only way to find out what a \"good\" solution is seems to be trial and error...\r\n\r\n(I'm open for recommendations and hints, of course...)\r\n"}}