﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
32	Control application cpp flags from make command line	m.hadfield	arango	"Test cases CANYON and FLT_TEST have 2D and 3D variants. Currently the respective application header files start with

#undef SOLVE3D

and you have to override that somehow to get the 3D case. As far as I know, the only way to do that is to edit the file.

It would be nice to be able to choose between the 2D or 3D versions via the make command line. At the moment there are 2 obstacles:

* The #undef statement above will take precedence over any arguments passed to cpp. (At least I think so; I haven't checked.)

* If you just do

     make ROMS_APPLICATION=CANYON CPPFLAGS=-DSOLVE3D

then you will override all the CPPFLAGS values constructed in the make file.

So I have made two changes:

* Remove ""#undef SOLVE3D"" statements from canyon.h and flt_test.h.

* In makefile add an additional variable that is passed to cpp. It is called CPP_APP_FLAGS (alternative suggestions welcome).

So to compile the 3D canyon

     make ROMS_APPLICATION=CANYON CPP_APP_FLAGS=-DSOLVE3D

I imagine this will be useful in other contexts.

Files attached.
"	upgrade	closed	major	Release ROMS/TOMS 3.1	Nonlinear	3.1	Fixed		
