I have a project I build using cmake. To build this project, I need to define several options like -DPRODUCT=amd64 -DXML_DIR=/opt/xml_database
Normally, I either pass these as -D or configure them in IDEs like qtcreator and vscode. How would I define them in package cmake-ide? I feel like I need to add these to .dir-local.el
but could not find an example.
Edit: I am trying to edit the variable given in the answer below and it has a type of string. I checked List Variables documentation but can't seem to make it work. In my dir_local.el
((nil . ((cmake-ide-cmake-args .
("-DSOME_CMAKE1=foo_bar1" "-DSOME_CMAKE2=foo_bar2")
))
))
but this gives me errors related to type of the variable.cmake-ide-cmake-args
has type of list of strings. So, how can I edit that variable? I also tried
((nil . ((cmake-ide-cmake-args .
(list "-DSOME_CMAKE1=foo_bar1" "-DSOME_CMAKE2=foo_bar2")
))
))
((nil . ((cmake-ide-cmake-args .
`("-DSOME_CMAKE1=foo_bar1" "-DSOME_CMAKE2=foo_bar2")
))
))
.dir-locals.el
and not.dir-local.el
ordir_local.el
.