Skip to content

Set blas cmake options also with PARENT_SCOPE#10

Merged
Rbiessy merged 1 commit intouxlfoundation:mainfrom
rafbiels:blas-cmake-parent-scope
Apr 22, 2025
Merged

Set blas cmake options also with PARENT_SCOPE#10
Rbiessy merged 1 commit intouxlfoundation:mainfrom
rafbiels:blas-cmake-parent-scope

Conversation

@rafbiels
Copy link
Contributor

After #7 dependent projects can read the options BLAS_ENABLE_COMPLEX and BLAS_ENABLE_USM both when using an installed generic blas configuration and when using include() to consume the generic blas CMakeLists.txt (as it happens with FetchContent).

However, in the latter case, the update of those values when AdaptiveCpp is detected with simple set() changes only the local value and leaves the parent-scope value at the default ON. This breaks oneMath compilation with AdaptiveCpp when including generic blas with FetchContent.

Detect when the generic blas CMakeLists.txt is not the top-level project scope (cf. CMake discourse) and change the values of these options also in the PARENT_SCOPE.

This is required for the update value to be visible
in a dependent project including generic blas using
FetchContent.
@Rbiessy Rbiessy merged commit d73e898 into uxlfoundation:main Apr 22, 2025
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