From: Bill Hoffman (bill.hoffman_at_[hidden])
Date: 2007-10-12 19:45:08
Larry Evans wrote:
> Sorry. I probably sould have shortened it, but it took me so long to
> write :(, I just didn't have the heart to shorten it.
> > Can we sum it up into the following three issues?
> > 1. Once you configure a binary tree for a build with CMake,
> > it is not easy to change the compiler.
> > 2. You want to pass flags to the compiler like -E, but cmake does not
> > allow this.
> I didn't mean this. The mention of using -E was only meant to show I
> used it to debug c++ macros, and that a similar feature would be
> useful w.r.t. cmake macros. Sorry I wasn't clear. However, I tested
> this, and indeed you're right. I tried:
> cmake -DCMAKE_CXX_COMPILER=/home/evansl/download/gcc/\
> and the resulting CMakeCache.txt didn't have the -std or the -I flags:
> //CXX compiler.
Just because it is not in the cache under that variable does not mean it
is not there.
It should have been put as the first flag to the CMAKE_CXX_FLAGS.
And you should have a variable in the cache CMAKE_CXX_COMPILER_ARG1.
This is for things like the sgi CC -LANG:std and such.
When you built the project did it use the flags you gave it?
Another way is to use the environment CFLAGS and CXXFLAGS before running
cmake. So, you should be able to do what you want without a problem.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk