--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
${CC} --version | head -n 1 | grep -o -E "[[:digit:]].[[:digit:]].[[:digit:]]" | uniq | sort
Daniel
Why 3.7.0? Where does the 3 come from?
I think this is going to be a highly system-dependent solution.
On OS X clang++ -v prints to stderr, not stdout, so you have
to do something like
> clang++ -v 2>&1 | head -1 | awk '{print $4}’
Note that this assumes that the out put is always of the form
“Apple LLVM version ____ ()”
Also, the Apple LLVM version is different from the underlying
LLVM version which can make it tricky to compare clang provide
by Apple and other clang versions.
The reason I'm doing this is because the clang++ version that's shipped out with XCode has changed behavior and is now spitting out unused local typedef warnings.If I use the flag to squash the warning on an older clang++ (6.x), then it spits out a warning about not recognizing the compiler flag.