Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake modernisation #62

Merged
merged 7 commits into from
Feb 14, 2024
Merged

Conversation

Johanmyst
Copy link
Contributor

As requested by @yuleisui in pull request #1305 in the main SVF repository, this pull request updates the CMake scripts for the example project.

The changes in this request show how to include SVF when installed through the updated CMake script, and how the different build configuration variables can be accessed. I tested this using LLVM 15.0.7 (release build) and the most recent version of SVF.

@yuleisui
Copy link
Collaborator

@Johanmyst there is an error when trying to find_package(SVF). Could you please take a look: https://github.com/SVF-tools/SVF-example/actions/runs/7540713641/job/20525892923?pr=62#step:8:35

@Johanmyst
Copy link
Contributor Author

@Johanmyst there is an error when trying to find_package(SVF). Could you please take a look: https://github.com/SVF-tools/SVF-example/actions/runs/7540713641/job/20525892923?pr=62#step:8:35

That's because I wrote this as an example of how to use the modernised version (that I assumed would show how to use the SVF CMake package if it was installed), so when the CMake package wasn't installed this would fail. However, I've retrofitted the "official"/old approach into this update so now it should just use the old approach when the CMake package cannot be found.

@yuleisui
Copy link
Collaborator

@Johanmyst there is an error when trying to find_package(SVF). Could you please take a look: https://github.com/SVF-tools/SVF-example/actions/runs/7540713641/job/20525892923?pr=62#step:8:35

That's because I wrote this as an example of how to use the modernised version (that I assumed would show how to use the SVF CMake package if it was installed), so when the CMake package wasn't installed this would fail. However, I've retrofitted the "official"/old approach into this update so now it should just use the old approach when the CMake package cannot be found.

Yes, I noticed this. However, I also realize the old folder layout and npm should be improved and make the folder layout consistent with your installation mode.

@yuleisui
Copy link
Collaborator

@Johanmyst svf’s NPM is a direct copy of the release-build, if you could help fix SVF’s build by generating the same layout as your installation. We can have a compact and clean cmake here using the find_package way.

@yuleisui yuleisui merged commit 9f53f34 into SVF-tools:master Feb 14, 2024
0 of 2 checks passed
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