[Dune] [Dune-Commit] dune-common r6651 - branches/cmake/cmake/modules

Markus Blatt markus at dr-blatt.de
Mon Apr 23 19:18:52 CEST 2012


On Mon, Apr 23, 2012 at 05:31:58PM +0200, Christian Engwer wrote:
> > Cmake works different in this regard. Passing flags to make directly
> > does not work. One has to pass them to cmake configure or change the
> > cache and then reconfigure. In both cases the -std flags gets added to
> > the compiler flags in the configure stage.
> > 
> > CMake distinguishes the variables by type. The compiler is a file
> > path. It seems unnatural to put a flag there. (I think I even tried
> > that and it did not work.)
> 
> OK, but it really confuses me. How does cmake prevent me from
> overwriting variables on the command line?
> 
> usually I can call
> 
> make CXXFLAGS="-g -Wall -O0"
> 
> what would cmake do in this case? Doesn't it just generate
> Makefiles?

As I said: these get ignored.

The Makefiles in the subdirectory read something like

subDirTarget:
    cd topleveldir && ${MAKE} -f subdir/cmakeSpecific/build.make    subdir/cmakeSpecific/subdirTarget 

Therefore the actual makefile does not see your variables.

Markus

-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658 




More information about the Dune mailing list