News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to expand compiler variable containing spaces without quotes

Started by ondra.holub, September 26, 2011, 03:47:54 PM

Previous topic - Next topic

MortenMacFly

Quote from: oBFusCATed on September 28, 2011, 02:08:41 PM
Now someone should implement it  :lol:  8)
Done in trunk.

BTW: I figured out a bad "bug":
What does not work for all these macros is something like:
$TO_ABSOLUTE_PATH{%APPDATA%} (on Windows, for example), as the platform specific macros (environment variables) are being replaced at last (which HAS to be like that!). Unfortunately this spoils things I had in mind with the TO_PATH_83 macro. I don't have a good solution other than for these (path's related) macros check for inner platform macros first that point to path's, but this seems very hacky to me. :-(

Does any of you have a good idea for these cases?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Oleg_Sam

The $REMOVE_QUOTES{} macros is not work on CB svn7549 Debugger Branch on WinXp SP3.
To reproduce it :
1. Create any project, for example, Console Application
2. Build this Project, all works OK.
3. Create Custom variable ADD_OPTIONS = -Wextra -Wmain (the quotes is automaticaly added)
4. In Compiler settings -> Other options type  $REMOVE_QUOTES{$(ADD_OPTIONS)}
5. Build this Project.. after this CB is hangs up and crashes  :(

Thanks.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Oleg_Sam


Oleg_Sam

I just test it on normal nightly svn7550, and this macro also not work and CB crashes :(

Oleg_Sam

When I type $REMOVE_QUOTES{"-Wextra -Wmain"} on Compiler settings -> Other options
it works fine. I suppose, that global variables not replaced in this macros.

Thanks.