|
Boost-Build : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-10-12 19:26:55
On 10/12/07 15:33, Larry Evans wrote:
[snip]
> > 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:
>
> #!/bin/bash
> cmake -DCMAKE_CXX_COMPILER=/home/evansl/download/gcc/\
> 4.3-20071005/install/bin/g++\
> -std=gnu++0x\
> -I/home/evansl/prog_dev/boost-cvs/ro/boost/sandbox/variadic-templates\
> ../../src
>
> and the resulting CMakeCache.txt didn't have the -std or the -I flags:
>
> //CXX compiler.
> CMAKE_CXX_COMPILER:FILEPATH=/home/evansl/download/gcc/4.3-20071005/install/bin/g++
>
> This is needed in order to test the variadic compiler. The -std flag
> signals variadic templates and the -I is to include my variadic boost
> directory ahead of the normal boost directory. So, unless there's a
> workaround, I think this is a definite negative on cmake's side of the
> comparison with BB.
[snip]
There is a workaround. Running the attached bash shell file with no
CMakeCache.txt file present, results in a new CMakeCache.txt with:
//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=/home/evansl/download/gcc/4.3-20071005/install/bin/g++
//First argument to CXX compiler
CMAKE_CXX_COMPILER_ARG1:STRING= -std=gnu++0x
-I/home/evansl/prog_dev/boost-cvs/ro/boost/sandbox/variadic-templates
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