Let cmake also use the environment variables.

It now uses CXXFLAGS and CFLAGS like autotools.
This commit is contained in:
Mark de Wever 2009-05-20 17:13:49 +00:00
parent 7e033fff4e
commit c9b761ade0
2 changed files with 5 additions and 4 deletions

View file

@ -106,14 +106,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Strict compilation for C files is disabled until somebody wants to clean them.
set(CMAKE_C_FLAGS "-O2 -W -Wall -ansi"
set(CMAKE_C_FLAGS "-O2 -W -Wall -ansi $ENV{CFLAGS}"
CACHE STRING "Flags used by the C compiler during normal builds." FORCE)
set(CMAKE_C_FLAGS_DEBUG "-O0 -DDEBUG -ggdb3 -W -Wall -ansi"
set(CMAKE_C_FLAGS_DEBUG "-O0 -DDEBUG -ggdb3 -W -Wall -ansi $ENV{CFLAGS}"
CACHE STRING "Flags used by the C compiler during debug builds." FORCE)
set(CMAKE_CXX_FLAGS "-O2 -W -Wall -ansi ${STRICT_FLAGS}"
set(CMAKE_CXX_FLAGS "-O2 -W -Wall -ansi ${STRICT_FLAGS} $ENV{CXXFLAGS}"
CACHE STRING "Flags used by the CXX compiler during normal builds." FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG -ggdb3 -W -Wall -ansi ${STRICT_FLAGS}"
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG -ggdb3 -W -Wall -ansi ${STRICT_FLAGS} $ENV{CXXFLAGS}"
CACHE STRING "Flags used by the CXX compiler during debug builds." FORCE)
endif(NOT CONFIGURED)

View file

@ -3,6 +3,7 @@ Version 1.7.0+svn:
* Updated translations:
* Miscellaneous and bugfixes:
* Add strict compilation to cmake
* Let cmake also use the CXXFLAGS and CFLAGS environment variables
Version 1.7.0:
* AI: