non-root installed CL compiler & conditional env var
Posted: Sat Jun 07, 2014 11:53 pm
Hi again,
I got gcc49 working as a non-root installed compiler from CL. When using gcc49 to compile CL projects I just need to override the default libstdc++ with the one from gcc49 by appending the following to the linker options
To move this compiler dependency out of the project settings I tried to conditionally set an env variable in the pre-build commands by grep-testing $(CXX) against "g++49^". It works on a standalone shell, but not inside pre-build commands.
Input variables expand fine, I figured out it's running Dash and can escape $ with $$ (so a variable is expanded later), but can't assign the env var. Either it's empty or the cmd line triggers a syntax error.
Is there a trivial way to make this work? or at least some trick to see what the expanded (var-resolved) command looks like before execution?
thx & cheers,
-- p
I got gcc49 working as a non-root installed compiler from CL. When using gcc49 to compile CL projects I just need to override the default libstdc++ with the one from gcc49 by appending the following to the linker options
Code: Select all
-Wl,-rpath,</path/to/gcc49/libs/>;-lstdc++;
Input variables expand fine, I figured out it's running Dash and can escape $ with $$ (so a variable is expanded later), but can't assign the env var. Either it's empty or the cmd line triggers a syntax error.
Is there a trivial way to make this work? or at least some trick to see what the expanded (var-resolved) command looks like before execution?
thx & cheers,
-- p