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

Device toolchains #27

Open
InBetweenNames opened this issue Feb 16, 2021 · 0 comments
Open

Device toolchains #27

InBetweenNames opened this issue Feb 16, 2021 · 0 comments

Comments

@InBetweenNames
Copy link

CMake has the notion of a Host toolchain which is useful for configuring for cross compilation and specifying which compiler to use. Would it be useful to extend this concept to cover Device toolchains as well? The OpenCL CTS Framework repository previously had the notion of a Device Toolchain described here: https://github.com/KhronosGroup/OpenCL-CTS-Framework/tree/master/03-conformance-checks

Some of the variables that were used in that repository are documented below:

  • CMAKE_OPENCL_TOOLCHAIN_NAME - A string that can be used to describe the compiler
  • CMAKE_OPENCL_C_COMPILER - Analogous to CMake's CMAKE_C_COMPILER variable. This is the path to the OpenCL C compiler binary
  • CMAKE_OPENCL_CXX_COMPILER - Analogous to CMake's CMAKE_CXX_COMPILER variable. This is the path to the OpenCL C++ compiler binary
  • CMAKE_OPENCL_CXX_STDLIB - This is the path to the OpenCL C++ compiler's standard library. OpenCL C++ standard libraries are assumed to be header-only for now.
  • CMAKE_OPENCL_CXX_INCLUDE_FLAG - Used when passing in additional includes to the OpenCL C or OpenCL C++ compiler. A typical definition is "-I".
  • CMAKE_OPENCL_CXX_OUTPUT_FLAG - Used when informing the compiler where to place the output binary. A typical definition is "-o".
  • CMAKE_OPENCL_CXX_INPUT_FLAG - Used when passing in the source file's path to the OpenCL or OpenCL C++ compiler. With the reference Clang, this is left unset.
  • CMAKE_OPENCL_DEFAULT_FLAGS - Default flags that are passed with every invocation of the compiler.
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

1 participant