|
Boost : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-08-16 14:10:48
On 08/15/2007 07:49 AM, Doug Gregor wrote:
> On Aug 15, 2007, at 8:17 AM, Larry Evans wrote:
>> One other thing: The directory names shown by the output of find
>> above
>> don't indicate which compiler was used. Bjam does this so that
>> different (and I assume incompatible ) compiler .o files won't be
>> linked
>> together. Is this on the todo list or is there some other way to
>> emulate this bjam safety measure?
>
> The CMake-based system will not emulate this feature. If you want to
> build for multiple compilers, just create multiple build trees and
> configure/build them separately.
I tried this by creating a top-level build directory, built-by, with
subdirectories:
g++-4.1 #the "regular" compiler
g++-4.3_v #the "variadic" compiler
For 4.3_v, I had to first do `cmake <path-to-source>` then edit the
g++-4.3_v/CMakeCache.txt to include the lines:
//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=/home/evansl/download/gcc/variadic-templates/gcc-4.3-20070323/install/bin/g++
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=-std=gnu++0x
The FLAGS value was needed, as you know, to enable variadic templates.
However, after I tried `make` the value of COMPILER:FILEPATH was
reverted back to /usr/bin/g++ by something. How can that reversion be
prevented or is there a better way to cause the variadic compiler to be
used?
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk