Daily Backlog Burner: Add include directory for easier Z3 integration #7907
+54
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the enhancement requested in issue #1664 by adding a build-time
includedirectory that consolidates all Z3 API headers in a single, convenient location for developers.Problem Statement
Currently, developers using Z3 from source need to specify multiple include paths (
src/api,src/api/c++) to access all Z3 API headers. This differs from standard C/C++ project conventions and makes Z3 integration more cumbersome than necessary.Solution
Implemented a CMake-based solution that automatically creates and populates an
includedirectory in the build tree:Changes Made
z3_headers_copythat runs during buildz3*.h) and C++ API header (z3++.h) tobuild/include/libz3target to expose the include directory viatarget_include_directoriescopy_if_differentTechnical Implementation
Benefits
Usage Examples
Manual Compilation
CMake Integration
Direct Include
Testing
build/include/directory is created during CMake configuration-I build/includefind_package(Z3)Backward Compatibility
This change is fully backward compatible:
src/api/,src/api/c++/) remain availableRelated Issues
Closes #1664: "Create a include folder"Maintainer Notes
This implementation follows the guidance provided by
@NikolajBjornerin the issue comments, using CMake build scripts to create the include directory rather than manual source tree modifications. The solution integrates cleanly with Z3's existing build system and export mechanisms.> AI-generated content by Daily Backlog Burner may contain mistakes.