-
Notifications
You must be signed in to change notification settings - Fork 274
How do I add CBMC as a dependency in a cmake project using FetchContent? #7649
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
Comments
Hi. Both myself and @esteffin use CLion together with CMAKE for our work maintaining cbmc. Unfortunately neither of us currently use cbmc as a dependency using |
Thanks for the suggestion, I changed my project to use add_subdirectory now but I seem to be getting the same issues. Note that the
It seems to be the same issue where these bash scripts are generated but not where they are supposed to. My suspicion is that there is an absolute path to these bash files somewhere rather than a relative path. Hence, when they are called from a cmakefile outside of cbmc's root, the scripts are not located in the right place. Edit: Line 60 in 3289add
I am no expert in Cmake but judging from this site: https://cmake.org/cmake/help/latest/variable/CMAKE_SOURCE_DIR.html I suspect CMAKE_SOURCE_DIR should be changed to CMAKE_CURRENT_SOURCE_DIR. I will try and report back. |
I am currently implementing something on top of a stub created by Elizabeth Polgreen based on Makefiles. As I am mostly used to Clion (and its IDE features) I was trying to use CMAKE to handle all dependencies etc. However, when using cmake's fetchContent I ran into a couple of issues.
The simplest one was the fact that when compiling the "-W-return-type" flag failed, which I fixed by adding
set (CMAKE_CXX_FLAGS "-Wno-return-type")
However, the issues I am not able to fix are the ones surrounding the scripts such as
bash-autocomplete/extract_switches.sh
.So I was wondering if anyone else is using CMAKE/fetch_content and has anything to add. Also, here is the CMakeFile I am using to reproduce the errors:
CBMC version: devel
Operating system: Linux kernel 6.2.8-1-MANJARO / Manjaro
The text was updated successfully, but these errors were encountered: