Boost logo

Boost :

From: Maik Beckmann (maikbeckmann_at_[hidden])
Date: 2007-08-16 14:42:19


Am Donnerstag, 16. August 2007 20:10:48 schrieb Larry Evans:
> 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/gc
>c-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?

Hello Larry,

If you want to say CMake which compiler it has to use, you must give it via
the matching environment variable (CXX for the c++ compiler, CC for c, FC for
fortran) like:
    $ cd /path/to/builddir
    $ CXX=/home/evansl/download/gcc/variadic-templates\
                /gcc-4.3-20070323/install/bin/g++ \
          cmake /path/to/boost-cmake

Note: you have to remove CMakeCache.txt, if it exists.
This behavior of CMake ensures that the results of the test CMake runs on the
compiler are allway valid. Since the results are stored in CMakeLists.txt,
you have to remove it, which triggers CMake to rerun the compiler tests.

Regards, Maik Beckmann


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk