If I modify anything in my project's cabal file, and I run cabal build
, I get:
./project-foo.cabal has been changed. Re-configuring with most
recently used options. If this fails, please run configure manually.
However, I want certain options like --enable-executable-profiling
to be turned on by default when I do this. Is this possible and how?
You can add it in a "cabal.config" file in the project folder, with the same structure as the user folder ".cabal/config".
Look for the option in .cabal/config and add it uncommented to your project "cabal.config" file.
Manual: Look for "cabal.config" in this cabal guide page
It works for a cabal sandboxed project. Not sure about non sandboxed ones.