Fix: Correct no-exceptions removal for cc_opts and opts
"print" is incorrect but not caught as error messages in the bmk files are ignored there. Also the "opts" replaced stuff in "cc_opts" incorrectly.
While ":find()" can return Null, ":gsub" simply returns self even if nothing was changed
Attention: This is variant2, there is variant1 too: https://github.com/bmx-ng/bmk/pull/138
It depends on what you want:
variant1 assumes that fno-exception is just to remove from cc_opts.
variant2 assumes that fno-exceptions should be removed from cc_opts AND opts.
PS: https://blitzmax.org/docs/en/language/pre_post_compilation_scripts/
SuperStrict
' @bmk echo *** Building my cool app ***
' @bmk include "my_own_scripts.bmk"
'
' @bmk push cc_opts
' @bmk addccopt -DSPECIAL_OPTION
'
' @bmk make "src/someglue.cpp"
'
' @bmk pop cc_opts
' @bmk make "src/other.cpp"
'
The example is incorrect ...when adding/setting opts you now need a "key" (some name so you can override later)
The example itself won't compile because of https://github.com/bmx-ng/bcc/issues/656 (I simply added "newlines" between the commands to work around)