hpx icon indicating copy to clipboard operation
hpx copied to clipboard

Add CMakePresets.json for better IDE and build system integration

Open Adityabaskati-weeb opened this issue 1 month ago • 4 comments

What does this PR do?

Adds a CMakePresets.json file to provide pre-defined build configurations for HPX.

Key Benefits:

  • Easier Onboarding: New users can quickly get started with common HPX configurations
  • IDE Integration: Works seamlessly with IDEs like VS Code, CLion, and Visual Studio
  • Reproducible Builds: Ensures consistent builds across different environments
  • Documentation: Serves as living documentation of common build configurations

Included Presets:

  • release: Optimized release build
  • debug: Debug build with debug symbols and stack traces
  • minimal: Minimal build with essential features
  • full: Full build with all features (tests, examples, docs)
  • mpi: MPI-enabled build
  • sanitizers: Builds with various sanitizers (ASan, TSan, UBSan)
  • coverage: Code coverage build

Usage:

# Configure with a preset
cmake --preset=debug

# Build using a preset
cmake --build --preset=debug

# Run tests
ctest --preset=debug


Requirements:
CMake 3.19 or later (HPX already requires 3.18+)

Adityabaskati-weeb avatar Nov 17 '25 06:11 Adityabaskati-weeb

Can one of the admins verify this patch?

StellarBot avatar Nov 17 '25 06:11 StellarBot

@Adityabaskati-weeb Would it be possible to make those changes in-code? It will be easier to review. Thanks!

Pansysk75 avatar Nov 19 '25 05:11 Pansysk75

@Adityabaskati-weeb Would it be possible to make those changes in-code? It will be easier to review. Thanks!

ohk

Adityabaskati-weeb avatar Nov 19 '25 07:11 Adityabaskati-weeb

@Adityabaskati-weeb Hi, if I may make a suggestion, let's keep this pull request limited to the CMakeUserPresets.json, keeping it as simple as we can. If you have any suggestions for other parts of the CMake configuration, let's discuss that separately.

Pansysk75 avatar Dec 02 '25 19:12 Pansysk75