Skip to content

[CMake][tmva] Fix SOFIE tests exclusion with builtin GSL#21582

Open
AdityaDRathore wants to merge 1 commit intoroot-project:masterfrom
AdityaDRathore:fix/tmva-cmake-gsl
Open

[CMake][tmva] Fix SOFIE tests exclusion with builtin GSL#21582
AdityaDRathore wants to merge 1 commit intoroot-project:masterfrom
AdityaDRathore:fix/tmva-cmake-gsl

Conversation

@AdityaDRathore
Copy link

This Pull request:

The TMVA-SOFIE test configurations in tmva/sofie/test/CMakeLists.txt currently gate the GTest targets strictly on if(BLAS_FOUND).

However, when ROOT is configured to fall back to the builtin GSL library to fulfill its BLAS interface requirement (-Dbuiltin_gsl=ON), the use_gsl_cblas CMake flag is correctly set to ON, but BLAS_FOUND remains OFF.

Consequently, TMVA successfully links against the internal ROOT::BLAS interface, but the SOFIE execution tests (e.g., TestRModelParserKeras, TestRModelParserPyTorch) are silently excluded from the build manifest.

This patch updates the capability checks to account for both standalone BLAS discovery and GSL CBLAS fallback by verifying if (BLAS_FOUND OR use_gsl_cblas).

Reproducer

cmake -Dbuiltin_gsl=ON -Dtpython=ON -DROOT_TEST_KERAS=ON ../src
cmake --build . --target TestRModelParserKeras

(Fails: Target does not exist prior to this patch).

Changes or fixes:

The capability checks in tmva/sofie/test/CMakeLists.txt need to account for both standalone BLAS discovery and GSL CBLAS fallback.

For instance, surrounding the GTest targets, the conditional logic:

if (BLAS_FOUND)

And

if (tpython AND ROOT_KERAS_FOUND AND BLAS_FOUND)

Should be updated to:

if (BLAS_FOUND OR use_gsl_cblas)

And

if (tpython AND ROOT_KERAS_FOUND AND (BLAS_FOUND OR use_gsl_cblas))

(I have tested this patch locally and it successfully re-enables the test suite compilation while correctly linking TestRModelParserKeras against the GSL CBLAS interface).

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@bellenot @lmoneta @sanjibansg @guitargeek

@AdityaDRathore AdityaDRathore changed the title [CMake][tmva] Fix SOFIE tests exclusion with builtin GSL (use_gsl_cblas=ON) [CMake][tmva] Fix SOFIE tests exclusion with builtin GSL Mar 12, 2026
@guitargeek guitargeek self-assigned this Mar 13, 2026
@guitargeek guitargeek self-requested a review March 13, 2026 10:35
@github-actions
Copy link

Test Results

    21 files      21 suites   3d 1h 15m 9s ⏱️
 3 807 tests  3 806 ✅ 1 💤 0 ❌
73 228 runs  73 219 ✅ 9 💤 0 ❌

Results for commit a088275.

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