Skip to content

Conversation

BillyONeal
Copy link

Appears to be necessary on modern versions of CMake where variables are no longer case insensitive. Fixes build error on macOS 15.6.1 like the following:

/Users/vcpkg/vcpkg/installed/arm64-osx/include/CL/cl_version.h:22:9: warning: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0) [-W#pragma-messages]
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^
/Users/vcpkg/vcpkg/buildtrees/clblas/src/v2.12-ffa3881f06.clean/src/library/blas/init.c:36:32: error: expected expression
   36 |     *major = clblasVersionMajor;
      |                                ^
/Users/vcpkg/vcpkg/buildtrees/clblas/src/v2.12-ffa3881f06.clean/src/library/blas/init.c:37:32: error: expected expression
   37 |     *minor = clblasVersionMinor;
      |                                ^
/Users/vcpkg/vcpkg/buildtrees/clblas/src/v2.12-ffa3881f06.clean/src/library/blas/init.c:38:32: error: expected expression
   38 |     *patch = clblasVersionPatch;
      |                                ^
1 warning and 3 errors generated.

Appears to be necessary on modern versions of CMake where variables are no longer case insensitive. Fixes build error on macOS 15.6.1 like the following:

```console
/Users/vcpkg/vcpkg/installed/arm64-osx/include/CL/cl_version.h:22:9: warning: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0) [-W#pragma-messages]
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^
/Users/vcpkg/vcpkg/buildtrees/clblas/src/v2.12-ffa3881f06.clean/src/library/blas/init.c:36:32: error: expected expression
   36 |     *major = clblasVersionMajor;
      |                                ^
/Users/vcpkg/vcpkg/buildtrees/clblas/src/v2.12-ffa3881f06.clean/src/library/blas/init.c:37:32: error: expected expression
   37 |     *minor = clblasVersionMinor;
      |                                ^
/Users/vcpkg/vcpkg/buildtrees/clblas/src/v2.12-ffa3881f06.clean/src/library/blas/init.c:38:32: error: expected expression
   38 |     *patch = clblasVersionPatch;
      |                                ^
1 warning and 3 errors generated.
````
@dg0yt
Copy link

dg0yt commented Sep 18, 2025

modern versions of CMake where variables are no longer case insensitive.

I'm not aware of any such version.
(Windows enviroment variables and filepaths are a different topic.)

@BillyONeal
Copy link
Author

BillyONeal commented Sep 18, 2025

Hmmm... I could have swore a big thing in the CMake 4.x about case sensitivity changes but I can't find what it was I was thinking of now. I'm not sure exactly why configure_file seems to hate expanding @clBLAS_VERSION_MAJOR@ et al. otherwise.

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

Successfully merging this pull request may close these issues.

2 participants