Add CMakePresets.json for better IDE and build system integration
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+)
Can one of the admins verify this patch?
@Adityabaskati-weeb Would it be possible to make those changes in-code? It will be easier to review. Thanks!
@Adityabaskati-weeb Would it be possible to make those changes in-code? It will be easier to review. Thanks!
ohk
@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.