Handle compiler flags more flexibly
authorRoland Schulz <roland@utk.edu>
Thu, 10 Jan 2013 16:23:31 +0000 (11:23 -0500)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 10 Jan 2013 21:13:52 +0000 (22:13 +0100)
commit446d5dab2d0e07d00ff073978eb74e1ae8bad872
treecfe3a771f8eb908c1104a676db0ea684d42647ea
parent1dd009abfebc87d5507fb276c8de0631cc44314c
Handle compiler flags more flexibly

Flags aren't cached anymore. This prevents all problems with
caching dependent variables. It is the approached taken by other
projectes (VTK,libssh,...). The cached CMAKE_C*_FLAGS* only contain
the user provided flags. The user can add flags by setting the
variables directly or by setting environment variables.
All flags added by Gromacs are only added to the uncached version
with the same name. For the user to overwrite flags the new option
GMX_SKIP_DEFAULT_CFLAGS is added. This option gives the user total
control. Gromacs doesn't add any flags automatically and instead
shows which flags would be added. The user can manually add those
flags she wants.

Fixes #1038, #1040.

Change-Id: I8655f93fac60bce2c9a35152937d672b3786ff32
CMakeLists.txt
cmake/gmxCFlags.cmake