{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl/issues/120","repository_url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl","labels_url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl/issues/120/comments","events_url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl/issues/120/events","html_url":"https://github.com/JuliaGPU/OpenCL.jl/issues/120","id":182352018,"number":120,"title":"Conditional load of OpenCL.jl","user":{"login":"klkeys","id":12282140,"avatar_url":"https://avatars.githubusercontent.com/u/12282140?v=3","gravatar_id":"","url":"https://api.github.com/users/klkeys","html_url":"https://github.com/klkeys","followers_url":"https://api.github.com/users/klkeys/followers","following_url":"https://api.github.com/users/klkeys/following{/other_user}","gists_url":"https://api.github.com/users/klkeys/gists{/gist_id}","starred_url":"https://api.github.com/users/klkeys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klkeys/subscriptions","organizations_url":"https://api.github.com/users/klkeys/orgs","repos_url":"https://api.github.com/users/klkeys/repos","events_url":"https://api.github.com/users/klkeys/events{/privacy}","received_events_url":"https://api.github.com/users/klkeys/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl/labels/upstream","name":"upstream","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-11T19:26:21Z","updated_at":"2016-10-17T17:36:24Z","closed_at":null,"body":"Is it possible to conditionally load OpenCL depending on whether or not Julia can find an OpenCL library? For Unix systems, I thought that I could imitate what appears in `api.jl`:\r\n\r\n    module MyMulticoreModule\r\n\r\n    using LotsOfCPUPackages\r\n\r\n    ### only load OpenCL.jl if the library is found\r\n    const libopencl = Libdl.find_library([\"libOpenCL\", \"OpenCL\"])\r\n    if libopencl == \"\"\r\n        warn(\"cannot find OpenCL library!\")\r\n    else\r\n         using OpenCL\r\n    end\r\n\r\n    include(\"my_cpu_code.jl\")\r\n\r\n    ### same deal\r\n    if libopencl != \"\"\r\n        include(\"my_gpu_code.jl\")\r\n    end\r\n\r\n    end"},"comment":{"url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl/issues/comments/254277616","html_url":"https://github.com/JuliaGPU/OpenCL.jl/issues/120#issuecomment-254277616","issue_url":"https://api.github.com/repos/JuliaGPU/OpenCL.jl/issues/120","id":254277616,"user":{"login":"klkeys","id":12282140,"avatar_url":"https://avatars.githubusercontent.com/u/12282140?v=3","gravatar_id":"","url":"https://api.github.com/users/klkeys","html_url":"https://github.com/klkeys","followers_url":"https://api.github.com/users/klkeys/followers","following_url":"https://api.github.com/users/klkeys/following{/other_user}","gists_url":"https://api.github.com/users/klkeys/gists{/gist_id}","starred_url":"https://api.github.com/users/klkeys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klkeys/subscriptions","organizations_url":"https://api.github.com/users/klkeys/orgs","repos_url":"https://api.github.com/users/klkeys/repos","events_url":"https://api.github.com/users/klkeys/events{/privacy}","received_events_url":"https://api.github.com/users/klkeys/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T17:36:24Z","updated_at":"2016-10-17T17:36:24Z","body":"@juliohm it seems to work in my case. Thank you for the workaround!"}}
{"actor":{"display_login":"klkeys"}}