{"id":15176759,"url":"https://github.com/mmha/conan-computecpp","last_synced_at":"2025-10-26T14:30:31.454Z","repository":{"id":135368321,"uuid":"134613690","full_name":"mmha/conan-computecpp","owner":"mmha","description":"Conan package for ComputeCpp","archived":false,"fork":false,"pushed_at":"2018-07-31T10:03:26.000Z","size":23,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-31T20:13:47.411Z","etag":null,"topics":["cmake","cmake-module","cmake-modules","conan","conan-recipe","cplusplus","cpp","cpp11","gpgpu","opencl","sycl"],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-23T19:01:56.000Z","updated_at":"2024-04-19T15:49:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6f2da7c-3711-419b-8e4c-3656632d2f48","html_url":"https://github.com/mmha/conan-computecpp","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.2857142857142857,"last_synced_commit":"fcec4a598934323101106369b9cd7bd2e2ca3934"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmha%2Fconan-computecpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmha%2Fconan-computecpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmha%2Fconan-computecpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmha%2Fconan-computecpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmha","download_url":"https://codeload.github.com/mmha/conan-computecpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238337750,"owners_count":19455365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cmake-module","cmake-modules","conan","conan-recipe","cplusplus","cpp","cpp11","gpgpu","opencl","sycl"],"created_at":"2024-09-27T13:41:54.724Z","updated_at":"2025-10-26T14:30:26.161Z","avatar_url":"https://github.com/mmha.png","language":"CMake","readme":"# Conan Recipe and SYCL as a CMake Language for ComputeCpp\nThis repository contains a recipe for repackaging ComputeCpp as a conan package together with a set of CMake modules that allow the use SYCL without any usage of macros.\n\n---------------\n#### WARNING: Both the Conan recipe and the CMake modules are highly experimental. They are likely to break as development of both ComputeCpp and the scripts themselves progress.\n\n---------------\n\n## Prerequisites\n- [CMake 3.7 or greater](https://cmake.org/)\n- [Conan](https://conan.io/)\n\nBoth CMake and Conan are also available on `pip`:\n\n```bash\npip install --user cmake conan\n```\n\n## Creating a Conan package\nThe conan recipe won't download ComputeCpp by itself. You need to download it from the [Codeplay website](https://developer.codeplay.com) and place the tarball into the same directory as `conanfile.py`. After that, you can create your package as usual:\n\n```bash\ncd conan-computecpp\nconan create . codeplay/testing\n```\n\n## Using ComputeCpp with CMake\n\u003e Note that the `FindComputeCpp.cmake` module from the SDK will still work with the conan package.\n\nThe recipe also installs an experimental set of CMake modules that integrate SYCL tightly into CMake such that enabling SYCL is as simple as `find_package(ComputeCpp)`:\n\n\n**CMakeLists.txt**\n\n```cmake\ncmake_minimum_required(VERSION 3.7)\nproject(hello_sycl)\n\n# This will enable SYCL as a CMake language and set compute++ to be its compiler\nfind_package(ComputeCpp REQUIRED)\n\n# The device compiler will be automatically invoked on each .cpp file.\n# Every target containing SYCL code will implicitly link against ComputeCpp\nadd_executable(app my_parallel_code.cpp)\n```\n\n**conanfile.txt**\n\n```ini\n[requires]\ncomputecpp/0.8.0@codeplay/testing\n\n[generators]\ncmake_paths\n```\n\n**Build process:**\n\n```bash\nmkdir build\ncd build\nconan install ..\ncmake .. -DCMAKE_TOOLCHAIN_FILE=conan_paths.cmake [-GNinja]\nninja\n```\n\nWhen invoking CMake, the configuration log should print out something similar to this:\n\n```\n-- The C compiler identification is GNU 8.1.0\n-- The CXX compiler identification is GNU 8.1.0\n-- Check for working C compiler: /usr/bin/cc\n-- Check for working C compiler: /usr/bin/cc -- works\n-- Detecting C compiler ABI info\n-- Detecting C compiler ABI info - done\n-- Detecting C compile features\n-- Detecting C compile features - done\n-- Check for working CXX compiler: /usr/bin/c++\n-- Check for working CXX compiler: /usr/bin/c++ -- works\n-- Detecting CXX compiler ABI info\n-- Detecting CXX compiler ABI info - done\n-- Detecting CXX compile features\n-- Detecting CXX compile features - done\n-- Current conanbuildinfo.cmake directory: /home/morris/Projects/hello_sycl/build\n-- Conan: Compiler GCC\u003e=5, checking major version 8.1\n-- Conan: Checking correct version: 8.1\n-- Conan: Using cmake global configuration\n-- Conan: Adjusting language standard\n-- Found SYCL: /home/morris/.conan/data/computecpp/0.8.0/codeplay/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/compute++ (found version \"CE 0.8.0\")\n-- The SYCL compiler identification is ComputeCpp CE 0.8.0\n-- Check for working SYCL compiler: /home/morris/.conan/data/computecpp/0.8.0/codeplay/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/compute++\n-- Check for working SYCL compiler: /home/morris/.conan/data/computecpp/0.8.0/codeplay/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/compute++ -- works\n-- Detecting SYCL compiler ABI info\n-- Detecting SYCL compiler ABI info - done\n-- Configuring done\n-- Generating done\n-- Build files have been written to: /home/morris/Projects/hello_sycl/build\n```\n\n## Opting out of SYCL\n\nTo exclude just a couple of files, use `set_source_files_properties`:\n\n```cmake\nadd_executable(app my_parallel_code.cpp cpu_only.cpp more_cpu_only_code.cpp)\nset_source_files_properties(cpu_only.cpp more_cpu_only_code.cpp PROPERTIES LANGUAGE CXX)\n```\n\nTo make SYCL opt-in, you have to enable the `CXX` language after the `find_package(ComputeCpp)` call:\n\n```cmake\ncmake_minimum_required(VERSION 3.4)\nproject(hello_sycl LANGUAGES C)\n\nfind_package(ComputeCpp REQUIRED)\nenable_language(CXX)\n\n# The host compiler will be invoked for each .cpp file unless overridden by set_source_files_properties\nadd_executable(app my_parallel_code.cpp cpu_only.cpp more_cpu_only_code.cpp)\nset_source_files_properties(my_parallel_code.cpp PROPERTIES LANGUAGE SYCL)\n```\n\n## Current Limitations\n- This is completely untested on Windows\n- Currently only the SYCL driver mode is supported. Using a separate compiler for the host code might be feasible\n- The rpath won't be set correctly unless the `LINKER_LANGUAGE` of the target is forced to `CXX`\n- `CMAKE_CXX_STANDARD`, `CMAKE_SYCL_STANDARD` and compile features are not supported. This will probably require an upstream change to CMake.\n- TriSYCL is not supported yet\n\n## License\nThe build scripts are license under the Apache 2.0 license. Check the ComputeCpp end user agreement for the license of ComputeCpp itself.\n\nThe CMake modules are based on upstream CMake modules. Please see the files for their respective licences.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmha%2Fconan-computecpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmha%2Fconan-computecpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmha%2Fconan-computecpp/lists"}