Skip to content

Commit

Permalink
apacheGH-42109: [C++][CMake] Add preset for Valgrind (apache#42110)
Browse files Browse the repository at this point in the history
### Rationale for this change

If we want to use Valgrind for our tests, we need to specify at least the following CMake options:

* `ARROW_RUNTIME_SIMD_LEVEL=AVX2`
* `ARROW_TEST_MEMCHECK=ON`

If we have a CMake preset for Valgrind, we don't need to remember them.

### What changes are included in this PR?

Add `features-valgrind` and `ninja-debug-valgrind` preset. `features-valgrind` is a hidden preset.

### Are these changes tested?

Yes. I used this to reproduce apache#42107 on local.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#42109

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kou authored Jun 13, 2024
1 parent 787a6ab commit 40f9c26
Showing 1 changed file with 49 additions and 1 deletion.
50 changes: 49 additions & 1 deletion cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@
"PARQUET_REQUIRE_ENCRYPTION": "ON"
}
},
{
"name": "features-valgrind",
"hidden": true,
"cacheVariables": {
"ARROW_RUNTIME_SIMD_LEVEL": "AVX2",
"ARROW_TEST_MEMCHECK": "ON"
}
},
{
"name": "ninja-debug-minimal",
"inherits": [
Expand Down Expand Up @@ -331,6 +339,46 @@
"displayName": "Debug build with everything enabled (except benchmarks)",
"cacheVariables": {}
},
{
"name": "ninja-debug-valgrind-basic",
"inherits": [
"base-debug",
"features-basic",
"features-valgrind"
],
"displayName": "Debug build for Valgrind with reduced dependencies",
"cacheVariables": {}
},
{
"name": "ninja-debug-valgrind",
"inherits": [
"base-debug",
"features-main",
"features-valgrind"
],
"displayName": "Debug build for Valgrind with more optional components",
"cacheVariables": {}
},
{
"name": "ninja-debug-valgrind-minimal",
"inherits": [
"base-debug",
"features-minimal",
"features-valgrind"
],
"displayName": "Debug build for Valgrind without anything enabled",
"cacheVariables": {}
},
{
"name": "ninja-debug-valgrind-maximal",
"inherits": [
"base-debug",
"features-maximal",
"features-valgrind"
],
"displayName": "Debug build for Valgrind with everything enabled",
"cacheVariables": {}
},
{
"name": "ninja-release-minimal",
"inherits": [
Expand Down Expand Up @@ -491,4 +539,4 @@
}
}
]
}
}

0 comments on commit 40f9c26

Please sign in to comment.